Exemplo n.º 1
0
        protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value)
        {
            base.InternalSetValue(propertyBag, value);
            Participant        participant        = (Participant)value;
            ParticipantEntryId participantEntryId = ParticipantEntryId.FromParticipant(participant, ParticipantEntryIdConsumer.RecipientTablePrimary);

            if (participantEntryId != null)
            {
                propertyBag.SetValueWithFixup(InternalSchema.EntryId, participantEntryId.ToByteArray());
            }
            else
            {
                propertyBag.Delete(InternalSchema.EntryId);
            }
            RecipientDisplayType?      valueAsNullable  = participant.GetValueAsNullable <RecipientDisplayType>(ParticipantSchema.DisplayTypeEx);
            LegacyRecipientDisplayType?valueAsNullable2 = participant.GetValueAsNullable <LegacyRecipientDisplayType>(ParticipantSchema.DisplayType);

            if (participant.RoutingType != null)
            {
                propertyBag.Update(InternalSchema.TransmitableDisplayName, participant.DisplayName);
                if (valueAsNullable2 == null)
                {
                    valueAsNullable2 = new LegacyRecipientDisplayType?(LegacyRecipientDisplayType.MailUser);
                }
            }
            else
            {
                propertyBag.Delete(InternalSchema.TransmitableDisplayName);
            }
            AtomicStorePropertyDefinition displayTypeExInternal = InternalSchema.DisplayTypeExInternal;
            RecipientDisplayType?         recipientDisplayType  = valueAsNullable;

            propertyBag.Update(displayTypeExInternal, (recipientDisplayType != null) ? new int?((int)recipientDisplayType.GetValueOrDefault()) : null);
            AtomicStorePropertyDefinition displayType = InternalSchema.DisplayType;
            LegacyRecipientDisplayType?   legacyRecipientDisplayType = valueAsNullable2;

            propertyBag.Update(displayType, (legacyRecipientDisplayType != null) ? new int?((int)legacyRecipientDisplayType.GetValueOrDefault()) : null);
            if (valueAsNullable2 != null)
            {
                if (valueAsNullable2 == LegacyRecipientDisplayType.DistributionList || valueAsNullable2 == LegacyRecipientDisplayType.PersonalDistributionList)
                {
                    propertyBag.SetValueWithFixup(InternalSchema.ObjectType, 8);
                }
                else
                {
                    propertyBag.SetValueWithFixup(InternalSchema.ObjectType, 6);
                }
            }
            else
            {
                propertyBag.Delete(InternalSchema.ObjectType);
            }
            propertyBag.SetValueWithFixup(InternalSchema.SendRichInfo, participant.GetValueOrDefault <bool>(ParticipantSchema.SendRichInfo));
            propertyBag.Update(InternalSchema.SendInternetEncoding, participant.GetValueAsNullable <int>(ParticipantSchema.SendInternetEncoding));
        }
Exemplo n.º 2
0
        private static void CompleteFlagStatus(PropertyBag.BasicPropertyStore propertyBag)
        {
            string valueOrDefault = propertyBag.GetValueOrDefault <string>(InternalSchema.ItemClass, string.Empty);

            if (ObjectClass.IsMeetingMessage(valueOrDefault))
            {
                propertyBag.Delete(InternalSchema.MapiFlagStatus);
                propertyBag.Delete(InternalSchema.ItemColor);
                propertyBag.SetValueWithFixup(InternalSchema.TaskStatus, TaskStatus.Completed);
                return;
            }
            propertyBag.SetValueWithFixup(InternalSchema.MapiFlagStatus, FlagStatus.Complete);
            propertyBag.SetValueWithFixup(InternalSchema.TaskStatus, TaskStatus.Completed);
            propertyBag.Delete(InternalSchema.ItemColor);
        }
        protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value)
        {
            Participant        participant        = (Participant)value;
            ParticipantEntryId participantEntryId = ParticipantEntryId.FromParticipant(participant, ParticipantEntryIdConsumer.ContactEmailSlot);

            propertyBag.SetValueWithFixup(base.DisplayNamePropertyDefinition, participant.DisplayName ?? string.Empty);
            propertyBag.SetValueWithFixup(base.EmailAddressPropertyDefinition, participant.EmailAddress ?? string.Empty);
            propertyBag.SetValueWithFixup(base.RoutingTypePropertyDefinition, participant.RoutingType ?? string.Empty);
            if (this.emailAddressForDisplayPropDef != null)
            {
                AtomicStorePropertyDefinition propertyDefinition = this.emailAddressForDisplayPropDef;
                string propertyValue;
                if ((propertyValue = participant.GetValueOrDefault <string>(ParticipantSchema.EmailAddressForDisplay)) == null)
                {
                    propertyValue = (participant.EmailAddress ?? string.Empty);
                }
                propertyBag.SetValueWithFixup(propertyDefinition, propertyValue);
            }
            if (participantEntryId != null)
            {
                propertyBag.SetValueWithFixup(base.EntryIdPropertyDefinition, participantEntryId.ToByteArray());
                return;
            }
            propertyBag.Delete(base.EntryIdPropertyDefinition);
        }
