private void WriteMapiProperties() { this.tnefWriter.StartAttribute(TnefAttributeTag.MapiProperties, TnefAttributeLevel.Message); this.WriteTnefCorrelationKeyProperty(); this.WriteMessageBody(); foreach (NativeStorePropertyDefinition nativeStorePropertyDefinition in this.addressCache.Properties.AllNativeProperties) { object obj = this.addressCache.Properties.TryGetProperty(nativeStorePropertyDefinition); if (obj != null && !(obj is PropertyError)) { this.tnefWriter.WriteProperty(nativeStorePropertyDefinition, obj); } } foreach (NativeStorePropertyDefinition property in this.item.AllNativeProperties) { if (!ItemToTnefConverter.excludedMapiProperties.Contains(property) && !ConversionAddressCache.IsAnyCacheProperty(property) && this.propertyChecker.IsItemPropertyWritable(property)) { this.WriteMessageProperty(property); } } if (!this.isEmbeddedItem && ObjectClass.IsMdn(this.item.ClassName) && this.item.Session is MailboxSession) { this.AppendTimeZoneInfo(); } }
internal static void CoreObjectUpdateSubjectPrefix(CoreItem coreItem) { if (coreItem.Session != null) { string valueOrDefault = coreItem.PropertyBag.GetValueOrDefault <string>(InternalSchema.ItemClass); LocalizedString localizedString; if (DsnMdnUtil.TryGetSubjectPrefix(valueOrDefault, out localizedString)) { CultureInfo formatProvider = coreItem.Session.InternalPreferedCulture; if (ObjectClass.IsMdn(valueOrDefault)) { formatProvider = ReportMessage.GetMdnCulture(coreItem); } coreItem.PropertyBag[InternalSchema.SubjectPrefix] = localizedString.ToString(formatProvider); } } }