Ejemplo n.º 1
0
		protected TemplatePathResolver(string extension, IHttpRuntime httpRuntime)
		{
			extension.ThrowIfNull("extension");
			httpRuntime.ThrowIfNull("httpRuntime");

			_extension = extension;
			_httpRuntime = httpRuntime;
		}
Ejemplo n.º 2
0
		public UrlResolver(IRouteCollection routes, IHttpRuntime httpRuntime)
		{
			routes.ThrowIfNull("routes");
			httpRuntime.ThrowIfNull("httpRuntime");

			_routes = new Lazy<IRouteCollection>(() => routes);
			_httpRuntime = httpRuntime;
		}
Ejemplo n.º 3
0
        public UrlResolver(IRouteCollection routes, IHttpRuntime httpRuntime)
        {
            routes.ThrowIfNull("routes");
            httpRuntime.ThrowIfNull("httpRuntime");

            _routes      = new Lazy <IRouteCollection>(() => routes);
            _httpRuntime = httpRuntime;
        }
Ejemplo n.º 4
0
        protected TemplatePathResolver(string extension, IHttpRuntime httpRuntime)
        {
            extension.ThrowIfNull("extension");
            httpRuntime.ThrowIfNull("httpRuntime");

            _extension   = extension;
            _httpRuntime = httpRuntime;
        }
        public DefaultRestrictionContainer(IHttpRuntime httpRuntime)
        {
            httpRuntime.ThrowIfNull("httpRuntime");

            _container = new Dictionary <Type, object>
            {
                { typeof(IHttpRuntime), httpRuntime }
            };
        }
Ejemplo n.º 6
0
        public UrlResolver(IRouteCollection routes, IUrlResolverConfiguration configuration, IHttpRuntime httpRuntime)
        {
            routes.ThrowIfNull("routes");
            configuration.ThrowIfNull("configuration");
            httpRuntime.ThrowIfNull("httpRuntime");

            _routes        = new Lazy <IRouteCollection>(() => routes);
            _configuration = configuration;
            _httpRuntime   = httpRuntime;
        }
Ejemplo n.º 7
0
        public UrlRelativePathRestriction(string relativePath, IRequestValueComparer comparer, IHttpRuntime httpRuntime)
        {
            relativePath.ThrowIfNull("relativePath");
            comparer.ThrowIfNull("comparer");
            httpRuntime.ThrowIfNull("httpRuntime");

            _relativePath = relativePath;
            _comparer     = comparer;
            _httpRuntime  = httpRuntime;
        }
Ejemplo n.º 8
0
        public UrlResolver(IRouteCollection routes, IUrlResolverConfiguration configuration, IHttpRuntime httpRuntime)
        {
            routes.ThrowIfNull("routes");
            configuration.ThrowIfNull("configuration");
            httpRuntime.ThrowIfNull("httpRuntime");

            _routes = new Lazy<IRouteCollection>(() => routes);
            _configuration = configuration;
            _httpRuntime = httpRuntime;
        }
Ejemplo n.º 9
0
        protected BundleWatcherRoute(string name, Guid id, string relativePath, BundleWatcher watcher, IHttpRuntime httpRuntime)
            : base(name, id)
        {
            relativePath.ThrowIfNull("relativePath");
            watcher.ThrowIfNull("watcher");
            httpRuntime.ThrowIfNull("httpRuntime");

            _relativePath           = relativePath;
            _watcher                = watcher;
            _httpRuntime            = httpRuntime;
            _watcher.BundleChanged += WatcherBundleChanged;
            ConfigureRoute();
        }
Ejemplo n.º 10
0
        public DefaultBundleDependencyContainer(IHttpRuntime httpRuntime, IFileSystem fileSystem)
        {
            httpRuntime.ThrowIfNull("httpRuntime");
            fileSystem.ThrowIfNull("fileSystem");

            _container = new Dictionary <Type, object>
            {
                { typeof(IHttpRuntime), httpRuntime },
                { typeof(IFileSystem), fileSystem },
                { typeof(IGuidFactory), new GuidFactory() },
                { typeof(ISystemClock), new SystemClock() }
            };
        }
        public IEnumerable<Routing.Route> GetRoutes(IGuidFactory guidFactory, IUrlResolver urlResolver, IHttpRuntime httpRuntime, string diagnosticsRelativeUrl)
        {
            guidFactory.ThrowIfNull("guidFactory");
            urlResolver.ThrowIfNull("urlResolver");
            httpRuntime.ThrowIfNull("httpRuntime");
            diagnosticsRelativeUrl.ThrowIfNull("diagnosticsUrl");

            yield return DiagnosticRouteHelper.Instance.GetViewRoute<AspNetView>(
                "Diagnostics ASP.net View",
                guidFactory,
                diagnosticsRelativeUrl + "/asp_net",
                ResponseResources.AspNet,
                AspNetViewNamespaces,
                httpRuntime,
                view =>
                    {
                        view.UrlResolver = urlResolver;
                        view.Populate(_cacheType, _responseGeneratorTypes, _responseHandlerTypes);
                    });
            yield return DiagnosticRouteHelper.Instance.GetStylesheetRoute("Diagnostics ASP.net View CSS", guidFactory, diagnosticsRelativeUrl + "/asp_net/css", ResponseResources.asp_net_view, httpRuntime);
        }
Ejemplo n.º 12
0
        public IEnumerable <Routing.Route> GetRoutes(IGuidFactory guidFactory, IUrlResolver urlResolver, IHttpRuntime httpRuntime, string diagnosticsRelativeUrl)
        {
            guidFactory.ThrowIfNull("guidFactory");
            urlResolver.ThrowIfNull("urlResolver");
            httpRuntime.ThrowIfNull("httpRuntime");
            diagnosticsRelativeUrl.ThrowIfNull("diagnosticsUrl");

            yield return(DiagnosticRouteHelper.Instance.GetViewRoute <AspNetView>(
                             "Diagnostics ASP.net View",
                             guidFactory,
                             diagnosticsRelativeUrl + "/asp_net",
                             ResponseResources.AspNet,
                             Enumerable.Empty <string>(),
                             httpRuntime,
                             view =>
            {
                view.UrlResolver = urlResolver;
                view.Populate(_cacheType, _requestFilterTypes, _responseGeneratorTypes, _responseHandlerTypes, _errorHandlerTypes, _antiCsrfCookieManagerType, _antiCsrfNonceValidatorType, _antiCsrfResponseGeneratorType);
            }));

            yield return(DiagnosticRouteHelper.Instance.GetStylesheetRoute("Diagnostics ASP.net View CSS", guidFactory, diagnosticsRelativeUrl + "/asp_net/css", ResponseResources.asp_net_view, httpRuntime));
        }
Ejemplo n.º 13
0
        public FileSystem(IHttpRuntime httpRuntime)
        {
            httpRuntime.ThrowIfNull("httpRuntime");

            _httpRuntime = httpRuntime;
        }
Ejemplo n.º 14
0
        public FileSystem(IHttpRuntime httpRuntime)
        {
            httpRuntime.ThrowIfNull("httpRuntime");

            _httpRuntime = httpRuntime;
        }