Exemplo n.º 4
0
        protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value)
        {
            ExTimeZone exTimeZone = value as ExTimeZone;

            if (exTimeZone == ExTimeZone.UnspecifiedTimeZone)
            {
                throw new InvalidOperationException("unspecified time zone is not allowed to set");
            }
            StartTimeZoneProperty.RecalculateNormalizedTimeProperty(propertyBag, InternalSchema.MapiStartTime, InternalSchema.MapiPRStartDate, exTimeZone);
            StartTimeZoneProperty.RecalculateNormalizedTimeProperty(propertyBag, InternalSchema.MapiEndTime, InternalSchema.MapiPREndDate, exTimeZone);
            StartTimeZoneProperty.RecalculateNormalizedTimeProperty(propertyBag, InternalSchema.ReminderNextTime, null, exTimeZone);
            if (exTimeZone == ExTimeZone.UtcTimeZone)
            {
                if (!(propertyBag.Context.StoreObject is CalendarItemOccurrence))
                {
                    propertyBag.Delete(InternalSchema.TimeZoneDefinitionStart);
                    return;
                }
            }
            else
            {
                byte[] timeZoneBlob = O12TimeZoneFormatter.GetTimeZoneBlob(exTimeZone);
                propertyBag.SetValueWithFixup(InternalSchema.TimeZoneDefinitionStart, timeZoneBlob);
                StartTimeZoneProperty.SyncRecurringTimeZoneProperties(propertyBag, exTimeZone, timeZoneBlob);
            }
        }
Exemplo n.º 5
0
 protected override void InternalDeleteValue(PropertyBag.BasicPropertyStore propertyBag)
 {
     foreach (NativeStorePropertyDefinition nativeStorePropertyDefinition in this.AllPropertyDefinitions)
     {
         if (nativeStorePropertyDefinition != null)
         {
             propertyBag.Delete(nativeStorePropertyDefinition);
         }
     }
 }
Exemplo n.º 6
0
        protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value)
        {
            base.InternalSetValue(propertyBag, value);
            if (value == null)
            {
                propertyBag.Delete(this.faxPropDef);
                return;
            }
            Participant participant = (Participant)value;

            propertyBag.SetValueWithFixup(this.faxPropDef, participant.EmailAddress ?? string.Empty);
        }
Exemplo n.º 7
0
        internal static void SetCalendarTime(PropertyBag.BasicPropertyStore propertyBag, GuidIdPropertyDefinition utcTimeProperty, PropertyTagPropertyDefinition legacyUtcTimeProperty, GuidIdPropertyDefinition timeZoneDefinition, bool isEndTime, object value)
        {
            StoreObject      storeObject      = propertyBag.Context.StoreObject;
            CalendarItemBase calendarItemBase = storeObject as CalendarItemBase;

            if (calendarItemBase != null && calendarItemBase.PropertyBag.ExTimeZone != null && calendarItemBase.IsAllDayEventCache == null)
            {
                object obj = IsAllDayEventProperty.CalculateIsAllDayEvent(propertyBag);
                if (obj is bool)
                {
                    calendarItemBase.IsAllDayEventCache = new bool?((bool)obj);
                }
            }
            propertyBag.SetValueWithFixup(utcTimeProperty, value);
            propertyBag.SetValueWithFixup(legacyUtcTimeProperty, value);
            ExTimeZone timeZone = propertyBag.TimeZone;

            if (value is ExDateTime && ((ExDateTime)value).TimeZone != null && ((ExDateTime)value).TimeZone != ExTimeZone.UnspecifiedTimeZone)
            {
                timeZone = ((ExDateTime)value).TimeZone;
            }
            if (timeZone == ExTimeZone.UtcTimeZone)
            {
                if (!(storeObject is CalendarItemOccurrence))
                {
                    propertyBag.Delete(timeZoneDefinition);
                }
            }
            else if (value is ExDateTime && timeZone != ExTimeZone.UnspecifiedTimeZone)
            {
                if (timeZoneDefinition == InternalSchema.TimeZoneDefinitionStart)
                {
                    byte[] timeZoneBlob = O12TimeZoneFormatter.GetTimeZoneBlob(timeZone);
                    StartTimeZoneProperty.RecalculateNormalizedTimeProperty(propertyBag, InternalSchema.MapiEndTime, InternalSchema.MapiPREndDate, timeZone);
                    StartTimeZoneProperty.RecalculateNormalizedTimeProperty(propertyBag, InternalSchema.ReminderNextTime, null, timeZone);
                    StartTimeZoneProperty.SyncRecurringTimeZoneProperties(propertyBag, timeZone, timeZoneBlob);
                    propertyBag.SetValueWithFixup(timeZoneDefinition, timeZoneBlob);
                }
                else
                {
                    byte[] timeZoneBlob2 = O12TimeZoneFormatter.GetTimeZoneBlob(timeZone, (ExDateTime)value);
                    propertyBag.SetValueWithFixup(timeZoneDefinition, timeZoneBlob2);
                }
            }
            if (!isEndTime)
            {
                propertyBag.SetValueWithFixup(InternalSchema.ReminderDueByInternal, value);
            }
            if (storeObject != null)
            {
                Reminder.Adjust(storeObject);
            }
        }
