protected void Application_Start() { AzureUtils.AddAzureDiagnosticsListener(); DashTrace.TraceInformation("Starting application instance"); GlobalConfiguration.Configure(WebApiConfig.Register); // Import any statically configured accounts var importAccounts = DashConfiguration.ImportAccounts; if (importAccounts.Any()) { Task.Factory.StartNew(() => AccountManager.ImportAccounts(importAccounts)); } }
static void Main(string[] args) { if (!Trace.Listeners.OfType <ConsoleTraceListener>().Any()) { Trace.Listeners.Add(new ConsoleTraceListener()); } AzureUtils.AddAzureDiagnosticsListener(); DashTrace.TraceInformation("DashAsync (version: {0}): Asynchronous worker starting up.", Assembly.GetEntryAssembly().GetName().Version); int msgProcessed = 0, msgErrors = 0; MessageProcessor.ProcessMessageLoop(ref msgProcessed, ref msgErrors); DashTrace.TraceInformation("DashAsync completed. Messages processed [{0}], messages unprocessed [{1}]", msgProcessed, msgErrors); }