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()); }
public static void UseImpostor(this IAppBuilder app, ImpostorSettings settings, ImpostorDependencies dependencies) { app.Use <ImpostorMiddleware>(dependencies, settings); }