private ModPropsRequestBody BuildModPropsRequestBody(bool hasState, STAT stat, bool hasPropertyValues, PropertyTag propertyTag, bool hasPropertyTagsToRemove, LargePropertyTagArray propertyTagsToRemove)
{
ModPropsRequestBody modPropsRequestBody = new ModPropsRequestBody();
modPropsRequestBody.Reserved = 0x0;
byte[] auxIn = new byte[] { };
modPropsRequestBody.AuxiliaryBuffer = auxIn;
modPropsRequestBody.AuxiliaryBufferSize = (uint)auxIn.Length;
modPropsRequestBody.HasState = hasState;
if (hasState)
{
modPropsRequestBody.State = stat;
}
modPropsRequestBody.HasPropertyValues = hasPropertyValues;
if (hasPropertyValues)
{
AddressBookPropertyValueList addressBookProperties = new AddressBookPropertyValueList();
addressBookProperties.PropertyValueCount = 1;
AddressBookTaggedPropertyValue[] taggedPropertyValues = new AddressBookTaggedPropertyValue[1];
AddressBookTaggedPropertyValue taggedPropertyValue = new AddressBookTaggedPropertyValue();
taggedPropertyValue.PropertyType = propertyTag.PropertyType;
taggedPropertyValue.PropertyId = propertyTag.PropertyId;
taggedPropertyValue.Value = new byte[] { 0x00, 0x00 };
taggedPropertyValues[0] = taggedPropertyValue;
addressBookProperties.PropertyValues = taggedPropertyValues;
modPropsRequestBody.PropertyVaules = addressBookProperties;
}
modPropsRequestBody.HasPropertyTagsToRemove = hasPropertyTagsToRemove;
if (hasPropertyTagsToRemove)
{
modPropsRequestBody.PropertyTagsToRemove = propertyTagsToRemove;
}
return modPropsRequestBody;
}