internal PluginFileOutput(string filePath, PluginFile plugin) { this.filePath = filePath; this.plugin = plugin; fileStream = File.OpenWrite(filePath); fileWriter = new BinaryWriter(fileStream); }
public void Add(PluginFile file, MainRecord record) { if (!_plugins.ContainsKey(file)) { AddMap(file); } _plugins[file].Add(record); }
internal PluginFileSource(string filePath, PluginFile plugin) { this.filePath = filePath; this.plugin = plugin; fileInfo = new FileInfo(filePath); plugin.source = this; var baseStream = new FileStream( filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite ); file = MemoryMappedFile.CreateFromFile( baseStream, null, 0, MemoryMappedFileAccess.Read, HandleInheritability.None, false ); fileStream = file.CreateViewStream( 0, 0, MemoryMappedFileAccess.Read ); fileReader = new BinaryReader(stream); }
public FormIdMap GetMap(PluginFile file) { return(_plugins[file]); }
public void AddMap(PluginFile file) { _plugins[file] = new FormIdMap(); }