GetMapiProperty() public method

Gets the raw value of the MAPI property.
public GetMapiProperty ( string propIdentifier ) : object
propIdentifier string The 4 char hexadecimal prop identifier.
return object
Beispiel #1
0
 /// <summary>
 /// Populates the extended data for a message
 /// </summary>
 /// <param name="message"></param>
 private void PopulateData(OutlookStorage.Message message)
 {
     data.Text = "";
     foreach (string key in message.streamStatistics.Keys)
     {
         string hexKey = key.Substring(12, 4);
         try
         {
             object property = message.GetMapiProperty(hexKey);
             if (property == null)
             {
                 data.AppendText((string.Format("Key {0} is null{1}", hexKey, Environment.NewLine)));
             }
             else if (property is byte[])
             {
                 data.AppendText(string.Format("Key {0} is a byte array{1}", hexKey, Environment.NewLine));
             }
             else
             {
                 data.AppendText(string.Format("{0}: {1}{2}", hexKey, property.ToString(), Environment.NewLine));
             }
         }
         catch
         {
             data.AppendText(string.Format("Key {0} threw an exception{1}", hexKey, Environment.NewLine));
         }
     }
 }