Beispiel #1
0
 public NarikStartup(IConfiguration configuration,
                     IUnityContainer unityContainer,
                     NarikStarupOptions options)
 {
     _configuration  = configuration;
     _unityContainer = unityContainer;
     _options        = options;
 }
Beispiel #2
0
        private void Init(IServiceCollection services)
        {
            var moduleConfig = _configuration.GetSection("NarikModulesConfig");

            services.Configure <NarikModulesConfig>(moduleConfig);
            _config = moduleConfig.Get <NarikModulesConfig>();
            _unityContainer.RegisterInstance(typeof(NarikModulesConfig), _config);
            if (_options == null)
            {
                _options = new NarikStarupOptions
                {
                }
            }
            ;
        }