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; }
//http://en.wikipedia.org/wiki/E.161 public static bool UsedBy(Territory territory) { return(Nanp.Countries.Contains(territory.Name)); }
//http://en.wikipedia.org/wiki/E.161 public static bool UsedBy(Territory territory) { return Nanp.Countries.Contains(territory.Name); }
public abstract bool TryGetTerritory(string territoryName, out Territory territory);
private static string StripInternationalPrefix(Territory territory, string @string) { return @string.Gsub(territory.InternationalPrefix, ""); }
public Number(Territory territory, string nationalString) { Territory = territory; NationalString = nationalString; }
public bool Equals(Territory other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other.Name, Name); }
internal Number(Territory territory, string nationalString) { Territory = territory; NationalString = nationalString; }