当前位置: 首页>>代码示例>>C#>>正文


C# IVirtualDirectory类代码示例

本文整理汇总了C#中IVirtualDirectory的典型用法代码示例。如果您正苦于以下问题:C# IVirtualDirectory类的具体用法?C# IVirtualDirectory怎么用?C# IVirtualDirectory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IVirtualDirectory类属于命名空间,在下文中一共展示了IVirtualDirectory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: setup

        public void setup()
        {
            _provider = new DirectoryVirtualFileProvider();
            _root = MockRepository.GenerateMock<IVirtualDirectory>();

            _provider.Setup(_root);
        }
开发者ID:Epibatidin,项目名称:FLUX,代码行数:7,代码来源:DirectoryVirtualFileProviderTests.cs

示例2: InMemoryVirtualDirectory

 public InMemoryVirtualDirectory(IVirtualPathProvider owningProvider, IVirtualDirectory parentDirectory)
     : base(owningProvider, parentDirectory)
 {
     this.files = new List<InMemoryVirtualFile>();
     this.dirs = new List<InMemoryVirtualDirectory>();
     this.DirLastModified = DateTime.MinValue;
 }
开发者ID:RainsSoft,项目名称:VirtualPath,代码行数:7,代码来源:InMemoryVirtualPathProvider.cs

示例3: AzureBlobVirtualFile

        public AzureBlobVirtualFile(AzureBlobVirtualPathProvider owningProvider, IVirtualDirectory directory)
            : base(owningProvider, directory)
        {
            this.pathProvider = owningProvider;
            this.container = pathProvider.Container;

        }
开发者ID:jklemmack,项目名称:ServiceStack.Azure,代码行数:7,代码来源:AzureBlobVirtualFile.cs

示例4: GetTemplatePath

        public string GetTemplatePath(IVirtualDirectory fileDir)
        {
            try
            {
                if (templatePathsNotFound.Contains(fileDir.VirtualPath)) return null;

                var templateDir = fileDir;
                IVirtualFile templateFile;
                while (templateDir != null && templateDir.GetFile(defaultTemplateName) == null)
                {
                    if (templatePathsFound.TryGetValue(templateDir.VirtualPath, out templateFile))
                        return templateFile.RealPath;

                    templateDir = templateDir.ParentDirectory;
                }

                if (templateDir != null)
                {
                    templateFile = templateDir.GetFile(defaultTemplateName);
                    templatePathsFound[templateDir.VirtualPath] = templateFile;
                    return templateFile.VirtualPath;
                }

                templatePathsNotFound.Add(fileDir.VirtualPath);
                return null;

            }
            catch (Exception ex)
            {
                ex.Message.Print();
                throw;
            }
        }
开发者ID:erewh0n,项目名称:ServiceStack,代码行数:33,代码来源:TemplateProvider.cs

示例5: FileSystemVirtualDirectory

        public FileSystemVirtualDirectory(IVirtualPathProvider owningProvider, IVirtualDirectory parentDirectory, DirectoryInfo dInfo)
            : base(owningProvider, parentDirectory)
        {
            if (dInfo == null)
                throw new ArgumentNullException("dInfo");

            this.BackingDirInfo = dInfo;
        }
开发者ID:JonCanning,项目名称:ServiceStack,代码行数:8,代码来源:FileSystemVirtualDirectory.cs

示例6: AbstractVirtualDirectoryBase

        protected AbstractVirtualDirectoryBase(IVirtualPathProvider owningProvider, IVirtualDirectory parentDirectory)
        {
            if (owningProvider == null)
                throw new ArgumentNullException("owningProvider");

            this.VirtualPathProvider = owningProvider;
            this.ParentDirectory = parentDirectory;
        }
开发者ID:GDBSD,项目名称:ServiceStack,代码行数:8,代码来源:AbstractVirtualDirectoryBase.cs

示例7: FileSystemVirtualFile

        public FileSystemVirtualFile(IVirtualPathProvider owningProvider, IVirtualDirectory directory, FileInfo fInfo) 
            : base(owningProvider, directory)
        {
            if (fInfo == null)
                throw new ArgumentNullException("fInfo");

            this.BackingFile = fInfo;
        }
开发者ID:JonCanning,项目名称:ServiceStack,代码行数:8,代码来源:FileSystemVirtualFile.cs

示例8: SftpVirtualFile

 public SftpVirtualFile(SftpVirtualPathProvider owningProvider, IVirtualDirectory directory, string name, DateTime? lastModified)
     : base(owningProvider, directory)
 {
     this.Provider = owningProvider;
     this._name = name;
     this._lastModified = lastModified ?? DateTime.MinValue;
     this.File = new Lazy<SftpFile>(() => _file ?? Provider.GetSftpFile(this.VirtualPath));
 }
