Пример #1
0
        public IResource Create(CustomUri uri, String basePath)
        {
            if (basePath == null)
            {
                return(new AssemblyResource(uri));
            }

            return(new AssemblyResource(uri, basePath));
        }
Пример #2
0
 public IResource Create(CustomUri uri, String basePath)
 {
     if (basePath != null)
     {
         return(new FileResource(uri, basePath));
     }
     else
     {
         return(new FileResource(uri));
     }
 }
Пример #3
0
        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));
        }
Пример #4
0
 public IResource Create(CustomUri uri)
 {
     return(Create(uri, null));
 }
Пример #5
0
 public bool Accept(CustomUri uri)
 {
     return("assembly".Equals(uri.Scheme));
 }
Пример #6
0
 public bool Accept(CustomUri uri)
 {
     return("file".Equals(uri.Scheme));
 }
Пример #7
0
 public AssemblyBundleResource(CustomUri resource)
 {
     this.resource = resource;
 }
Пример #8
0
 public IResource Create(CustomUri uri, String basePath)
 {
     return(new UncResource(uri, basePath));
 }
Пример #9
0
 public IResource Create(CustomUri uri)
 {
     return(new UncResource(uri));
 }
Пример #10
0
 public bool Accept(CustomUri uri)
 {
     return(uri.IsUnc);
 }