예제 #1
0
 internal MsgSubStorageReader(MsgStorageReader owner, ComStorage propertiesStorage, Encoding messageEncoding, MsgSubStorageType subStorageType)
 {
     this.owner             = owner;
     this.propertiesStorage = propertiesStorage;
     this.messageEncoding   = messageEncoding;
     this.subStorageType    = subStorageType;
     this.ReadPropertiesStream();
 }
예제 #2
0
        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);
        }
예제 #3
0
 internal MsgStoragePropertyReader(MsgStorageReader reader)
 {
     this.Reader = reader;
 }