ResourceVirtualDirectory
Assembly: ServiceStack.Common.dll
View Source
public class ResourceVirtualDirectory : AbstractVirtualDirectoryBase, IVirtualDirectory, IVirtualNode, IEnumerable<IVirtualNode>, IEnumerable
Properties
EmbeddedResourceTreatAsFiles
View Source
public static HashSet<string> EmbeddedResourceTreatAsFiles { get; set; }
rootNamespace
View Source
public string rootNamespace { get; set; }
Files
View Source
public override IEnumerable<IVirtualFile> Files { get; }
Directories
View Source
public override IEnumerable<IVirtualDirectory> Directories { get; }
Name
View Source
public override string Name { get; }
DirectoryName
View Source
public string DirectoryName { get; set; }
LastModified
View Source
public override DateTime LastModified { get; }
Inherited Properties
Directories
View Source
public abstract IEnumerable<IVirtualDirectory> Directories { get; }
Directory
View Source
public IVirtualDirectory Directory { get; }
Files
View Source
public abstract IEnumerable<IVirtualFile> Files { get; }
IsDirectory
View Source
public virtual bool IsDirectory { get; }
IsRoot
View Source
public virtual bool IsRoot { get; }
LastModified
View Source
public abstract DateTime LastModified { get; }
Name
View Source
public abstract string Name { get; }
ParentDirectory
View Source
public IVirtualDirectory ParentDirectory { get; set; }
RealPath
View Source
public virtual string RealPath { get; }
VirtualPath
View Source
public virtual string VirtualPath { get; }
Fields
backingAssembly
View Source
protected Assembly backingAssembly
SubDirectories
View Source
protected List<ResourceVirtualDirectory> SubDirectories
SubFiles
View Source
protected List<ResourceVirtualFile> SubFiles
Methods
GetResourceNames(Assembly, String)
View Source
public static List<string> GetResourceNames(Assembly asm, string basePath)
Returns
System.Collections.Generic.List<System.String>
Parameters
Type | Name |
---|---|
System.Reflection.Assembly | asm |
System.String | basePath |
InitializeDirectoryStructure(List<String>)
View Source
protected void InitializeDirectoryStructure(List<string> manifestResourceNames)
Parameters
Type | Name |
---|---|
System.Collections.Generic.List<System.String> | manifestResourceNames |
CreateVirtualDirectory(IGrouping<String, String[]>)
View Source
protected virtual ResourceVirtualDirectory CreateVirtualDirectory(IGrouping<string, string[]> subResources)
Returns
ServiceStack.VirtualPath.ResourceVirtualDirectory
Parameters
Type | Name |
---|---|
System.Linq.IGrouping<System.String,System.String[]> | subResources |
CreateVirtualFile(String)
View Source
protected virtual ResourceVirtualFile CreateVirtualFile(string resourceName)
Returns
ServiceStack.VirtualPath.ResourceVirtualFile
Parameters
Type | Name |
---|---|
System.String | resourceName |
ConsumeTokensForVirtualDir(Stack<String>)
View Source
protected virtual ResourceVirtualDirectory ConsumeTokensForVirtualDir(Stack<string> resourceTokens)
Returns
ServiceStack.VirtualPath.ResourceVirtualDirectory
Parameters
Type | Name |
---|---|
System.Collections.Generic.Stack<System.String> | resourceTokens |
GetEnumerator()
View Source
public override IEnumerator<IVirtualNode> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<ServiceStack.IO.IVirtualNode>
GetFileFromBackingDirectoryOrDefault(String)
View Source
protected override IVirtualFile GetFileFromBackingDirectoryOrDefault(string fileName)
Returns
Parameters
Type | Name |
---|---|
System.String | fileName |
TranslatePath(String)
View Source
public string TranslatePath(string path)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | path |
GetMatchingFilesInDir(String)
View Source
protected override IEnumerable<IVirtualFile> GetMatchingFilesInDir(string globPattern)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
System.String | globPattern |
GetDirectoryFromBackingDirectoryOrDefault(String)
View Source
protected override IVirtualDirectory GetDirectoryFromBackingDirectoryOrDefault(string directoryName)
Returns
ServiceStack.IO.IVirtualDirectory
Parameters
Type | Name |
---|---|
System.String | directoryName |
GetRealPathToRoot()
View Source
protected override string GetRealPathToRoot()
Returns
System.String
Inherited Methods
Equals(Object)
View Source
public override bool Equals(object obj)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Object | obj |
GetAllMatchingFiles(String, Int32)
View Source
public virtual IEnumerable<IVirtualFile> GetAllMatchingFiles(string globPattern, int maxDepth = 2147483647)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
System.String | globPattern |
System.Int32 | maxDepth |
GetDirectory(Stack<String>)
View Source
public virtual IVirtualDirectory GetDirectory(Stack<string> virtualPath)
Returns
ServiceStack.IO.IVirtualDirectory
Parameters
Type | Name |
---|---|
System.Collections.Generic.Stack<System.String> | virtualPath |
GetDirectory(String)
View Source
public virtual IVirtualDirectory GetDirectory(string virtualPath)
Returns
ServiceStack.IO.IVirtualDirectory
Parameters
Type | Name |
---|---|
System.String | virtualPath |
GetDirectoryFromBackingDirectoryOrDefault(String)
View Source
protected abstract IVirtualDirectory GetDirectoryFromBackingDirectoryOrDefault(string directoryName)
Returns
ServiceStack.IO.IVirtualDirectory
Parameters
Type | Name |
---|---|
System.String | directoryName |
GetEnumerator()
View Source
public abstract IEnumerator<IVirtualNode> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<ServiceStack.IO.IVirtualNode>
GetFile(Stack<String>)
View Source
public virtual IVirtualFile GetFile(Stack<string> virtualPath)
Returns
Parameters
Type | Name |
---|---|
System.Collections.Generic.Stack<System.String> | virtualPath |
GetFile(String)
View Source
public virtual IVirtualFile GetFile(string virtualPath)
Returns
Parameters
Type | Name |
---|---|
System.String | virtualPath |
GetFileFromBackingDirectoryOrDefault(String)
View Source
protected abstract IVirtualFile GetFileFromBackingDirectoryOrDefault(string fileName)
Returns
Parameters
Type | Name |
---|---|
System.String | fileName |
GetHashCode()
View Source
public override int GetHashCode()
Returns
System.Int32
GetMatchingFilesInDir(String)
View Source
protected abstract IEnumerable<IVirtualFile> GetMatchingFilesInDir(string globPattern)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
System.String | globPattern |
GetPathToRoot(String, Func<IVirtualDirectory, String>)
View Source
protected virtual string GetPathToRoot(string separator, Func<IVirtualDirectory, string> pathSel)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | separator |
System.Func<ServiceStack.IO.IVirtualDirectory,System.String> | pathSel |
GetRealPathToRoot()
View Source
protected virtual string GetRealPathToRoot()
Returns
System.String
GetVirtualPathToRoot()
View Source
protected virtual string GetVirtualPathToRoot()
Returns
System.String
IEnumerable.GetEnumerator()
View Source
IEnumerator IEnumerable.GetEnumerator()
Returns
System.Collections.IEnumerator
ToString()
View Source
public override string ToString()
Returns
System.String
Implements
- ServiceStack.IO.IVirtualDirectory
- ServiceStack.IO.IVirtualNode
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualNode>
System.Collections.IEnumerable