Exemplo n.º 1
0
        protected override void Extend_Configure(IApplicationBuilder app, IHostEnvironment env, IHostApplicationLifetime lifetime, ILoggerFactory loggerFactory)
        {
            ServiceContext.InitServiceProvider(app.ApplicationServices);
            ServiceContext.InitMicServClient();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseRouting();
            app.UseAuthorization();
            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
                endpoints.UseMagicOnion();
            });
        }
Exemplo n.º 2
0
 public GRPCFilterRunner(MS.ServiceContext context, Func <MS.ServiceContext, ValueTask> next)
 {
     _context = context;
     _next    = next;
     _filters = ServiceContext.ResolveByKeyed <IRequestFilterHandle>(Enum_FilterType.GRPC);
 }
Exemplo n.º 3
0
 public GRPCFilterItemBasic()
 {
     Logger = ServiceContext.Resolve <ILogger>();
 }
Exemplo n.º 4
0
        protected override void Extend_Configure(IApplicationBuilder app, IHostEnvironment env, IHostApplicationLifetime lifetime, ILoggerFactory loggerFactory)
        {
            ServiceContext.InitServiceProvider(app.ApplicationServices);

            app.MonitorSettings(this.GetRunningType());
        }
Exemplo n.º 5
0
 public RunnerMicServ()
 {
     _dataProvider = ServiceContext.Resolve <IDataProvider>();
 }
Exemplo n.º 6
0
 private T GetService <T>() where T : IMicServ <T>
 {
     return(ServiceContext.ResolveMicServ <T>());
 }
Exemplo n.º 7
0
 public CtrlerFilterAttribute()
 {
     _filters = ServiceContext.ResolveByKeyed <IRequestFilterHandle>(Enum_FilterType.Ctrler);
 }
Exemplo n.º 8
0
 public DisplayerMicServ()
 {
     _displayer = ServiceContext.Resolve <IDataProvider>().Displayer as IDisplayer_TextDemo;
 }