Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ErrorPageMiddleware"/> class
 /// </summary>
 /// <param name="next"></param>
 /// <param name="options"></param>
 /// <param name="isDevMode"></param>
 public ErrorPageMiddleware(OwinMiddleware next, ErrorPageOptions options, bool isDevMode)
     : base(next)
 {
     if (options == null)
     {
         throw new ArgumentNullException("options");
     }
     if (isDevMode)
     {
         options.SetDefaultVisibility(isVisible: true);
     }
     _options = options;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ErrorPageMiddleware"/> class
 /// </summary>
 /// <param name="next"></param>
 /// <param name="options"></param>
 /// <param name="isDevMode"></param>
 public ErrorPageMiddleware(AppFunc next, ErrorPageOptions options, bool isDevMode)
 {
     if (next == null)
     {
         throw new ArgumentNullException("next");
     }
     if (options == null)
     {
         throw new ArgumentNullException("options");
     }
     if (isDevMode)
     {
         options.SetDefaultVisibility(isVisible: true);
     }
     _next    = next;
     _options = options;
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ErrorPageMiddleware"/> class
 /// </summary>
 /// <param name="next"></param>
 /// <param name="options"></param>
 /// <param name="isDevMode"></param>
 public ErrorPageMiddleware(AppFunc next, ErrorPageOptions options, ILogger logger, bool isDevMode)
 {
     if (next == null)
     {
         throw new ArgumentNullException("next");
     }
     if (options == null)
     {
         throw new ArgumentNullException("options");
     }
     if (isDevMode)
     {
         options.SetDefaultVisibility(isVisible: true);
     }
     _next = next;
     _options = options;
     _logger = logger;
 }