public FileResource(CustomUri resource) { CreateStream = delegate { return(CreateStreamFromUri(resource, DefaultBasePath)); }; }
public FileResource(CustomUri resource, String basePath) { CreateStream = delegate { return(CreateStreamFromUri(resource, basePath)); }; }
public IResource Create(CustomUri uri, String basePath) { if (basePath == null) { return(new AssemblyResource(uri)); } return(new AssemblyResource(uri, basePath)); }
public IResource Create(CustomUri uri, String basePath) { if (basePath != null) { return(new FileResource(uri, basePath)); } else { return(new FileResource(uri)); } }
private Stream CreateStreamFromUri(CustomUri resource, String rootPath) { if (resource == null) { throw new ArgumentNullException("resource"); } if (rootPath == null) { throw new ArgumentNullException("rootPath"); } if (!resource.IsFile) { throw new ArgumentException("The specified resource is not a file", "resource"); } return(CreateStreamFromPath(resource.Path, rootPath)); }
public IResource Create(CustomUri uri, String basePath) { return(new UncResource(uri, basePath)); }
public IResource Create(CustomUri uri) { return(new UncResource(uri)); }
public bool Accept(CustomUri uri) { return(uri.IsUnc); }
public IResource Create(CustomUri uri) { return(Create(uri, null)); }
public bool Accept(CustomUri uri) { return("file".Equals(uri.Scheme)); }
public ConfigResource(CustomUri uri) : this(uri.Host) { }
public IResource Create(CustomUri uri, String basePath) { return(Create(uri)); }
public IResource Create(CustomUri uri) { return(new ConfigResource(uri)); }
public bool Accept(CustomUri uri) { return("assembly".Equals(uri.Scheme)); }
public AssemblyBundleResource(CustomUri resource) { this.resource = resource; }