Exemple #1
0
 /// <summary>
 /// 添加Application服务
 /// </summary>
 /// <param name="builder"></param>
 /// <returns></returns>
 public static ISunnyBuilder AddCore(this ISunnyBuilder builder)
 {
     builder.Services.AddTransient <ISunnyApplicationBuilderFactory, DefaultSunnyApplicationBuilderFactory>();
     builder.Services.AddTransient <ISunnyContextFactory, DefaultSunnyContextFactory>();
     builder.Services.AddTransient <ISunnyServiceFactory, DefaultSunnyServiceFactory>();
     return(builder);
 }
Exemple #2
0
 public static ISunnyBuilder AddServiceDiscovery(this ISunnyBuilder builder)
 {
     builder.Services.AddTransient <IServiceDiscoveryService, DefaultServiceDiscoveryService>();
     return(builder);
 }
Exemple #3
0
 /// <summary>
 /// 添加异常处理服务
 /// </summary>
 /// <param name="builder"></param>
 /// <returns></returns>
 public static ISunnyBuilder AddException(this ISunnyBuilder builder)
 {
     builder.Services.AddTransient <IExceptionService, DefaultExceptionService>();
     return(builder);
 }