Exemple #1
0
        public override bool TryGetTerritory(string name, out Territory territory)
        {
            Territory value;
            if (_territoriesByName.TryGetValue(name, out value))
            {
                territory = value;
                return true;
            }

            Region region;
            if ((region = RegionForTerritory(name)) != null
                && (territory = region.Territory(name)) != null)
            {
                _territoriesByName.Add(name, territory);
                return true;
            }
            territory = null;
            return false;
        }
Exemple #2
0
 //http://en.wikipedia.org/wiki/E.161
 public static bool UsedBy(Territory territory)
 {
     return(Nanp.Countries.Contains(territory.Name));
 }
Exemple #3
0
 //http://en.wikipedia.org/wiki/E.161
 public static bool UsedBy(Territory territory)
 {
     return Nanp.Countries.Contains(territory.Name);
 }
Exemple #4
0
 public abstract bool TryGetTerritory(string territoryName, out Territory territory);
Exemple #5
0
 private static string StripInternationalPrefix(Territory territory, string @string)
 {
     return @string.Gsub(territory.InternationalPrefix, "");
 }
Exemple #6
0
 public Number(Territory territory, string nationalString)
 {
     Territory = territory;
     NationalString = nationalString;
 }
Exemple #7
0
 public bool Equals(Territory other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other.Name, Name);
 }
Exemple #8
0
 public abstract bool TryGetTerritory(string territoryName, out Territory territory);
Exemple #9
0
 internal Number(Territory territory, string nationalString)
 {
     Territory      = territory;
     NationalString = nationalString;
 }