public void PromoteProperty(AbstractInboundConverter converter, NativeStorePropertyDefinition property) { if (converter.CurrentComponentType == this.targetComponentType) { converter.PromoteProperty(property, true); } }
public void PromoteProperty(AbstractInboundConverter converter, NativeStorePropertyDefinition definition) { if (converter.CurrentComponentType == ConversionComponentType.Message) { converter.PromoteAddressProperty(definition); } }
public void PromoteProperty(AbstractInboundConverter converter, NativeStorePropertyDefinition property) { if ((property.PropertyFlags & PropertyFlags.ReadOnly) != PropertyFlags.ReadOnly) { converter.PromoteProperty(property, true); } }
public void PromoteProperty(AbstractInboundConverter converter, NativeStorePropertyDefinition property) { if (!converter.IsTopLevelMessage) { converter.PromoteProperty(property, true); return; } if ((property.PropertyFlags & PropertyFlags.Transmittable) == PropertyFlags.Transmittable) { converter.PromoteProperty(property, true); } }
public void PromoteProperty(AbstractInboundConverter converter, NativeStorePropertyDefinition property) { if (converter.CurrentComponentType == this.expectedComponentType) { converter.PromoteProperty(this.substituteProperty, false); return; } StorageGlobals.ContextTraceError <NativeStorePropertyDefinition, ConversionComponentType>(ExTraceGlobals.CcInboundTnefTracer, "SmartPropertyPromotionRule.PromoteProperty {0}, wrong component type {1}", property, converter.CurrentComponentType); if (this.promoteForOtherComponentTypes) { converter.PromoteProperty(property, false); } }
public void PromoteProperty(AbstractInboundConverter converter, NativeStorePropertyDefinition definition) { this.promotionDelegate(converter, definition); }
private static Dictionary <NativeStorePropertyDefinition, AbstractInboundConverter.IPromotionRule> CreateRulesTable() { Dictionary <NativeStorePropertyDefinition, AbstractInboundConverter.IPromotionRule> dictionary = new Dictionary <NativeStorePropertyDefinition, AbstractInboundConverter.IPromotionRule>(); AbstractInboundConverter.AddPromotionRule(dictionary, null, new NativeStorePropertyDefinition[] { InternalSchema.AttachNum }); AbstractInboundConverter.AddPromotionRule(dictionary, null, new NativeStorePropertyDefinition[] { InternalSchema.NativeBlockStatus }); AbstractInboundConverter.AddPromotionRule(dictionary, null, new NativeStorePropertyDefinition[] { InternalSchema.NativeBodyInfo }); AbstractInboundConverter.AddPromotionRule(dictionary, null, new NativeStorePropertyDefinition[] { InternalSchema.XMsExchOrganizationAVStampMailbox }); AbstractInboundConverter.AddPromotionRule(dictionary, null, new NativeStorePropertyDefinition[] { InternalSchema.QuarantineOriginalSender }); AbstractInboundConverter.AddPromotionRule(dictionary, null, new NativeStorePropertyDefinition[] { InternalSchema.LocallyDelivered, InternalSchema.EntryId }); AbstractInboundConverter.AddPromotionRule(dictionary, new AbstractInboundConverter.CustomRule(delegate(AbstractInboundConverter converter, NativeStorePropertyDefinition property) { if (converter.CanPromoteMimeOnlyProperties()) { converter.PromoteProperty(property, false); } }), new NativeStorePropertyDefinition[] { InternalSchema.SpamConfidenceLevel, InternalSchema.ContentFilterPcl, InternalSchema.SenderIdStatus, InternalSchema.PurportedSenderDomain, InternalSchema.IsClassified, InternalSchema.Classification, InternalSchema.ClassificationDescription, InternalSchema.ClassificationGuid, InternalSchema.ClassificationKeep, InternalSchema.XMsExchOrganizationAuthAs, InternalSchema.XMsExchOrganizationAuthDomain, InternalSchema.XMsExchOrganizationAuthMechanism, InternalSchema.XMsExchOrganizationAuthSource, InternalSchema.ApprovalAllowedDecisionMakers, InternalSchema.ApprovalRequestor }); AbstractInboundConverter.AddPromotionRule(dictionary, new AbstractInboundConverter.ComponentSpecificPromotionRule(ConversionComponentType.Message), new NativeStorePropertyDefinition[] { InternalSchema.UrlCompName }); AbstractInboundConverter.AddPromotionRule(dictionary, new AbstractInboundConverter.ComponentSpecificPromotionRule(ConversionComponentType.Recipient), new NativeStorePropertyDefinition[] { InternalSchema.ObjectType }); AbstractInboundConverter.AddPromotionRule(dictionary, new AbstractInboundConverter.ComponentSpecificPromotionRule(ConversionComponentType.FileAttachment), new NativeStorePropertyDefinition[] { InternalSchema.IsContactPhoto, InternalSchema.AttachCalendarHidden }); AbstractInboundConverter.AddPromotionRule(dictionary, null, new NativeStorePropertyDefinition[] { InternalSchema.SentMailSvrEId, InternalSchema.StoreEntryId, InternalSchema.StoreRecordKey, InternalSchema.ParentEntryId, InternalSchema.SourceKey, InternalSchema.CreatorEntryId, InternalSchema.LastModifierEntryId, InternalSchema.MdbProvider, InternalSchema.MappingSignature, InternalSchema.UrlCompNamePostfix, InternalSchema.MID, InternalSchema.Associated, InternalSchema.Size, InternalSchema.SentMailSvrEId, InternalSchema.SentMailEntryId, InternalSchema.PredictedActionsInternal, InternalSchema.GroupingActionsDeprecated, InternalSchema.PredictedActionsSummaryDeprecated, InternalSchema.AttachSize }); AbstractInboundConverter.AddPromotionRule(dictionary, new AbstractInboundConverter.SmartPropertyPromotionRule(InternalSchema.AutoResponseSuppress, ConversionComponentType.Message, true), new NativeStorePropertyDefinition[] { InternalSchema.AutoResponseSuppressInternal }); AbstractInboundConverter.AddPromotionRule(dictionary, new AbstractInboundConverter.SmartPropertyPromotionRule(InternalSchema.IsDeliveryReceiptRequested, ConversionComponentType.Message, true), new NativeStorePropertyDefinition[] { InternalSchema.IsDeliveryReceiptRequestedInternal }); AbstractInboundConverter.AddPromotionRule(dictionary, new AbstractInboundConverter.SmartPropertyPromotionRule(InternalSchema.IsNonDeliveryReceiptRequested, ConversionComponentType.Message, true), new NativeStorePropertyDefinition[] { InternalSchema.IsNonDeliveryReceiptRequestedInternal }); AbstractInboundConverter.AddPromotionRule(dictionary, new AbstractInboundConverter.SmartPropertyPromotionRule(InternalSchema.IsReadReceiptRequested, ConversionComponentType.Message, true), new NativeStorePropertyDefinition[] { InternalSchema.IsReadReceiptRequestedInternal }); AbstractInboundConverter.AddPromotionRule(dictionary, new AbstractInboundConverter.SmartPropertyPromotionRule(InternalSchema.IsNotReadReceiptRequested, ConversionComponentType.Message, true), new NativeStorePropertyDefinition[] { InternalSchema.IsNotReadReceiptRequestedInternal }); AbstractInboundConverter.AddPromotionRule(dictionary, new AbstractInboundConverter.CustomRule(delegate(AbstractInboundConverter converter, NativeStorePropertyDefinition property) { if (converter.IsLargeValue()) { StorageGlobals.ContextTraceError(ExTraceGlobals.CcInboundTnefTracer, "AbstractInboundConverter.ParseTnefProperty - subject value too big, ignoring..."); return; } string text = (string)converter.ReadValue(); if (text != null) { converter.messageWriter.SetSubjectProperty(property, text); } }), new NativeStorePropertyDefinition[] { InternalSchema.MapiSubject, InternalSchema.SubjectPrefixInternal, InternalSchema.NormalizedSubjectInternal }); AbstractInboundConverter.AddPromotionRule(dictionary, new AbstractInboundConverter.CustomRule(delegate(AbstractInboundConverter converter, NativeStorePropertyDefinition property) { if (converter.CurrentComponentType == ConversionComponentType.Message && !converter.ConversionOptions.ClearCategories) { converter.PromoteProperty(property, false); } }), new NativeStorePropertyDefinition[] { InternalSchema.Categories }); AbstractInboundConverter.AddPromotionRule(dictionary, new AbstractInboundConverter.CustomRule(delegate(AbstractInboundConverter converter, NativeStorePropertyDefinition property) { converter.PromoteInternetCpidProperty(); }), new NativeStorePropertyDefinition[] { InternalSchema.MapiInternetCpid }); AbstractInboundConverter.AddPromotionRule(dictionary, new AbstractInboundConverter.CustomRule(delegate(AbstractInboundConverter converter, NativeStorePropertyDefinition property) { if (converter.CurrentComponentType == ConversionComponentType.FileAttachment) { converter.PromoteProperty(property, true); return; } throw new ConversionFailedException(ConversionFailureReason.CorruptContent, ServerStrings.InvalidTnef, null); }), new NativeStorePropertyDefinition[] { InternalSchema.AttachDataBin }); AbstractInboundConverter.AddPromotionRule(dictionary, new AbstractInboundConverter.CustomRule(delegate(AbstractInboundConverter converter, NativeStorePropertyDefinition property) { if (converter.CurrentComponentType == ConversionComponentType.FileAttachment) { converter.PromoteAttachDataObject(); return; } throw new ConversionFailedException(ConversionFailureReason.CorruptContent, ServerStrings.InvalidTnef, null); }), new NativeStorePropertyDefinition[] { InternalSchema.AttachDataObj }); AbstractInboundConverter.AddPromotionRule(dictionary, new AbstractInboundConverter.CustomRule(delegate(AbstractInboundConverter converter, NativeStorePropertyDefinition property) { converter.PromoteMessageClass(); }), new NativeStorePropertyDefinition[] { InternalSchema.ItemClass }); AbstractInboundConverter.AddPromotionRule(dictionary, new AbstractInboundConverter.CustomRule(delegate(AbstractInboundConverter converter, NativeStorePropertyDefinition property) { converter.PromoteBodyProperty(property); }), new NativeStorePropertyDefinition[] { InternalSchema.TextBody, InternalSchema.HtmlBody, InternalSchema.RtfBody, InternalSchema.RtfInSync }); AbstractInboundConverter.AddAddressRule(dictionary); AbstractInboundConverter.AddPromotionRule(dictionary, new AbstractInboundConverter.CustomRule(delegate(AbstractInboundConverter converter, NativeStorePropertyDefinition property) { converter.PromoteTimeZoneProperty(property); }), new NativeStorePropertyDefinition[] { InternalSchema.TimeZone }); return(dictionary); }