コード例 #1
0
 public ApiContext(string aName, string aVersion, DateTime aStarted, string aEnvironment,
                   ApiConfigs aConfigs, ILogger aLog, DbContext aContext)
 {
     this.AppName        = aName;
     this.AppVersion     = aVersion;
     this.AppStarted     = aStarted;
     this.AppEnvironment = aEnvironment;
     this.AppConf        = aConfigs;
     this.Log            = aLog;
     this.DataContext    = aContext;
 }
コード例 #2
0
        /// <summary>
        /// Loading local/secure/log configurations
        /// </summary>
        private void LoadConfigurations()
        {
            ApiConfigs appConfig = (ApiConfigs)Activator.CreateInstance(typeof(ApiConfigs));

            configs.Bind(appConfig);

            this.AppConfigs = appConfig;

            AppName    = appConfig.AppName;
            AppVersion = appConfig.AppVersion;
        }