Пример #1
0
		public Server(ServerContext context, RenderingEngine renderingEngine)
		{
			if (context == null) throw new ArgumentNullException(nameof(context));
			if (renderingEngine == null) throw new ArgumentNullException(nameof(renderingEngine));

			_context = context;
			_renderingEngine = renderingEngine;
		}
Пример #2
0
        public Server(ServerContext context, RenderingEngine renderingEngine)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }
            if (renderingEngine == null)
            {
                throw new ArgumentNullException(nameof(renderingEngine));
            }

            _context         = context;
            _renderingEngine = renderingEngine;
        }
		public MarkdownOwinMiddleware(AppFunc next, MarkdownOwinOptions options)
		{
			if (next == null)
				throw new ArgumentNullException(nameof(next));

			if (options == null)
				throw new ArgumentNullException(nameof(options));

			_next = next;

			var sitemap = ServerContext.Create(options);
			var engine = new RenderingEngine();

			_server = new Server(sitemap, engine);
		}
Пример #4
0
        public MarkdownOwinMiddleware(AppFunc next, MarkdownOwinOptions options)
        {
            if (next == null)
            {
                throw new ArgumentNullException(nameof(next));
            }

            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            _next = next;

            var sitemap = ServerContext.Create(options);
            var engine  = new RenderingEngine();

            _server = new Server(sitemap, engine);
        }