|
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using DDay.Update.Utilities;
using DDay.Update.Configuration;
[[AssemblyAttributes]]
namespace DDay.Update.Bootstrap
{
class Program
{
static private ILog log = new Log4NetLogger();
static void Main(string[] args)
{
// Get the DDay.Update configuration section
DDayUpdateConfigurationSection cfg = ConfigurationManager.GetSection("DDay.Update")
as DDayUpdateConfigurationSection;
// Set the command line parameters to the application
UpdateManager.SetCommandLineParameters(args);
// Determine if an update is available
if (UpdateManager.IsUpdateAvailable(cfg.Uri))
{
log.Debug("Update is available, beginning update process...");
// Perform the update, which performs the following steps:
// 1. Updates to a new version of the application
// 2. Saves new deployment and application manifests locally
// 3. Starts the application
UpdateManager.Update();
}
else
{
log.Debug("Application is up-to-date.");
// Start the application
UpdateManager.StartApplication();
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Doug has been a Software Engineer for 7 of the previous 9 years, and has 12 years of programming experience.
For the past 3 years, he has been developing custom applications in C# and Visual Basic.NET, with an emphasis on custom cross-Internet applications for IT management, real-time collaboration, and process management and reporting.