Exemplo n.º 8
0
        protected sealed override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value)
        {
            if (value == null)
            {
                propertyBag.Delete(InternalSchema.MapiConversationFamilyId);
                return;
            }
            ConversationId conversationId = value as ConversationId;

            if (conversationId == null)
            {
                throw new ArgumentException("value", "Must be null or ConversationId");
            }
            propertyBag.SetOrDeleteProperty(InternalSchema.MapiConversationFamilyId, conversationId.GetBytes());
        }
		protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value)
		{
			if (value != null)
			{
				StoreObjectId[] array = value as StoreObjectId[];
				ArgumentValidator.ThrowIfNull("value", array);
				byte[][] array2 = new byte[array.Length][];
				for (int i = 0; i < array.Length; i++)
				{
					array2[i] = array[i].ProviderLevelItemId;
				}
				propertyBag.SetValue(this.enclosedPropertyDefinition, array2);
				return;
			}
			propertyBag.Delete(this.enclosedPropertyDefinition);
		}
Exemplo n.º 10
0
        protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value)
        {
            ExTimeZone exTimeZone = value as ExTimeZone;

            if (exTimeZone == ExTimeZone.UnspecifiedTimeZone)
            {
                throw new InvalidOperationException("unspecified time zone is not allowed to set");
            }
            if (exTimeZone == ExTimeZone.UtcTimeZone)
            {
                if (!(propertyBag.Context.StoreObject is CalendarItemOccurrence))
                {
                    propertyBag.Delete(InternalSchema.TimeZoneDefinitionStart);
                    return;
                }
            }
            else
            {
                ExDateTime valueOrDefault = propertyBag.GetValueOrDefault <ExDateTime>(InternalSchema.MapiEndTime, ExDateTime.UtcNow);
                propertyBag.SetValueWithFixup(InternalSchema.TimeZoneDefinitionEnd, (exTimeZone != null) ? O12TimeZoneFormatter.GetTimeZoneBlob(exTimeZone, valueOrDefault) : null);
            }
        }
 protected override void InternalDeleteValue(PropertyBag.BasicPropertyStore propertyBag)
 {
     propertyBag.Delete(InternalSchema.FolderWebViewInfo);
 }
Exemplo n.º 12
0
 protected override void InternalDeleteValue(PropertyBag.BasicPropertyStore propertyBag)
 {
     propertyBag.Delete(InternalSchema.MapiFlagStatus);
 }
Exemplo n.º 13
0
 protected override void InternalDeleteValue(PropertyBag.BasicPropertyStore propertyBag)
 {
     propertyBag.Delete(this.first);
     propertyBag.Delete(this.second);
 }
Exemplo n.º 14
0
 protected override void InternalDeleteValue(PropertyBag.BasicPropertyStore propertyBag)
 {
     propertyBag.Delete(InternalSchema.MapiConversationFamilyId);
 }
 protected sealed override void InternalDeleteValue(PropertyBag.BasicPropertyStore propertyBag)
 {
     propertyBag.Delete(this.backingPropertyDefinition);
 }
Exemplo n.º 16
0
 protected override void InternalDeleteValue(PropertyBag.BasicPropertyStore propertyBag)
 {
     propertyBag.Delete(InternalSchema.SubjectPrefixInternal);
     propertyBag.Delete(InternalSchema.NormalizedSubjectInternal);
     propertyBag.Delete(InternalSchema.MapiSubject);
 }
Exemplo n.º 17
0
 protected override void InternalDeleteValue(PropertyBag.BasicPropertyStore propertyBag)
 {
     propertyBag.Delete(InternalSchema.DisplayTypeExInternal);
     propertyBag.Delete(InternalSchema.DisplayType);
 }
Exemplo n.º 18
0
 protected override void InternalDeleteValue(PropertyBag.BasicPropertyStore propertyBag)
 {
     propertyBag.Delete(InternalSchema.MapiSensitivity);
 }
Exemplo n.º 19
0
 private static void ClearFlagStatus(PropertyBag.BasicPropertyStore propertyBag)
 {
     propertyBag.Delete(InternalSchema.MapiFlagStatus);
     propertyBag.Delete(InternalSchema.TaskStatus);
     propertyBag.Delete(InternalSchema.ItemColor);
 }
Exemplo n.º 20
0
 protected override void InternalDeleteValue(PropertyBag.BasicPropertyStore propertyBag)
 {
     propertyBag.Delete(InternalSchema.LinkRejectHistoryRaw);
 }
 protected override void InternalDeleteValue(PropertyBag.BasicPropertyStore propertyBag)
 {
     propertyBag.Delete(this.CompositeProperty);
 }
Exemplo n.º 22
0
 protected override void InternalDeleteValue(PropertyBag.BasicPropertyStore propertyBag)
 {
     propertyBag.Delete(InternalSchema.MapiImportance);
 }
Exemplo n.º 23
0
 protected override void InternalDeleteValue(PropertyBag.BasicPropertyStore propertyBag)
 {
     propertyBag.Delete(InternalSchema.MapiIsTaskRecurring);
 }