Esempio n. 1
0
 public ImpostorMiddleware(
     OwinMiddleware next,
     [NotNull] ImpostorDependencies services,
     [NotNull] ImpostorSettings settings
     ) : base(next)
 {
     if (settings == null)
     {
         throw new NullReferenceException("settings");
     }
     if (services == null)
     {
         throw new NullReferenceException("services");
     }
     _services = services;
     _settings = settings;
     _logger   = services.LoggerFactory(GetType());
 }
Esempio n. 2
0
 public static void UseImpostor(this IAppBuilder app, ImpostorSettings settings)
 {
     app.UseImpostor(settings, new ImpostorDependencies());
 }
Esempio n. 3
0
 public static void UseImpostor(this IAppBuilder app, ImpostorSettings settings, ImpostorDependencies dependencies)
 {
     app.Use <ImpostorMiddleware>(dependencies, settings);
 }