internal static WebFileScheme ReadScheme(Stream stream, string filePath) { WebFileScheme scheme = new WebFileScheme(filePath); scheme.ReadScheme(stream); return(scheme); }
internal static WebFileScheme ReadScheme(SmartStream stream, long offset, long size, string filePath, string fileName) { WebFileScheme scheme = new WebFileScheme(stream, offset, size, filePath, fileName); scheme.ReadScheme(); scheme.ProcessEntries(); return(scheme); }
internal WebFile(IFileCollection collection, WebFileScheme scheme) { if (scheme == null) { throw new ArgumentNullException(nameof(scheme)); } Header = scheme.Header; Metadata = scheme.Metadata; }
internal static WebFileScheme ReadScheme(byte[] buffer, string filePath) { WebFileScheme scheme = new WebFileScheme(filePath); using (MemoryStream stream = new MemoryStream(buffer, 0, buffer.Length, false)) { scheme.ReadScheme(stream); } return(scheme); }
internal void AddFile(FileScheme scheme, IFileCollection collection, IAssemblyManager manager) { switch (scheme.SchemeType) { case FileEntryType.Serialized: { SerializedFileScheme serializedScheme = (SerializedFileScheme)scheme; SerializedFile file = serializedScheme.ReadFile(collection, manager); m_serializedFiles.Add(file); OnSerializedFileAdded(file); } break; case FileEntryType.Bundle: { BundleFileScheme bundleScheme = (BundleFileScheme)scheme; BundleFile bundle = bundleScheme.ReadFile(collection, manager); m_fileLists.Add(bundle); OnFileListAdded(bundle); } break; case FileEntryType.Archive: { ArchiveFileScheme archiveScheme = (ArchiveFileScheme)scheme; ArchiveFile archive = archiveScheme.ReadFile(collection, manager); m_fileLists.Add(archive); OnFileListAdded(archive); } break; case FileEntryType.Web: { WebFileScheme webScheme = (WebFileScheme)scheme; WebFile webFile = webScheme.ReadFile(collection, manager); m_fileLists.Add(webFile); OnFileListAdded(webFile); } break; case FileEntryType.Resource: { ResourceFileScheme resourceScheme = (ResourceFileScheme)scheme; ResourceFile resource = resourceScheme.ReadFile(); m_resourceFiles.Add(resource); OnResourceFileAdded(resource); } break; default: throw new NotSupportedException(scheme.SchemeType.ToString()); } }
internal void AddFile(GameProcessorContext context, FileScheme scheme) { switch (scheme.SchemeType) { case FileEntryType.Serialized: { SerializedFileScheme serializedScheme = (SerializedFileScheme)scheme; SerializedFile file = serializedScheme.ReadFile(context); AddSerializedFile(file); } break; case FileEntryType.Bundle: { BundleFileScheme bundleScheme = (BundleFileScheme)scheme; BundleFile bundle = bundleScheme.ReadFile(context); AddFileList(bundle); } break; case FileEntryType.Archive: { ArchiveFileScheme archiveScheme = (ArchiveFileScheme)scheme; ArchiveFile archive = archiveScheme.ReadFile(context); AddFileList(archive); } break; case FileEntryType.Web: { WebFileScheme webScheme = (WebFileScheme)scheme; WebFile webFile = webScheme.ReadFile(context); AddFileList(webFile); } break; case FileEntryType.Resource: { ResourceFileScheme resourceScheme = (ResourceFileScheme)scheme; ResourceFile resource = resourceScheme.ReadFile(); AddResourceFile(resource); } break; default: throw new NotSupportedException(scheme.SchemeType.ToString()); } }
public static WebFileScheme ReadScheme(SmartStream stream, long offset, long size, string filePath, string fileName) { return(WebFileScheme.ReadScheme(stream, offset, size, filePath, fileName)); }
internal WebFile(WebFileScheme scheme) : base(scheme.NameOrigin) { Header = scheme.Header; Metadata = scheme.Metadata; }
public static WebFileScheme ReadScheme(SmartStream stream, string filePath) { return(WebFileScheme.ReadScheme(stream, filePath)); }
public static WebFileScheme ReadScheme(byte[] buffer, string filePath) { return(WebFileScheme.ReadScheme(buffer, filePath)); }
internal WebFile(WebFileScheme scheme) { Header = scheme.Header; Metadata = scheme.Metadata; }