Beispiel #1
0
        protected virtual ResourceVirtualDirectory CreateVirtualDirectory(IGrouping <string, string[]> subResources)
        {
            var remainingResourceNames = subResources.Select(g => g[1]);
            var subDir = new ResourceVirtualDirectory(
                VirtualPathProvider, this, backingAssembly, subResources.Key, remainingResourceNames);

            return(subDir);
        }
        public ResourceVirtualFile(IVirtualPathProvider owningProvider, ResourceVirtualDirectory directory, string fileName)
            : base(owningProvider, directory)
        {
            if (string.IsNullOrEmpty(fileName))
            {
                throw new ArgumentException("fileName");
            }

            if (directory.BackingAssembly == null)
            {
                throw new ArgumentException("parentDirectory");
            }

            this.FileName        = fileName;
            this.BackingAssembly = directory.BackingAssembly;
        }
        protected override sealed void Initialize()
        {
            var asm = BackingAssembly ?? AppHost.GetType().Assembly;

            RootDir = new ResourceVirtualDirectory(this, null, asm);
        }