Пример #1
0
        private IEnumerable <String> embeddedFileList()
        {
            String               filter;
            Assembly             assembly = EmbeddedResourceArchive.GetAssemblyAndArgs(LocName, out filter);
            IEnumerable <String> files    = assembly.GetManifestResourceNames().Where(f => f.EndsWith(".jsonmat", StringComparison.OrdinalIgnoreCase));

            if (filter != null)
            {
                files = files.Where((f) => f.StartsWith(filter));
            }
            return(files);
        }
Пример #2
0
        private Stream openStream(String file)
        {
            switch (ArchiveType)
            {
            case "EngineArchive":
                return(VirtualFileSystem.Instance.openStream(file, Engine.Resources.FileMode.Open, Engine.Resources.FileAccess.Read));

            case "EmbeddedScalableResource":     //Material resources do not do "scaling" in the way EmbeddedScalableResource does so handle them the same
            case "EmbeddedResource":
                Assembly assembly = EmbeddedResourceArchive.GetAssemblyAndArgs(LocName);
                return(assembly.GetManifestResourceStream(file));

            default:
                return(new MemoryStream());
            }
        }