Beispiel #1
0
        IHttpHandler IRouteHandler.GetHttpHandler(RequestContext requestContext)
        {
            var embeddedResourceNameResolver = new EmbeddedResourceNameResolver(MefAssemblyFetcher.Fetch());
            var virtualFileStreamFetcher     = new VirtualFileStreamFetcher();

            return(new EmbeddedResourceHttpHandler(requestContext.RouteData, embeddedResourceNameResolver, virtualFileStreamFetcher));
        }
 public EmbeddedResourceVirtualFile(IEmbeddedResourceNameResolver embeddedResourceNameResolver, string virtualPath)
     : base(virtualPath)
 {
     _embeddedResourceNameResolver = embeddedResourceNameResolver;
     var path = VirtualPathUtility.ToAppRelative(virtualPath);
     _pathInfo = new EmbeddedResourcePathInfo(path);
     _streamFetcher = new VirtualFileStreamFetcher();
 }
Beispiel #3
0
        public EmbeddedResourceVirtualFile(IEmbeddedResourceNameResolver embeddedResourceNameResolver, string virtualPath) : base(virtualPath)
        {
            _embeddedResourceNameResolver = embeddedResourceNameResolver;
            var path = VirtualPathUtility.ToAppRelative(virtualPath);

            _pathInfo      = new EmbeddedResourcePathInfo(path);
            _streamFetcher = new VirtualFileStreamFetcher();
        }
 IHttpHandler IRouteHandler.GetHttpHandler(RequestContext requestContext)
 {
     var embeddedResourceNameResolver = new EmbeddedResourceNameResolver(MefAssemblyFetcher.Fetch());
     var virtualFileStreamFetcher = new VirtualFileStreamFetcher();
     return new EmbeddedResourceHttpHandler(requestContext.RouteData, embeddedResourceNameResolver, virtualFileStreamFetcher);
 }
 public EmbeddedResourceHttpHandler(RouteData routeData, EmbeddedResourceNameResolver embeddedResourceNameResolver, VirtualFileStreamFetcher streamFetcher)
 {
     _routeData = routeData;
     _embeddedResourceNameResolver = embeddedResourceNameResolver;
     _streamFetcher = streamFetcher;
 }