Exemplo n.º 1
0
        /// <summary>
        /// Initializes the component passing the environment host variable.
        /// </summary>
        /// <param name="environment">The host reference</param>
        public override void Initialize(IServiceProvider environment)
        {
            base.Initialize(environment);
            ICurrentState state;

            state = Host.GetService(typeof(ICurrentState)) as ICurrentState;
            if (state == null)
            {
                GeneratorHost.ThrowInvalidHostResponse(typeof(CurrentState));
            }

            Unit = state.Unit;

            // Retrieve the current generator configuration.
            object service = Host.GetService(typeof(IConfigurationRetriever));

            if (service == null)
            {
                GeneratorHost.ThrowInvalidHostResponse(typeof(IConfigurationRetriever));
            }
            Configuration = ((IConfigurationRetriever)service).GetConfig("generator") as GeneratorSection;

            // Retrieve the current ICustomizationManager instance.
            service = Host.GetService(typeof(ICustomizationManager));
            if (service == null)
            {
                GeneratorHost.ThrowInvalidHostResponse(typeof(ICustomizationManager));
            }
            Retriever = (ICustomizationManager)service;
        }
Exemplo n.º 2
0
        public Service(IServiceBus serviceBus, ICustomizationManager customizationManager)
            : base(serviceBus, customizationManager)
        {
            Started += ((s, e) =>
                {

                });
        }
Exemplo n.º 3
0
 public AugurkController(ICustomizationManager customizationManager,
                         IConfigurationManager configurationManager,
                         IFeatureManager featureManager,
                         IExpirationManager expirationManager,
                         IDocumentStoreProvider storeProvider)
 {
     _customizationManager = customizationManager ?? throw new ArgumentNullException(nameof(customizationManager));
     _configurationManager = configurationManager ?? throw new ArgumentNullException(nameof(configurationManager));
     _featureManager       = featureManager ?? throw new ArgumentNullException(nameof(featureManager));
     _expirationManager    = expirationManager ?? throw new ArgumentNullException(nameof(expirationManager));
     _documentStore        = storeProvider?.Store ?? throw new ArgumentNullException(nameof(storeProvider));
 }