コード例 #1
0
ファイル: AutofacPart.cs プロジェクト: embarrassedmilk/snake
 public static ISnakeWebhostBuilder <TSettings> WithAutofac <TSettings>(
     this ISnakeWebhostBuilder <TSettings> snakeWebhostBuilder,
     IEnumerable <Module> modules,
     Action <IContainer, IApplicationBuilder, IHostingEnvironment, IEnumerable <ServiceDescriptor> > afterBuild) where TSettings : BaseSettings, new()
 {
     return(snakeWebhostBuilder.With((_) => new AutofacPart(modules, afterBuild)));
 }
コード例 #2
0
 public static ISnakeWebhostBuilder <TSettings> WithMvc <TSettings>(this ISnakeWebhostBuilder <TSettings> builder) where TSettings : BaseSettings, new()
 {
     return(builder.With((_) => new MvcPart()));
 }
コード例 #3
0
 public static ISnakeWebhostBuilder <TSettings> WithSerilog <TSettings>(this ISnakeWebhostBuilder <TSettings> snakeWebhostBuilder, LoggerConfiguration loggerConfiguration)
     where TSettings : BaseSettings, new()
 {
     return(snakeWebhostBuilder.With((_) => new SerilogPart(loggerConfiguration)));
 }
コード例 #4
0
ファイル: SwaggerPart.cs プロジェクト: embarrassedmilk/snake
 public static ISnakeWebhostBuilder <TSettings> WithSwagger <TSettings>(this ISnakeWebhostBuilder <TSettings> builder, string appName)
     where TSettings : BaseSettings, new()
 {
     return(builder.With((_) => new SwaggerPart(appName)));
 }