private void Initialize(MsgSubStorageType type) { this.messageStorage.StorageClass = Util.ClassIdMessage; this.lengthsBuffer = new MsgSubStorageWriter.WriterBuffer(512); this.valueBuffer = new MsgSubStorageWriter.WriterBuffer(2048); this.componentWriter = null; this.lastFailure = null; this.messageWriter = new MsgSubStorageWriter(this, type, this.messageStorage); }
internal MsgSubStorageWriter(MsgStorageWriter owner, MsgSubStorageType type, ComStorage subStorage) { this.owner = owner; this.subStorage = subStorage; this.subStorageType = type; this.attachMethod = -1; this.propertiesCache = new MemoryStream(); this.propertiesWriter = new BinaryWriter(this.propertiesCache); this.prefix = new MsgStoragePropertyPrefix(type); this.prefix.Write(this.propertiesWriter); }
private void OpenSubStorage(string subStorageName, MsgSubStorageType type) { ComStorage comStorage = null; try { comStorage = this.messageStorage.OpenStorage(subStorageName, ComStorage.OpenMode.Read); MsgSubStorageReader msgSubStorageReader = new MsgSubStorageReader(this, comStorage, this.encoding, type); if (this.subStorage != null) { this.subStorage.Dispose(); } this.subStorage = comStorage; this.subStorageParser = msgSubStorageReader; comStorage = null; } finally { if (comStorage != null) { comStorage.Dispose(); } } }
internal MsgSubStorageReader(MsgStorageReader owner, ComStorage propertiesStorage, Encoding messageEncoding, MsgSubStorageType subStorageType) { this.owner = owner; this.propertiesStorage = propertiesStorage; this.messageEncoding = messageEncoding; this.subStorageType = subStorageType; this.ReadPropertiesStream(); }
internal MsgStoragePropertyPrefix(MsgSubStorageType substorageType) { this.substorageType = substorageType; }