Пример #1
0
        public ServeDirectoryMiddleware(AppFunc next, ServeDirectoryMiddlewareOptions options)
        {
            if (null == next)
            {
                throw new ArgumentNullException("next");
            }
            if (null == options)
            {
                throw new ArgumentNullException("options");
            }

            _next    = next;
            _options = options;
        }
        public static void UseServeDirectoryMiddleware(this IAppBuilder app, ServeDirectoryMiddlewareOptions options = null)
        {
            if (options == null) options = new ServeDirectoryMiddlewareOptions();

            app.Use<ServeDirectoryMiddleware>(options);
        }