private TaggedPropertyValue[] CreateMessageTaggedPropertyValueArray(out int size)
{
int arraySize = 0;
TaggedPropertyValue[] result = new TaggedPropertyValue[2];
// The following settings are from MS-OXOMSG 4.4.
// PidTagBody
result[0] = new TaggedPropertyValue
{
PropertyTag =
{
PropertyId = this.propertyDictionary[PropertyNames.PidTagBody].PropertyId,
PropertyType = this.propertyDictionary[PropertyNames.PidTagBody].PropertyType
},
Value = Encoding.Unicode.GetBytes("Sign the order request.\0")
};
// PidTagMessageClass
result[1] = new TaggedPropertyValue
{
PropertyTag =
{
PropertyId = this.propertyDictionary[PropertyNames.PidTagMessageClass].PropertyId,
PropertyType = this.propertyDictionary[PropertyNames.PidTagMessageClass].PropertyType
},
Value = Encoding.ASCII.GetBytes("50\0")
};
for (int i = 0; i < result.Length; i++)
{
arraySize += result[i].Size();
}
size = arraySize;
return result;
}