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 MsgStorageReader OpenAttachedMessage() { if (this.attachMethod != 5) { throw new InvalidOperationException(MsgStorageStrings.NotAMessageAttachment); } ComStorage comStorage = null; MsgStorageReader msgStorageReader = null; try { string storageName = Util.PropertyStreamName(TnefPropertyTag.AttachDataObj); comStorage = this.propertiesStorage.OpenStorage(storageName, ComStorage.OpenMode.Read); msgStorageReader = new MsgStorageReader(comStorage, this.owner.NamedPropertyList, this.MessageEncoding); } finally { if (comStorage != null && msgStorageReader == null) { comStorage.Dispose(); } } return(msgStorageReader); }
internal MsgStoragePropertyReader(MsgStorageReader reader) { this.Reader = reader; }