public static IAppBuilder UseIMOwin(this IAppBuilder app, BehaviorRouter behaviorRouter, IMOwinFilterCollection filters, IContentFormatter contentFormatter, ErrorHandlingPolicy errorHandlingPolicy)
        {
            var option = new IMOwinOptions(behaviorRouter, contentFormatter, filters)
            {
                ErrorHandlingPolicy = errorHandlingPolicy,
            };

            return UseIMOwin(app, option);
        }
Пример #2
0
 public IMOwinOptions(BehaviorRouter router, IContentFormatter contentFormatter, IMOwinFilterCollection filters)
 {
     this.BehaviorRouter = router;
     this.ContentFormatter = contentFormatter;
     this.UseOtherMiddleware = false;
     this.ErrorHandlingPolicy = ErrorHandlingPolicy.ThrowException;
     this.Filters = new IMOwinFilterCollection();
     this.StreamWriteOption = StreamWriteOption.BufferAndWrite;
     this.Filters = filters;
 }
 public static IAppBuilder UseIMOwin(this IAppBuilder app, BehaviorRouter behaviorRouter,
     IMOwinFilterCollection filters, IContentFormatter contentFormatter)
 {
     return UseIMOwin(app, behaviorRouter, filters, contentFormatter, ErrorHandlingPolicy.ParseReturnStatusCodeException);
 }
 public static IAppBuilder UseIMOwin(this IAppBuilder app, BehaviorRouter behaviorRouter, IMOwinFilterCollection filters)
 {
     return UseIMOwin(app, behaviorRouter, filters, new DataContractJsonContentFormatterFactory().CreateFormatter());
 }