protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { string text = propertyBag.GetValueOrDefault <string>(InternalSchema.PartnerNetworkId, null); if (string.IsNullOrEmpty(text)) { text = WellKnownNetworkNames.Outlook; } else if (text == WellKnownNetworkNames.QuickContacts) { string valueOrDefault = propertyBag.GetValueOrDefault <string>(InternalSchema.ParentDisplayName, null); if ("{06967759-274D-40B2-A3EB-D7F9E73727D7}" != valueOrDefault) { text = valueOrDefault; } else { text = ServerStrings.PeopleQuickContactsAttributionDisplayName; } } else if (!WellKnownNetworkNames.IsWellKnownExternalNetworkName(text)) { text = WellKnownNetworkNames.Outlook; } return(text); }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { Participant.Builder builder = new Participant.Builder(); bool flag = base.Get(propertyBag, builder); if (this.emailAddressForDisplayPropDef != null) { string valueOrDefault = propertyBag.GetValueOrDefault <string>(this.emailAddressForDisplayPropDef); if (!string.IsNullOrEmpty(valueOrDefault)) { builder[ParticipantSchema.EmailAddressForDisplay] = valueOrDefault; if (Participant.RoutingTypeEquals(builder.RoutingType, "EX") && PropertyError.IsPropertyNotFound(builder.TryGetProperty(ParticipantSchema.SmtpAddress)) && SmtpAddress.IsValidSmtpAddress(valueOrDefault)) { builder[ParticipantSchema.SmtpAddress] = valueOrDefault; } } } if (!flag && PropertyError.IsPropertyNotFound(builder.TryGetProperty(ParticipantSchema.EmailAddressForDisplay))) { return(new PropertyError(this, PropertyErrorCode.NotFound)); } byte[] valueOrDefault2 = propertyBag.GetValueOrDefault <byte[]>(InternalSchema.EntryId); if (valueOrDefault2 != null) { builder.Origin = new StoreParticipantOrigin(StoreObjectId.FromProviderSpecificId(valueOrDefault2), this.emailAddressIndex); } return(builder.ToParticipant()); }
protected sealed override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value) { ConversationId conversationId = value as ConversationId; if (conversationId == null) { throw new ArgumentException("value", "Must be a non-null ConversationId instance"); } ConversationIndex conversationIndex; if (!ConversationIndex.TryCreate(propertyBag.GetValueOrDefault <byte[]>(InternalSchema.ConversationIndex), out conversationIndex)) { conversationIndex = ConversationIndex.Create(conversationId); } else { conversationIndex = conversationIndex.UpdateGuid(new Guid(conversationId.GetBytes())); } byte[] array = conversationIndex.ToByteArray(); string valueOrDefault = propertyBag.GetValueOrDefault <string>(InternalSchema.ItemClass); if (valueOrDefault != null && ObjectClass.IsOfClass(valueOrDefault, "IPM.ConversationAction")) { array[0] = 1; array[1] = (array[2] = (array[3] = (array[4] = (array[5] = 0)))); } propertyBag.SetValueWithFixup(InternalSchema.ConversationIndex, array); }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { string valueOrDefault = propertyBag.GetValueOrDefault <string>(InternalSchema.ItemClass); if (valueOrDefault == null) { return(RecurrenceType.None); } if (ObjectClass.IsTask(valueOrDefault) || ObjectClass.IsTaskRequest(valueOrDefault)) { if (propertyBag.GetValueOrDefault <bool>(InternalSchema.IsOneOff)) { return(RecurrenceType.None); } byte[] valueOrDefault2 = propertyBag.GetValueOrDefault <byte[]>(InternalSchema.TaskRecurrence); return(RecurrenceTypeProperty.GetTaskRecurrenceTypeFromBlob(valueOrDefault2)); } else { if (ObjectClass.IsCalendarItemCalendarItemOccurrenceOrRecurrenceException(valueOrDefault) || ObjectClass.IsMeetingMessage(valueOrDefault)) { return(propertyBag.GetValueOrDefault <RecurrenceType>(InternalSchema.MapiRecurrenceType)); } return(RecurrenceType.None); } }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { int valueOrDefault = propertyBag.GetValueOrDefault <int>(InternalSchema.NativeBlockStatus); if (valueOrDefault < 0) { return(new PropertyError(this, PropertyErrorCode.GetCalculatedPropertyError)); } if (valueOrDefault <= 3) { return((BlockStatus)valueOrDefault); } ExDateTime valueOrDefault2 = propertyBag.GetValueOrDefault <ExDateTime>(InternalSchema.ReceivedTime, ExDateTime.MinValue); if (!(valueOrDefault2 != ExDateTime.MinValue)) { return(BlockStatus.DontKnow); } double floatDate = ExTimeZone.UtcTimeZone.ConvertDateTime(valueOrDefault2).ToOADate(); int num = OutlookBlockStatusProperty.ComputeBlockStatus(floatDate); int num2 = (num >= valueOrDefault) ? (num - valueOrDefault) : (valueOrDefault - num); if (num2 < 1) { return(BlockStatus.NoNeverAgain); } return(BlockStatus.DontKnow); }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { bool valueOrDefault = propertyBag.GetValueOrDefault <bool>(InternalSchema.IsOneOff); if (valueOrDefault) { return(false); } byte[] valueOrDefault2 = propertyBag.GetValueOrDefault <byte[]>(InternalSchema.TaskRecurrence); return(valueOrDefault2 != null); }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { int valueOrDefault = propertyBag.GetValueOrDefault <int>(InternalSchema.OutlookPhishingStamp); int valueOrDefault2 = propertyBag.GetValueOrDefault <int>(InternalSchema.OutlookSpoofingStamp); if ((valueOrDefault & 268435455) != 0 || (valueOrDefault2 & 268435455) != 0) { return((valueOrDefault & 268435456) != 0 || (valueOrDefault2 & 268435456) != 0); } return(new PropertyError(this, PropertyErrorCode.NotFound)); }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { string valueOrDefault = propertyBag.GetValueOrDefault <string>(InternalSchema.SubjectPrefixInternal); string valueOrDefault2 = propertyBag.GetValueOrDefault <string>(InternalSchema.NormalizedSubjectInternal); if (valueOrDefault == null && valueOrDefault2 == null) { return(propertyBag.GetValue(InternalSchema.MapiSubject)); } return(valueOrDefault + valueOrDefault2); }
protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value) { int num = propertyBag.GetValueOrDefault <int>(InternalSchema.OutlookPhishingStamp); if (num <= 0) { byte[] array = LinkEnabled.GetMovingStamp(propertyBag.Context.Session); if (array.Length != 4) { array = new byte[] { 1, 2, 3, 4 }; } num = BitConverter.ToInt32(array, 0); } if ((bool)value) { num |= 268435456; } else { num &= -268435457; } propertyBag.SetValueWithFixup(InternalSchema.OutlookPhishingStamp, num); }
protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value) { if (value == null) { throw new ArgumentNullException("OutlookBlockStatus"); } EnumValidator.ThrowIfInvalid <BlockStatus>((BlockStatus)value, "value"); int num = (int)value; if (num < 3) { propertyBag.SetValueWithFixup(InternalSchema.NativeBlockStatus, (BlockStatus)num); return; } ExDateTime valueOrDefault = propertyBag.GetValueOrDefault <ExDateTime>(InternalSchema.ReceivedTime, ExDateTime.MinValue); if (valueOrDefault != ExDateTime.MinValue) { double floatDate = ExTimeZone.UtcTimeZone.ConvertDateTime(valueOrDefault).ToOADate(); int num2 = OutlookBlockStatusProperty.ComputeBlockStatus(floatDate); propertyBag.SetValueWithFixup(InternalSchema.NativeBlockStatus, (BlockStatus)num2); return; } propertyBag.SetValueWithFixup(InternalSchema.NativeBlockStatus, BlockStatus.DontKnow); }
internal static ExDateTime?GetWallClockTime(PropertyBag.BasicPropertyStore propertyBag, GuidIdPropertyDefinition utcTimeProperty, PropertyTagPropertyDefinition legacyUtcTimeProperty, NativeStorePropertyDefinition[] timeZoneBlobPropertyDefinitions) { ExDateTime?normalizedTime = StartTimeProperty.GetNormalizedTime(propertyBag, utcTimeProperty, legacyUtcTimeProperty); if (normalizedTime == null) { return(null); } byte[] array = null; foreach (NativeStorePropertyDefinition propertyDefinition in timeZoneBlobPropertyDefinitions) { array = propertyBag.GetValueOrDefault <byte[]>(propertyDefinition); if (array != null) { break; } } if (array == null) { ExTraceGlobals.StorageTracer.TraceWarning(0L, "Could not determine suitable time zone"); } ExTimeZone exTimeZone = StartWallClockProperty.FindBestMatchingTimeZone(array); if (exTimeZone != null) { return(new ExDateTime?(exTimeZone.ConvertDateTime(normalizedTime.Value))); } return(new ExDateTime?(normalizedTime.Value)); }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { byte[] valueOrDefault = propertyBag.GetValueOrDefault <byte[]>(InternalSchema.PropertyChangeMetadataRaw); if (valueOrDefault == null) { CalendarItemOccurrence calendarItemOccurrence = propertyBag.Context.StoreObject as CalendarItemOccurrence; if (calendarItemOccurrence == null) { return(null); } return(calendarItemOccurrence.OccurrencePropertyBag.ComputeChangeMetadataBasedOnLoadedProperties()); } else { if (valueOrDefault.Length == 0) { return(null); } object result; try { result = PropertyChangeMetadata.Parse(valueOrDefault); } catch (PropertyChangeMetadataFormatException ex) { result = new PropertyError(this, PropertyErrorCode.CorruptedData, ex.Message); } return(result); } }
internal static ExDateTime?GetNormalizedTime(PropertyBag.BasicPropertyStore propertyBag, GuidIdPropertyDefinition utcTimeProperty, PropertyTagPropertyDefinition legacyUtcTimeProperty) { ExDateTime?valueAsNullable = propertyBag.GetValueAsNullable <ExDateTime>(utcTimeProperty); if (valueAsNullable == null) { if (legacyUtcTimeProperty != null) { valueAsNullable = propertyBag.GetValueAsNullable <ExDateTime>(legacyUtcTimeProperty); } if (valueAsNullable == null) { return(null); } } ExDateTime exDateTime = ExTimeZone.UtcTimeZone.ConvertDateTime(valueAsNullable.Value); byte[] valueOrDefault = propertyBag.GetValueOrDefault <byte[]>(InternalSchema.TimeZoneDefinitionStart); ExTimeZone legacyTimeZone; if (O12TimeZoneFormatter.TryParseTimeZoneBlob(valueOrDefault, string.Empty, out legacyTimeZone)) { exDateTime = TimeZoneHelper.NormalizeUtcTime(exDateTime, legacyTimeZone); } exDateTime = StartTimeProperty.DynamicAdjustForAllDayEvent(propertyBag, exDateTime, utcTimeProperty == InternalSchema.MapiEndTime); return(new ExDateTime?(propertyBag.TimeZone.ConvertDateTime(exDateTime))); }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { bool valueOrDefault = propertyBag.GetValueOrDefault <bool>(InternalSchema.AppointmentRecurring); if (valueOrDefault) { AppointmentStateFlags valueOrDefault2 = propertyBag.GetValueOrDefault <AppointmentStateFlags>(InternalSchema.AppointmentStateInternal); return(CalendarItemBase.IsAppointmentStateCancelled(valueOrDefault2)); } CalendarItemOccurrence calendarItemOccurrence = propertyBag.Context.StoreObject as CalendarItemOccurrence; if (calendarItemOccurrence != null) { AppointmentStateFlags valueOrDefault3 = calendarItemOccurrence.OccurrencePropertyBag.MasterCalendarItem.GetValueOrDefault <AppointmentStateFlags>(CalendarItemBaseSchema.AppointmentState); return(CalendarItemBase.IsAppointmentStateCancelled(valueOrDefault3)); } return(new PropertyError(this, PropertyErrorCode.NotFound)); }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { byte[] valueOrDefault = propertyBag.GetValueOrDefault <byte[]>(InternalSchema.MapiConversationFamilyId, null); byte[] valueOrDefault2 = propertyBag.GetValueOrDefault <byte[]>(InternalSchema.ConversationIndex); if (valueOrDefault2 == null || valueOrDefault == null) { return(null); } ConversationIndex conversationIndex; bool flag = ConversationIndex.TryCreate(valueOrDefault2, out conversationIndex); ConversationId conversationId = ConversationId.Create(valueOrDefault); if (!flag) { return(null); } return(conversationIndex.UpdateGuid(conversationId).ToByteArray()); }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { string text = propertyBag.GetValueOrDefault <string>(this.CompositeProperty); if (!propertyBag.IsDirty(this.CompositeProperty) && this.IsAtomOrRulePropertyDirty(propertyBag)) { text = this.GenerateCompositePropertyValue(propertyBag); } return(text ?? new PropertyError(this, PropertyErrorCode.NotFound)); }
private bool?GetIsResourceFromDisplayTypeEx(PropertyBag.BasicPropertyStore propertyBag) { RecipientDisplayType?recipientDisplayType = new RecipientDisplayType?(propertyBag.GetValueOrDefault <RecipientDisplayType>(InternalSchema.DisplayTypeExInternal)); if (recipientDisplayType == null) { return(null); } return(new bool?(DisplayTypeExProperty.IsResource(recipientDisplayType.Value))); }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { bool? flag = null; string valueOrDefault = propertyBag.GetValueOrDefault <string>(InternalSchema.ItemClass, string.Empty); if (ObjectClass.IsCalendarItemCalendarItemOccurrenceOrRecurrenceException(valueOrDefault) || ObjectClass.IsCalendarItemSeries(valueOrDefault)) { AppointmentStateFlags valueOrDefault2 = propertyBag.GetValueOrDefault <AppointmentStateFlags>(InternalSchema.AppointmentStateInternal); flag = new bool?(IsOrganizerProperty.GetForCalendarItem(valueOrDefault, valueOrDefault2)); } else if (ObjectClass.IsMeetingMessage(valueOrDefault)) { MeetingMessage meetingMessage = propertyBag.Context.StoreObject as MeetingMessage; if (meetingMessage != null) { CalendarItemBase calendarItemBase = null; try { calendarItemBase = meetingMessage.GetCorrelatedItemInternal(true); } catch (CorruptDataException) { } catch (CorrelationFailedException) { } if (calendarItemBase != null) { flag = new bool?(calendarItemBase.IsOrganizer()); } else if (!(meetingMessage is MeetingResponse)) { flag = new bool?(meetingMessage.IsMailboxOwnerTheSender()); } } } if (flag != null) { return(flag); } return(new PropertyError(this, PropertyErrorCode.NotFound)); }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { bool flag = propertyBag.GetValueOrDefault <bool>(InternalSchema.MailboxOofStateInternal, false); ExDateTime valueOrDefault = propertyBag.GetValueOrDefault <ExDateTime>(MailboxSchema.OofScheduleStart, Util.Date1601Utc); ExDateTime valueOrDefault2 = propertyBag.GetValueOrDefault <ExDateTime>(MailboxSchema.OofScheduleEnd, Util.Date1601Utc); ExDateTime utcNow = ExDateTime.UtcNow; if (flag) { if (valueOrDefault2 != Util.Date1601Utc && valueOrDefault2 < utcNow) { flag = false; } } else if (valueOrDefault != Util.Date1601Utc && valueOrDefault2 != Util.Date1601Utc && valueOrDefault <= utcNow && valueOrDefault2 > utcNow) { flag = true; } return(flag); }
internal static ExTimeZone GetExTimeZoneFromLegacyBlob(PropertyBag.BasicPropertyStore propertyBag, NativeStorePropertyDefinition propertyDefinition) { byte[] valueOrDefault = propertyBag.GetValueOrDefault <byte[]>(propertyDefinition); ExTimeZone exTimeZone; if (O12TimeZoneFormatter.TryParseTimeZoneBlob(valueOrDefault, string.Empty, out exTimeZone)) { return(TimeZoneHelper.PromoteCustomizedTimeZone(exTimeZone) ?? exTimeZone); } return(ExTimeZone.UtcTimeZone); }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { Participant.Builder builder = new Participant.Builder(); byte[] valueOrDefault = propertyBag.GetValueOrDefault <byte[]>(InternalSchema.EntryId); if (valueOrDefault != null) { builder.SetPropertiesFrom(ParticipantEntryId.TryFromEntryId(valueOrDefault)); } builder.DisplayName = (propertyBag.GetValueOrDefault <string>(InternalSchema.TransmitableDisplayName) ?? builder.DisplayName); if (!base.Get(propertyBag, builder)) { return(new PropertyError(this, PropertyErrorCode.NotFound)); } RecipientDisplayType?valueAsNullable = propertyBag.GetValueAsNullable <RecipientDisplayType>(InternalSchema.DisplayTypeExInternal); if (valueAsNullable != null) { builder[ParticipantSchema.DisplayTypeEx] = valueAsNullable.Value; builder.Origin = (builder.Origin ?? new DirectoryParticipantOrigin()); } else if (PropertyError.IsPropertyNotFound(builder.TryGetProperty(ParticipantSchema.DisplayType))) { LegacyRecipientDisplayType?valueAsNullable2 = propertyBag.GetValueAsNullable <LegacyRecipientDisplayType>(InternalSchema.DisplayType); ObjectType?valueAsNullable3 = propertyBag.GetValueAsNullable <ObjectType>(InternalSchema.ObjectType); if (valueAsNullable2 != null) { if (valueAsNullable2 != LegacyRecipientDisplayType.MailUser) { builder[ParticipantSchema.DisplayType] = (int)valueAsNullable2.Value; } } else if (valueAsNullable3 != null && valueAsNullable3 == ObjectType.MAPI_DISTLIST) { builder[ParticipantSchema.DisplayType] = 1; } } builder.SetOrDeleteProperty(ParticipantSchema.SendRichInfo, Util.NullIf <object>(propertyBag.GetValueAsNullable <bool>(InternalSchema.SendRichInfo), false)); builder.SetOrDeleteProperty(ParticipantSchema.SendInternetEncoding, propertyBag.GetValueAsNullable <int>(InternalSchema.SendInternetEncoding)); return(builder.ToParticipant()); }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { string valueOrDefault = propertyBag.GetValueOrDefault <string>(InternalSchema.ItemClass, string.Empty); if (!ObjectClass.IsMeetingRequest(valueOrDefault)) { return(propertyBag.GetValueOrDefault <FlagStatus>(InternalSchema.MapiFlagStatus)); } int valueOrDefault2 = propertyBag.GetValueOrDefault <int>(InternalSchema.ItemColor); if (valueOrDefault2 > 0) { return(FlagStatus.Flagged); } int valueOrDefault3 = propertyBag.GetValueOrDefault <int>(InternalSchema.TaskStatus); if (valueOrDefault3 == 2) { return(FlagStatus.Complete); } return(FlagStatus.NotFlagged); }
internal static void SyncRecurringTimeZoneProperties(PropertyBag.BasicPropertyStore propertyBag, ExTimeZone timeZone, byte[] o12TimeZoneBlob) { if (o12TimeZoneBlob == null) { o12TimeZoneBlob = O12TimeZoneFormatter.GetTimeZoneBlob(timeZone); } if (propertyBag.GetValueOrDefault <bool>(InternalSchema.AppointmentRecurring) && timeZone != ExTimeZone.UtcTimeZone && timeZone != ExTimeZone.UnspecifiedTimeZone) { propertyBag.SetValueWithFixup(InternalSchema.TimeZone, timeZone.LocalizableDisplayName.ToString()); propertyBag.SetValueWithFixup(InternalSchema.TimeZoneBlob, O11TimeZoneFormatter.GetTimeZoneBlob(timeZone)); propertyBag.SetValueWithFixup(InternalSchema.TimeZoneDefinitionRecurring, o12TimeZoneBlob); } }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { if (!ObjectClass.IsOfClass(propertyBag.GetValueOrDefault <string>(InternalSchema.ItemClass), "IPM.DistList")) { return(new PropertyError(this, PropertyErrorCode.NotSupported)); } byte[] array = propertyBag.GetValue(InternalSchema.EntryId) as byte[]; if (array != null) { return(new Participant(propertyBag.GetValue(InternalSchema.DisplayNameFirstLast) as string, null, "MAPIPDL", new StoreParticipantOrigin(StoreObjectId.FromProviderSpecificId(array)), new KeyValuePair <PropertyDefinition, object> [0])); } return(new PropertyError(this, PropertyErrorCode.NotFound)); }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { object value = propertyBag.GetValue(InternalSchema.MapiInternetCpid); if (value is int && (int)value == 20127) { string valueOrDefault = propertyBag.GetValueOrDefault <string>(InternalSchema.ItemClass); if (ObjectClass.IsOfClass(valueOrDefault, "IPM.InfoPathForm")) { return(28591); } } return(value); }
private static T ExceptionHandlingGetValueOrDefault <T>(PropertyBag.BasicPropertyStore propertyBag, AtomicStorePropertyDefinition propertyDefinition, T defaultValue) { T result; try { result = propertyBag.GetValueOrDefault <T>(propertyDefinition, defaultValue); } catch (NotInBagPropertyErrorException) { result = defaultValue; } return(result); }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { string valueOrDefault = propertyBag.GetValueOrDefault <string>(InternalSchema.ItemClass, string.Empty); if (ObjectClass.IsOfClass(valueOrDefault, "IPM.Appointment.Occurrence") || ObjectClass.IsOfClass(valueOrDefault, "IPM.OLE.CLASS.{00061055-0000-0000-C000-000000000046}")) { bool valueOrDefault2 = propertyBag.GetValueOrDefault <bool>(InternalSchema.IsException); if (valueOrDefault2) { return(CalendarItemType.Exception); } return(CalendarItemType.Occurrence); } else { bool valueOrDefault3 = propertyBag.GetValueOrDefault <bool>(InternalSchema.AppointmentRecurring); if (valueOrDefault3) { return(CalendarItemType.RecurringMaster); } return(CalendarItemType.Single); } }
protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object newValue) { int num = propertyBag.GetValueOrDefault <int>(InternalSchema.InferenceUserCapabilityFlags, 0); if ((bool)newValue) { num |= this.propertyFlag; } else { num &= ~this.propertyFlag; } propertyBag.SetOrDeleteProperty(InternalSchema.InferenceUserCapabilityFlags, (num == 0) ? null : num); }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { propertyBag.GetValueOrDefault <string>(InternalSchema.ItemClass); byte[] valueOrDefault = propertyBag.GetValueOrDefault <byte[]>(InternalSchema.ConversationIndex); if (valueOrDefault == null) { return(null); } ConversationIndex conversationIndex; if (!ConversationIndex.TryCreate(valueOrDefault, out conversationIndex)) { return(null); } bool?valueAsNullable = propertyBag.GetValueAsNullable <bool>(InternalSchema.ConversationIndexTracking); if (valueAsNullable == null || !valueAsNullable.Value) { string topic = propertyBag.GetValueOrDefault <string>(InternalSchema.ConversationTopic) ?? string.Empty; byte[] bytes = this.ComputeHashTopic(topic); return(ConversationId.Create(bytes)); } return(ConversationId.Create(conversationIndex.Guid)); }
private static void DenormalizeTimeProperty(PropertyBag.BasicPropertyStore propertyBag, ExDateTime newTime, GuidIdPropertyDefinition utcTimeProperty, PropertyTagPropertyDefinition legacyUtcTimeProperty) { byte[] valueOrDefault = propertyBag.GetValueOrDefault <byte[]>(InternalSchema.TimeZoneDefinitionStart); ExTimeZone legacyTimeZone; if (O12TimeZoneFormatter.TryParseTimeZoneBlob(valueOrDefault, string.Empty, out legacyTimeZone)) { ExDateTime exDateTime = TimeZoneHelper.DeNormalizeToUtcTime(newTime, legacyTimeZone); propertyBag.SetValueWithFixup(utcTimeProperty, exDateTime); if (legacyUtcTimeProperty != null) { propertyBag.SetValueWithFixup(legacyUtcTimeProperty, exDateTime); } } }