Beispiel #1
0
        /// <summary>
        /// Called when the service is started. This method first calls <see cref="CreateKernel"/>, configures it with
        /// infrastructure binding, calls <see cref="Configure"/> to configure additional bindings and settings, then
        /// start silo using <see cref="GigyaSiloHost"/>. In most scenarios, you shouldn't override this method.
        /// </summary>
        protected override void OnStart()
        {
            Kernel = CreateKernel();

            PreConfigure(Kernel);

            Configure(Kernel, Kernel.Get <OrleansCodeConfig>());

            Kernel.Get <ClusterConfiguration>().WithNinject(Kernel);

            OnInitilize(Kernel);

            SiloHost = Kernel.Get <GigyaSiloHost>();
            SiloHost.Start(AfterOrleansStartup, BeforeOrleansShutdown);
        }
        /// <summary>
        /// Called when the service is started. This method first calls <see cref="CreateKernel"/>, configures it with
        /// infrastructure binding, calls <see cref="Configure"/> to configure additional bindings and settings, then
        /// start silo using <see cref="GigyaSiloHost"/>. In most scenarios, you shouldn't override this method.
        /// </summary>
        protected override void OnStart()
        {
            Kernel = CreateKernel();

            Kernel.Bind <CurrentApplicationInfo>().ToConstant(new CurrentApplicationInfo(ServiceName, Arguments.InstanceName, InfraVersion)).InSingletonScope();

            PreConfigure(Kernel);

            Configure(Kernel, Kernel.Get <OrleansCodeConfig>());

            PreInitialize(Kernel);

            OnInitilize(Kernel);

            Warmup(Kernel);

            SiloHost = Kernel.Get <GigyaSiloHost>();
            SiloHost.Start(Arguments, AfterOrleansStartup);
        }