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); }
protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value) { AppointmentStateFlags?valueAsNullable = propertyBag.GetValueAsNullable <AppointmentStateFlags>(InternalSchema.AppointmentStateInternal); AppointmentStateFlags appointmentStateFlags = (AppointmentStateFlags)value; if (valueAsNullable != null && (valueAsNullable.Value & AppointmentStateFlags.Received) == AppointmentStateFlags.Received && (appointmentStateFlags & AppointmentStateFlags.Received) != AppointmentStateFlags.Received) { propertyBag.SetLocationIdentifier(63651U, LastChangeAction.SmartPropertyFixup); ExTraceGlobals.StorageTracer.TraceInformation(63651, (long)propertyBag.GetHashCode(), "Prevent from removing Received flag on AppointmentState"); appointmentStateFlags |= AppointmentStateFlags.Received; } propertyBag.SetValueWithFixup(InternalSchema.AppointmentStateInternal, appointmentStateFlags); }
protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value) { if (!(value is bool)) { string message = ServerStrings.ObjectMustBeOfType("bool"); ExTraceGlobals.StorageTracer.TraceError((long)this.GetHashCode(), message); throw new ArgumentException(message); } CalendarItemBase calendarItemBase = propertyBag.Context.StoreObject as CalendarItemBase; if (calendarItemBase != null && calendarItemBase.PropertyBag.ExTimeZone != null) { calendarItemBase.IsAllDayEventCache = new bool?((bool)value); } propertyBag.SetValueWithFixup(InternalSchema.MapiIsAllDayEvent, value); }
protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value) { MessageItem messageItem = propertyBag.Context.StoreObject as MessageItem; if (messageItem != null) { try { ((Likers)messageItem.Likers).Blob = (byte[])value; return; } catch (CorruptDataException ex) { throw PropertyError.ToException(ex.LocalizedString, new PropertyError[] { new PropertyError(InternalSchema.LikersBlob, PropertyErrorCode.SetCalculatedPropertyError) }); } } propertyBag.SetValueWithFixup(InternalSchema.MapiLikersBlob, value); }
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 InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value) { if (!(value is bool)) { string message = ServerStrings.ExInvalidValueTypeForCalculatedProperty(value, base.Type); ExTraceGlobals.StorageTracer.TraceError((long)this.GetHashCode(), message); throw new ArgumentException(message); } int?num = propertyBag.GetValue(InternalSchema.AttachMethod) as int?; if (num != null && num.Value == 6 && !(bool)value) { return; } int?num2 = propertyBag.GetValue(InternalSchema.AttachMhtmlFlags) as int?; int num3; if ((bool)value) { if (num2 != null) { num3 = (num2.Value | 4); } else { num3 = 4; } } else if (num2 != null) { num3 = (num2.Value & -5); } else { num3 = 0; } propertyBag.SetValueWithFixup(InternalSchema.AttachMhtmlFlags, num3); }
protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value) { propertyBag.SetValueWithFixup(InternalSchema.MapiPriority, (int)value - 1); propertyBag.SetValueWithFixup(InternalSchema.MapiImportance, (int)value); }
protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value) { propertyBag.SetValueWithFixup(InternalSchema.MapiLikeCount, value); }
protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value) { propertyBag.SetValueWithFixup(this.nativeProp, value); Reminder.Adjust(propertyBag.Context.StoreObject); }
protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value) { propertyBag.SetValueWithFixup(InternalSchema.MapiIsTaskRecurring, (bool)value); }
private static void SetFlagStatus(PropertyBag.BasicPropertyStore propertyBag) { propertyBag.SetValueWithFixup(InternalSchema.MapiFlagStatus, FlagStatus.Flagged); propertyBag.SetValueWithFixup(InternalSchema.TaskStatus, TaskStatus.InProgress); propertyBag.SetValueWithFixup(InternalSchema.ItemColor, ItemColor.Red); }
internal static void ModifySubjectProperty(PropertyBag.BasicPropertyStore item, NativeStorePropertyDefinition property, string value) { string text = item.GetValue(InternalSchema.SubjectPrefixInternal) as string; string text2 = item.GetValue(InternalSchema.NormalizedSubjectInternal) as string; string text3 = item.GetValue(InternalSchema.MapiSubject) as string; if (property == InternalSchema.NormalizedSubjectInternal) { text2 = value; if (text3 != null) { string text4 = SubjectProperty.ExtractPrefixUsingNormalizedSubject(text3, text2); if (text4 != null) { text = text4; } } if (text == null) { text = string.Empty; } } else if (property == InternalSchema.SubjectPrefixInternal) { text = value; if (text3 != null && text3.StartsWith(text, StringComparison.Ordinal)) { text2 = text3.Substring(text.Length); } if (text2 == null) { text2 = string.Empty; } } else { if (property != InternalSchema.MapiSubject) { throw new ArgumentException("Not a supported subject property", "property"); } if (!string.IsNullOrEmpty(text) && value.StartsWith(text, StringComparison.Ordinal)) { text2 = value.Substring(text.Length); } else if (!string.IsNullOrEmpty(text2)) { string text5 = SubjectProperty.ExtractPrefixUsingNormalizedSubject(value, text2); if (text5 != null) { text = text5; } else { SubjectProperty.ComputeSubjectPrefix(value, out text, out text2); } } else { SubjectProperty.ComputeSubjectPrefix(value, out text, out text2); } } text3 = text + text2; item.SetValueWithFixup(InternalSchema.SubjectPrefixInternal, text); item.SetValueWithFixup(InternalSchema.NormalizedSubjectInternal, text2); item.SetValueWithFixup(InternalSchema.MapiSubject, text3); string itemClass = item.GetValue(InternalSchema.ItemClass) as string; if (!ObjectClass.IsPost(itemClass)) { item.SetValueWithFixup(InternalSchema.ConversationTopic, text2); } }
protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value) { propertyBag.SetValueWithFixup(this.nativeProp, (bool)value && !this.IsSuppressed(propertyBag)); }
protected override void InternalSetValue(PropertyBag.BasicPropertyStore propertyBag, object value) { propertyBag.SetValueWithFixup(InternalSchema.MailboxOofStateInternal, (bool)value); propertyBag.SetValueWithFixup(MailboxSchema.OofScheduleStart, Util.Date1601Utc); propertyBag.SetValueWithFixup(MailboxSchema.OofScheduleEnd, Util.Date1601Utc); }