protected void Application_Start(object sender, EventArgs e)
        {
            var container = new Bootstrapper().Build();

            AutofacHostFactory.Container = container;
            SettingAddress.Initialize(container.Resolve <IAddressRepository>());
            InitializeSettingsService.InitializeConstants();
        }
 private void InitializeSettings()
 {
     try
     {
         InitializeSettingsService.FullInitialize();
     }
     catch (Exception ex)
     {
         SharedLogger.LogError(ex);
     }
 }
 protected override void OnStart(string[] args)
 {
     try
     {
         eventLog.WriteEntry("Starting OrderCloudFeed Service");
         InitializeSettingsService.InitializeConstants();
         _service           = new OrderCloudFeedService(eventLog);
         _cancellationToken = new CancellationTokenSource();
         _updateOrderTask   = Task.Run(() => DoTask(_cancellationToken.Token));
         eventLog.WriteEntry("Started OrderCloudFeed Service");
     }
     catch (Exception ex)
     {
         eventLog.WriteEntry(ex.Message + " -ST- " + ex.StackTrace, EventLogEntryType.Error);
     }
 }