Пример #1
0
        /// <summary>
        /// 应用模块服务
        /// </summary>
        /// <param name="provider">服务提供者</param>
        public override void UsePack(IServiceProvider provider)
        {
            IEventBusBuilder builder = provider.GetService <IEventBusBuilder>();

            builder.Build();
            IsEnabled = true;
        }
Пример #2
0
        /// <summary>
        /// 应用模块服务
        /// </summary>
        /// <param name="app">应用程序构建器</param>
        public override void UsePack(IApplicationBuilder app)
        {
            IEventBusBuilder builder = app.ApplicationServices.GetService <IEventBusBuilder>();

            builder.Build();
            IsEnabled = true;
        }