protected override void SetValidatedStoreProperty(StorePropertyDefinition propertyDefinition, object propertyValue)
 {
     SchemaConverter.Setter setter = this.schemaConverter.GetSetter(propertyDefinition);
     if (!this.isReadOnly && setter != null)
     {
         setter((IPropertyBag)this.underlyingPropertyBag, ExTimeZoneHelperForMigrationOnly.ToUtcIfDateTime(propertyValue));
         return;
     }
     throw PropertyError.ToException(new PropertyError[]
     {
         new PropertyError(propertyDefinition, PropertyErrorCode.NotSupported)
     });
 }
Пример #2
0
        private static void WriteRecipient(BinaryWriter writer, BlobRecipient recipient)
        {
            List <PropValue> list = new List <PropValue>(recipient.PropertyValues.Count);

            foreach (PropValue item in PropValue.ConvertEnumerator <PropertyDefinition>(recipient.PropertyValues))
            {
                if (!PropertyError.IsPropertyError(item.Value) && !((PropTag)((PropertyTagPropertyDefinition)item.Property).PropertyTag).IsNamedProperty())
                {
                    list.Add(item);
                }
            }
            uint count = (uint)list.Count;
            uint value = 0U;

            writer.Write(count);
            writer.Write(value);
            foreach (PropValue propValue in list)
            {
                PropertyTagPropertyDefinition propertyTagPropertyDefinition = (PropertyTagPropertyDefinition)propValue.Property;
                object value2 = ExTimeZoneHelperForMigrationOnly.ToUtcIfDateTime(propValue.Value);
                BlobRecipientParser.WritePropValue(writer, (PropTag)propertyTagPropertyDefinition.PropertyTag, value2);
            }
        }