private static void AddPromotionRule(Dictionary <NativeStorePropertyDefinition, AbstractInboundConverter.IPromotionRule> rulesTable, AbstractInboundConverter.IPromotionRule rule, params NativeStorePropertyDefinition[] properties) { foreach (NativeStorePropertyDefinition key in properties) { rulesTable[key] = rule; } }
protected AbstractInboundConverter.IPromotionRule GetPropertyPromotionRule(NativeStorePropertyDefinition property) { AbstractInboundConverter.IPromotionRule result = null; if (this.rules.TryGetValue(property, out result)) { return(result); } return(this.defaultPromotionRule); }
private static void AddAddressRule(Dictionary <NativeStorePropertyDefinition, AbstractInboundConverter.IPromotionRule> rulesTable) { HashSet <NativeStorePropertyDefinition> allCacheProperties = ConversionAddressCache.AllCacheProperties; AbstractInboundConverter.AddressPromotionRule value = new AbstractInboundConverter.AddressPromotionRule(); foreach (NativeStorePropertyDefinition key in allCacheProperties) { AbstractInboundConverter.IPromotionRule promotionRule = null; if (!rulesTable.TryGetValue(key, out promotionRule)) { rulesTable[key] = value; } } }
private void PromotePropertyList() { while (this.PropertyReader.ReadNextProperty()) { NativeStorePropertyDefinition nativeStorePropertyDefinition = this.CreatePropertyDefinition(); if (nativeStorePropertyDefinition != null) { AbstractInboundConverter.IPromotionRule propertyPromotionRule = base.GetPropertyPromotionRule(nativeStorePropertyDefinition); if (propertyPromotionRule != null) { propertyPromotionRule.PromoteProperty(this, nativeStorePropertyDefinition); } } } }
private void ParseTnefProperty(TnefPropertyReader propertyReader, bool forceTransmittable) { this.CheckTnefComplianceStatus(); TnefNameId?namedProperty = propertyReader.IsNamedProperty ? new TnefNameId?(propertyReader.PropertyNameId) : null; NativeStorePropertyDefinition nativeStorePropertyDefinition = base.CreatePropertyDefinition(propertyReader.PropertyTag, namedProperty); if (nativeStorePropertyDefinition == null) { return; } AbstractInboundConverter.IPromotionRule propertyPromotionRule = base.GetPropertyPromotionRule(nativeStorePropertyDefinition); if (propertyPromotionRule != null) { propertyPromotionRule.PromoteProperty(this, nativeStorePropertyDefinition); } }
protected AbstractInboundConverter(InboundMessageWriter writer, AbstractInboundConverter.IPromotionRule defaultPromotionRule) { this.messageWriter = writer; this.defaultPromotionRule = defaultPromotionRule; }