static void Main(string[] args) { #region Container var container = AutofacContainer.Create(); #endregion var machine = container.Resolve <DrawMachine>(); machine.DrawAll(); }
static void Main(string[] args) { #region Container creations and some resolvings var container = AutofacContainer.Create(); var settingsManager = container.Resolve <AppSettingsManager>(); #endregion var appSettings = settingsManager.Load(); Logger.LogInfo($"ApplicationName: {appSettings.ApplicationName}"); Logger.LogInfo($"DefaultPageSize: {appSettings.DefaultPageSize}"); appSettings.ApplicationName = $"ApplicationName updated at {DateTime.Now}"; appSettings.DefaultPageSize = 25; settingsManager.Save(appSettings); Logger.LogInfo($"ApplicationName: {appSettings.ApplicationName}"); Logger.LogInfo($"DefaultPageSize: {appSettings.DefaultPageSize}"); }