예제 #1
0
 public Builder AddMetadata(PhoneMetadata.Builder builderForValue)
 {
     if (builderForValue == null)
     {
         throw new ArgumentNullException(nameof(builderForValue));
     }
     MessageBeingBuilt.metadata.Add(builderForValue.Build());
     return(this);
 }
예제 #2
0
 public Builder SetMetadata(int index, PhoneMetadata.Builder builderForValue)
 {
     if (builderForValue == null)
     {
         throw new ArgumentNullException(nameof(builderForValue));
     }
     MessageBeingBuilt.metadata[index] = builderForValue.Build();
     return(this);
 }
        public static PhoneMetadata LoadCountryMetadata(String regionCode, XElement element, bool liteBuild)
        {
            String nationalPrefix = GetNationalPrefix(element);

            PhoneMetadata.Builder metadata =
                LoadTerritoryTagMetadata(regionCode, element, nationalPrefix);
            String nationalPrefixFormattingRule =
                GetNationalPrefixFormattingRuleFromElement(element, nationalPrefix);

            LoadAvailableFormats(metadata, element, nationalPrefix,
                                 nationalPrefixFormattingRule,
                                 element.HasAttribute(NATIONAL_PREFIX_OPTIONAL_WHEN_FORMATTING));
            LoadGeneralDesc(metadata, element, liteBuild);
            return(metadata.Build());
        }