/// <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); }
public static ISunnyBuilder AddServiceDiscovery(this ISunnyBuilder builder) { builder.Services.AddTransient <IServiceDiscoveryService, DefaultServiceDiscoveryService>(); return(builder); }
/// <summary> /// 添加异常处理服务 /// </summary> /// <param name="builder"></param> /// <returns></returns> public static ISunnyBuilder AddException(this ISunnyBuilder builder) { builder.Services.AddTransient <IExceptionService, DefaultExceptionService>(); return(builder); }