Esempio n. 1
0
 public void WriteProperty(TnefPropertyTag propertyTag, object propertyValue)
 {
     this.CheckDisposed("MsgStorageWriter::WriteProperty(1)");
     if (propertyTag.IsNamed)
     {
         throw new ArgumentException(MsgStorageStrings.InvalidPropertyTag(propertyTag), "propertyTag");
     }
     MsgStorageRulesTable.ThrowOnInvalidPropertyType(propertyTag);
     Util.ThrowOnNullArgument(propertyValue, "propertyValue");
     this.CheckFailure();
     this.CurrentWriter.WriteProperty(propertyTag, propertyValue);
 }
Esempio n. 2
0
 public Stream OpenPropertyStream(TnefPropertyTag propertyTag)
 {
     this.CheckDisposed("MsgStorageWriter::OpenPropertyStream(1)");
     if (propertyTag.IsNamed)
     {
         throw new ArgumentException(MsgStorageStrings.InvalidPropertyTag(propertyTag), "propertyTag");
     }
     MsgStorageRulesTable.ThrowOnInvalidPropertyType(propertyTag);
     this.CheckFailure();
     if (propertyTag == TnefPropertyTag.AttachDataObj)
     {
         return(this.CurrentWriter.OpenOleAttachmentStream());
     }
     return(this.CurrentWriter.OpenPropertyStream(propertyTag));
 }