private void WriteRecipientProperty(ConversionRecipientEntry recipient, NativeStorePropertyDefinition property)
        {
            object obj = recipient.TryGetProperty(property);

            if (!PropertyError.IsPropertyError(obj))
            {
                this.WriteProperty(property, obj);
            }
        }
Exemple #2
0
        private bool WriteRecipientProperty(ConversionRecipientEntry recipient, NativeStorePropertyDefinition property)
        {
            object obj = recipient.TryGetProperty(property);

            if (!PropertyError.IsPropertyError(obj))
            {
                obj = ExTimeZoneHelperForMigrationOnly.ToLegacyUtcIfDateTime(obj);
                this.tnefWriter.WriteProperty(property, obj);
                return(true);
            }
            return(false);
        }
        private void CopyRecipientToMessage(ICoreItem coreItem, ConversionRecipientEntry entry)
        {
            CoreRecipient coreRecipient = coreItem.Recipients.CreateCoreRecipient(new CoreRecipient.SetDefaultPropertiesDelegate(Recipient.SetDefaultRecipientProperties), entry.Participant);

            coreRecipient.RecipientItemType = entry.RecipientItemType;
            foreach (NativeStorePropertyDefinition nativeStorePropertyDefinition in entry.AllNativeProperties)
            {
                object obj = entry.TryGetProperty(nativeStorePropertyDefinition);
                coreRecipient.PropertyBag.TryGetProperty(nativeStorePropertyDefinition);
                if (!(obj is PropertyError) && !RecipientBase.ImmutableProperties.Contains(nativeStorePropertyDefinition))
                {
                    coreRecipient.PropertyBag.SetProperty(nativeStorePropertyDefinition, obj);
                }
            }
            coreRecipient.InternalUpdateParticipant(entry.Participant);
        }
Exemple #4
0
 internal void CopyDependentProperties(ConversionRecipientEntry dependentEntry)
 {
     if (dependentEntry == null)
     {
         return;
     }
     foreach (NativeStorePropertyDefinition property in dependentEntry.AllNativeProperties)
     {
         object obj = dependentEntry.TryGetProperty(property);
         if (obj != null && !(obj is PropertyError))
         {
             this.SetProperty(property, obj, false);
         }
     }
     foreach (PropertyDefinition propertyDefinition in dependentEntry.propertyValues.DeleteList)
     {
         StorePropertyDefinition property2 = (StorePropertyDefinition)propertyDefinition;
         this.DeleteProperty(property2, false);
     }
 }