protected override string GenerateCompositePropertyValue(PropertyBag.BasicPropertyStore propertyBag)
        {
            AtomRuleCompositeProperty.FormattedSentenceContext formattedSentenceContext = new AtomRuleCompositeProperty.FormattedSentenceContext(propertyBag, this.placeholderCodeToPropDef);
            FormattedSentence formattedSentence = PhysicalAddressProperty.enUsPattern;
            string            text = formattedSentenceContext.ResolvePlaceholder("Region");

            if (text != null)
            {
                Dictionary <string, string> regionMap = PhysicalAddressProperty.addressData.Value.RegionMap;
                text = text.Trim();
                string key;
                if (regionMap.TryGetValue(text, out key))
                {
                    Dictionary <string, FormattedSentence> formatMap = PhysicalAddressProperty.addressData.Value.FormatMap;
                    FormattedSentence formattedSentence2;
                    if (formatMap.TryGetValue(key, out formattedSentence2))
                    {
                        formattedSentence = formattedSentence2;
                    }
                }
            }
            return(formattedSentence.Evaluate(formattedSentenceContext));
        }
Exemplo n.º 2
0
 private static string GenerateFileAsString(PropertyBag.BasicPropertyStore propertyBag, FormattedSentence formattedSentence)
 {
     return(formattedSentence.Evaluate(new AtomRuleCompositeProperty.FormattedSentenceContext(propertyBag, FileAsStringProperty.placeholderCodeToPropDef)));
 }