开发者ID:RainsSoft,项目名称:VirtualPath,代码行数:8,代码来源:SftpVirtualFile.cs

示例9: SftpVirtualDirectory

 public SftpVirtualDirectory(SftpVirtualPathProvider owningProvider, IVirtualDirectory parentDirectory, 
     String name = null, DateTime? lastModified = null)
     : base(owningProvider, parentDirectory)
 {
     this.Provider = owningProvider;
     _name = name;
     _lastModified = lastModified ?? DateTime.MinValue;
 }
开发者ID:RainsSoft,项目名称:VirtualPath,代码行数:8,代码来源:SftpVirtualDirectory.cs

示例10: ResourceVirtualDirectory

 public ResourceVirtualDirectory(IVirtualPathProvider owningProvider, 
     IVirtualDirectory parentDir, 
     Assembly backingAsm, 
     string rootNamespace)
 : this(owningProvider, 
     parentDir, 
     backingAsm, 
     rootNamespace,
     rootNamespace, 
     GetResourceNames(backingAsm, rootNamespace)) { }
开发者ID:CLupica,项目名称:ServiceStack,代码行数:10,代码来源:ResourceVirtualDirectory.cs

示例11: getCounts

        private int[] getCounts(IVirtualDirectory subroot, int[] subRoots)
        {
            var index = subroot.GetFile("Index.xml");
            XmlSerializer ser = new XmlSerializer(typeof(Root));
            var o = ser.Deserialize(index.Open());
            var root =  o as Root;

            if (subRoots == null || subRoots.Length == 0)
                subRoots = Enumerable.Range(0, root.Groups).ToArray();

            return subRoots;
        }
开发者ID:Epibatidin,项目名称:FLUX,代码行数:12,代码来源:XMLVirtualFileProvider.cs

示例12: AbstractVirtualFileBase

        protected AbstractVirtualFileBase(
            IVirtualPathProvider owningProvider, IVirtualDirectory directory)
        {
            if (owningProvider == null)
                throw new ArgumentNullException("owningProvider");

            if (directory == null)
                throw new ArgumentNullException("directory");

            this.VirtualPathProvider = owningProvider;
            this.Directory = directory;
        }
开发者ID:JonCanning,项目名称:ServiceStack,代码行数:12,代码来源:AbstractVirtualFileBase.cs

示例13: CopyBackingFileToDirectory

 protected override IVirtualFile CopyBackingFileToDirectory(IVirtualDirectory directory, string name)
 {
     if (directory is FileSystemVirtualDirectory)
     {
         var copyFInfo = BackingFile.CopyTo(Path.Combine(directory.RealPath, name), true);
         return new FileSystemVirtualFile(VirtualPathProvider, directory, copyFInfo);
     }
     else
     {
         return directory.CopyFile(this, name);
     }
 }
开发者ID:RainsSoft,项目名称:VirtualPath,代码行数:12,代码来源:FileSystemVirtualFile.cs

示例14: MoveBackingFileToDirectory

 protected override IVirtualFile MoveBackingFileToDirectory(IVirtualDirectory directory, string name)
 {
     if (directory is FileSystemVirtualDirectory)
     {
         BackingFile.MoveTo(Path.Combine(directory.RealPath, name));
         return new FileSystemVirtualFile(VirtualPathProvider, directory, BackingFile);
     }
     else
     {
         var newFile = directory.CopyFile(this, name);
         this.Delete();
         return newFile;
     }
 }
开发者ID:RainsSoft,项目名称:VirtualPath,代码行数:14,代码来源:FileSystemVirtualFile.cs

示例15: ResourceVirtualDirectory

        public ResourceVirtualDirectory(IVirtualPathProvider owningProvider, IVirtualDirectory parentDir, Assembly backingAsm, String directoryName, IEnumerable<String> manifestResourceNames)
            : base(owningProvider, parentDir)
        {
            if (backingAsm == null)
                throw new ArgumentNullException("backingAsm");

            if (string.IsNullOrEmpty(directoryName))
                throw new ArgumentException("directoryName");

            this.backingAssembly = backingAsm;
            this.DirectoryName = directoryName;

            InitializeDirectoryStructure(manifestResourceNames);
        }
开发者ID:Qasemt,项目名称:NServiceKit,代码行数:14,代码来源:ResourceVirtualDirectory.cs


注:本文中的IVirtualDirectory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。