public StreamSystemMiddleware(RequestDelegate next, ILoggerFactory loggerFactory, StreamSystemMiddlewareOptions options, MusicContext MusicContext) { if (next == null) { throw new ArgumentNullException(nameof(next)); } if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); } if (MusicContext == null) { throw new ArgumentNullException(nameof(MusicContext)); } this._next = next; this.Logger = loggerFactory.CreateLogger <StreamSystemMiddleware>(); this.Options = options; this.MusicContext = MusicContext; }
public static IApplicationBuilder UseStreamSystemMiddleware(this IApplicationBuilder builder, StreamSystemMiddlewareOptions options) { return(builder.UseMiddleware <StreamSystemMiddleware>(options)); }