diff --git a/csharp/PhoneNumbers.Converter/App.config b/csharp/PhoneNumbers.Converter/App.config
new file mode 100644
index 0000000..fad249e
--- /dev/null
+++ b/csharp/PhoneNumbers.Converter/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/csharp/PhoneNumbers.Converter/CountryCodeToRegionCodeMapGenerator.cs b/csharp/PhoneNumbers.Converter/CountryCodeToRegionCodeMapGenerator.cs
new file mode 100644
index 0000000..986dc0d
--- /dev/null
+++ b/csharp/PhoneNumbers.Converter/CountryCodeToRegionCodeMapGenerator.cs
@@ -0,0 +1,368 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version: 12.0.0.0
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+namespace PhoneNumbersConverter
+{
+ using System;
+ using System.IO;
+ using System.Collections;
+ using System.Collections.Generic;
+
+ ///
+ /// Class to produce the template output
+ ///
+
+ #line 1 "Z:\Projects\libphonenumber-csharp\csharp\PhoneNumbers.Converter\CountryCodeToRegionCodeMapGenerator.tt"
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "12.0.0.0")]
+ public partial class CountryCodeToRegionCodeMapGenerator : CountryCodeToRegionCodeMapGeneratorBase
+ {
+#line hidden
+ ///
+ /// Create the template output
+ ///
+ public virtual string TransformText()
+ {
+ this.Write("\n");
+ this.Write("\n");
+ this.Write("\n");
+ this.Write("\n");
+ this.Write("\n");
+ this.Write("\nusing System;\r\nusing System.Collections.Generic;\nnamespace ");
+
+ #line 2 "Z:\Projects\libphonenumber-csharp\csharp\PhoneNumbers.Converter\CountryCodeToRegionCodeMapGenerator.tt"
+ this.Write(this.ToStringHelper.ToStringWithCulture(_ns));
+
+ #line default
+ #line hidden
+ this.Write(" \n{\n public class ");
+
+ #line 2 "Z:\Projects\libphonenumber-csharp\csharp\PhoneNumbers.Converter\CountryCodeToRegionCodeMapGenerator.tt"
+ this.Write(this.ToStringHelper.ToStringWithCulture(_className));
+
+ #line default
+ #line hidden
+ this.Write("\n {\n\n private static readonly Dictionary> _countryCod" +
+ "eToRegionCodeMap = new Dictionary>\r\n {\r\n\t\t");
+
+ #line 4 "Z:\Projects\libphonenumber-csharp\csharp\PhoneNumbers.Converter\CountryCodeToRegionCodeMapGenerator.tt"
+
+ foreach(var kv in _map)
+ {
+ WriteLine(" {");
+ WriteLine(" " + kv.Key.ToString() + ",");
+ WriteLine(" new List");
+ WriteLine(" {");
+ foreach(var item in kv.Value)
+ {
+ WriteLine(" \"" + item + "\",");
+ }
+ WriteLine(" }");
+ WriteLine(" },");
+ }
+
+
+ #line default
+ #line hidden
+ this.Write("\n };\r\n \r\n\r\n public static Dictionary> GetC" +
+ "ountryCodeToRegionCodeMap()\r\n {\r\n return _countryCodeToRegionC" +
+ "odeMap;\r\n }\n }\n}\n");
+ return this.GenerationEnvironment.ToString();
+ }
+ private global::Microsoft.VisualStudio.TextTemplating.ITextTemplatingEngineHost hostValue;
+ ///
+ /// The current host for the text templating engine
+ ///
+ public virtual global::Microsoft.VisualStudio.TextTemplating.ITextTemplatingEngineHost Host
+ {
+ get
+ {
+ return this.hostValue;
+ }
+ set
+ {
+ this.hostValue = value;
+ }
+ }
+ }
+
+ #line default
+ #line hidden
+ #region Base class
+ ///
+ /// Base class for this transformation
+ ///
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "12.0.0.0")]
+ public class CountryCodeToRegionCodeMapGeneratorBase
+ {
+ #region Fields
+ private global::System.Text.StringBuilder generationEnvironmentField;
+ private global::System.CodeDom.Compiler.CompilerErrorCollection errorsField;
+ private global::System.Collections.Generic.List indentLengthsField;
+ private string currentIndentField = "";
+ private bool endsWithNewline;
+ private global::System.Collections.Generic.IDictionary sessionField;
+ #endregion
+ #region Properties
+ ///
+ /// The string builder that generation-time code is using to assemble generated output
+ ///
+ protected System.Text.StringBuilder GenerationEnvironment
+ {
+ get
+ {
+ if ((this.generationEnvironmentField == null))
+ {
+ this.generationEnvironmentField = new global::System.Text.StringBuilder();
+ }
+ return this.generationEnvironmentField;
+ }
+ set
+ {
+ this.generationEnvironmentField = value;
+ }
+ }
+ ///
+ /// The error collection for the generation process
+ ///
+ public System.CodeDom.Compiler.CompilerErrorCollection Errors
+ {
+ get
+ {
+ if ((this.errorsField == null))
+ {
+ this.errorsField = new global::System.CodeDom.Compiler.CompilerErrorCollection();
+ }
+ return this.errorsField;
+ }
+ }
+ ///
+ /// A list of the lengths of each indent that was added with PushIndent
+ ///
+ private System.Collections.Generic.List indentLengths
+ {
+ get
+ {
+ if ((this.indentLengthsField == null))
+ {
+ this.indentLengthsField = new global::System.Collections.Generic.List();
+ }
+ return this.indentLengthsField;
+ }
+ }
+ ///
+ /// Gets the current indent we use when adding lines to the output
+ ///
+ public string CurrentIndent
+ {
+ get
+ {
+ return this.currentIndentField;
+ }
+ }
+ ///
+ /// Current transformation session
+ ///
+ public virtual global::System.Collections.Generic.IDictionary Session
+ {
+ get
+ {
+ return this.sessionField;
+ }
+ set
+ {
+ this.sessionField = value;
+ }
+ }
+ #endregion
+ #region Transform-time helpers
+ ///
+ /// Write text directly into the generated output
+ ///
+ public void Write(string textToAppend)
+ {
+ if (string.IsNullOrEmpty(textToAppend))
+ {
+ return;
+ }
+ // If we're starting off, or if the previous text ended with a newline,
+ // we have to append the current indent first.
+ if (((this.GenerationEnvironment.Length == 0)
+ || this.endsWithNewline))
+ {
+ this.GenerationEnvironment.Append(this.currentIndentField);
+ this.endsWithNewline = false;
+ }
+ // Check if the current text ends with a newline
+ if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture))
+ {
+ this.endsWithNewline = true;
+ }
+ // This is an optimization. If the current indent is "", then we don't have to do any
+ // of the more complex stuff further down.
+ if ((this.currentIndentField.Length == 0))
+ {
+ this.GenerationEnvironment.Append(textToAppend);
+ return;
+ }
+ // Everywhere there is a newline in the text, add an indent after it
+ textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
+ // If the text ends with a newline, then we should strip off the indent added at the very end
+ // because the appropriate indent will be added when the next time Write() is called
+ if (this.endsWithNewline)
+ {
+ this.GenerationEnvironment.Append(textToAppend, 0, (textToAppend.Length - this.currentIndentField.Length));
+ }
+ else
+ {
+ this.GenerationEnvironment.Append(textToAppend);
+ }
+ }
+ ///
+ /// Write text directly into the generated output
+ ///
+ public void WriteLine(string textToAppend)
+ {
+ this.Write(textToAppend);
+ this.GenerationEnvironment.AppendLine();
+ this.endsWithNewline = true;
+ }
+ ///
+ /// Write formatted text directly into the generated output
+ ///
+ public void Write(string format, params object[] args)
+ {
+ this.Write(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
+ }
+ ///
+ /// Write formatted text directly into the generated output
+ ///
+ public void WriteLine(string format, params object[] args)
+ {
+ this.WriteLine(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, format, args));
+ }
+ ///
+ /// Raise an error
+ ///
+ public void Error(string message)
+ {
+ System.CodeDom.Compiler.CompilerError error = new global::System.CodeDom.Compiler.CompilerError();
+ error.ErrorText = message;
+ this.Errors.Add(error);
+ }
+ ///
+ /// Raise a warning
+ ///
+ public void Warning(string message)
+ {
+ System.CodeDom.Compiler.CompilerError error = new global::System.CodeDom.Compiler.CompilerError();
+ error.ErrorText = message;
+ error.IsWarning = true;
+ this.Errors.Add(error);
+ }
+ ///
+ /// Increase the indent
+ ///
+ public void PushIndent(string indent)
+ {
+ if ((indent == null))
+ {
+ throw new global::System.ArgumentNullException("indent");
+ }
+ this.currentIndentField = (this.currentIndentField + indent);
+ this.indentLengths.Add(indent.Length);
+ }
+ ///
+ /// Remove the last indent that was added with PushIndent
+ ///
+ public string PopIndent()
+ {
+ string returnValue = "";
+ if ((this.indentLengths.Count > 0))
+ {
+ int indentLength = this.indentLengths[(this.indentLengths.Count - 1)];
+ this.indentLengths.RemoveAt((this.indentLengths.Count - 1));
+ if ((indentLength > 0))
+ {
+ returnValue = this.currentIndentField.Substring((this.currentIndentField.Length - indentLength));
+ this.currentIndentField = this.currentIndentField.Remove((this.currentIndentField.Length - indentLength));
+ }
+ }
+ return returnValue;
+ }
+ ///
+ /// Remove any indentation
+ ///
+ public void ClearIndent()
+ {
+ this.indentLengths.Clear();
+ this.currentIndentField = "";
+ }
+ #endregion
+ #region ToString Helpers
+ ///
+ /// Utility class to produce culture-oriented representation of an object as a string.
+ ///
+ public class ToStringInstanceHelper
+ {
+ private System.IFormatProvider formatProviderField = global::System.Globalization.CultureInfo.InvariantCulture;
+ ///
+ /// Gets or sets format provider to be used by ToStringWithCulture method.
+ ///
+ public System.IFormatProvider FormatProvider
+ {
+ get
+ {
+ return this.formatProviderField ;
+ }
+ set
+ {
+ if ((value != null))
+ {
+ this.formatProviderField = value;
+ }
+ }
+ }
+ ///
+ /// This is called from the compile/run appdomain to convert objects within an expression block to a string
+ ///
+ public string ToStringWithCulture(object objectToConvert)
+ {
+ if ((objectToConvert == null))
+ {
+ throw new global::System.ArgumentNullException("objectToConvert");
+ }
+ System.Type t = objectToConvert.GetType();
+ System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
+ typeof(System.IFormatProvider)});
+ if ((method == null))
+ {
+ return objectToConvert.ToString();
+ }
+ else
+ {
+ return ((string)(method.Invoke(objectToConvert, new object[] {
+ this.formatProviderField })));
+ }
+ }
+ }
+ private ToStringInstanceHelper toStringHelperField = new ToStringInstanceHelper();
+ ///
+ /// Helper to produce culture-oriented representation of an object as a string
+ ///
+ public ToStringInstanceHelper ToStringHelper
+ {
+ get
+ {
+ return this.toStringHelperField;
+ }
+ }
+ #endregion
+ }
+ #endregion
+}
diff --git a/csharp/PhoneNumbers.Converter/CountryCodeToRegionCodeMapGenerator.params.cs b/csharp/PhoneNumbers.Converter/CountryCodeToRegionCodeMapGenerator.params.cs
new file mode 100644
index 0000000..5e927e8
--- /dev/null
+++ b/csharp/PhoneNumbers.Converter/CountryCodeToRegionCodeMapGenerator.params.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+
+namespace PhoneNumbersConverter
+{
+ public partial class CountryCodeToRegionCodeMapGenerator
+ {
+ private readonly string _ns;
+ private readonly string _className;
+ private readonly IReadOnlyDictionary> _map;
+
+ public CountryCodeToRegionCodeMapGenerator(string @namespace, string className, IReadOnlyDictionary> map)
+ {
+ _ns = @namespace;
+ _className = className;
+ _map = map;
+ }
+ }
+}
diff --git a/csharp/PhoneNumbers.Converter/CountryCodeToRegionCodeMapGenerator.tt b/csharp/PhoneNumbers.Converter/CountryCodeToRegionCodeMapGenerator.tt
new file mode 100644
index 0000000..a473ebb
--- /dev/null
+++ b/csharp/PhoneNumbers.Converter/CountryCodeToRegionCodeMapGenerator.tt
@@ -0,0 +1,39 @@
+<#@ template debug="true" hostSpecific="true" #>
+<#@ output extension=".cs" #>
+<#@ import namespace="System" #>
+<#@ import namespace="System.IO" #>
+<#@ import namespace="System.Collections" #>
+<#@ import namespace="System.Collections.Generic" #>
+using System;
+using System.Collections.Generic;
+namespace <#=_ns#>
+{
+ public class <#=_className#>
+ {
+
+ private static readonly Dictionary> _countryCodeToRegionCodeMap = new Dictionary>
+ {
+ <#
+ foreach(var kv in _map)
+ {
+ WriteLine(" {");
+ WriteLine(" " + kv.Key.ToString() + ",");
+ WriteLine(" new List");
+ WriteLine(" {");
+ foreach(var item in kv.Value)
+ {
+ WriteLine(" \"" + item + "\",");
+ }
+ WriteLine(" }");
+ WriteLine(" },");
+ }
+ #>
+ };
+
+
+ public static Dictionary> GetCountryCodeToRegionCodeMap()
+ {
+ return _countryCodeToRegionCodeMap;
+ }
+ }
+}
diff --git a/csharp/PhoneNumbers.Converter/PhoneNumbers.Converter.csproj b/csharp/PhoneNumbers.Converter/PhoneNumbers.Converter.csproj
new file mode 100644
index 0000000..a141398
--- /dev/null
+++ b/csharp/PhoneNumbers.Converter/PhoneNumbers.Converter.csproj
@@ -0,0 +1,79 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {8B50EC63-29CD-4A53-A317-EDB7303A7909}
+ Exe
+ Properties
+ PhoneNumbersConverter
+ PhoneNumbersConverter
+ v4.5
+ 512
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+ ..\lib\Google.ProtocolBuffers.dll
+
+
+
+
+
+
+
+ True
+ True
+ CountryCodeToRegionCodeMapGenerator.tt
+ Always
+
+
+
+
+
+
+
+
+ TextTemplatingFilePreprocessor
+ CountryCodeToRegionCodeMapGenerator.cs
+ Always
+
+
+
+
+ {2dcd7c72-1a52-4961-88bc-b2e0bcc01b88}
+ PhoneNumbers
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/csharp/PhoneNumbers.Converter/Program.cs b/csharp/PhoneNumbers.Converter/Program.cs
new file mode 100644
index 0000000..22ad979
--- /dev/null
+++ b/csharp/PhoneNumbers.Converter/Program.cs
@@ -0,0 +1,68 @@
+using System;
+using System.Globalization;
+using System.IO;
+using PhoneNumbers;
+
+namespace PhoneNumbersConverter
+{
+ class Program
+ {
+ private static void GenerateProtofBuf(string inputFileName, string outputFileName)
+ {
+ var file = File.OpenRead(inputFileName);
+ var meta = BuildMetadataFromXml.BuildPhoneMetadataCollection(file, false);
+
+ var countryCodeToRegionCodeMap = BuildMetadataFromXml.BuildCountryCodeToRegionCodeMap(meta);
+
+ var className = Path.GetFileNameWithoutExtension(outputFileName);
+
+ var generator = new CountryCodeToRegionCodeMapGenerator("PhoneNumbers", className, countryCodeToRegionCodeMap);
+ var code = generator.TransformText();
+
+ File.WriteAllText(outputFileName, code);
+ }
+
+ private static void GenerateCountryCodeToRegionCodeMap(string inputFileName, string outputDirectory, string filePrefix)
+ {
+ Directory.CreateDirectory(outputDirectory);
+
+ var file = File.OpenRead(inputFileName);
+ var meta = BuildMetadataFromXml.BuildPhoneMetadataCollection(file, false);
+ for (var i = 0; i < meta.MetadataCount; ++i)
+ {
+ var data = meta.GetMetadata(i);
+ var regionCode = data.Id;
+
+ if (string.IsNullOrEmpty(regionCode) || regionCode.Equals("001"))
+ {
+ regionCode = data.CountryCode.ToString(CultureInfo.InvariantCulture);
+ }
+
+ var outMetadataCollection = new PhoneMetadataCollection();
+ outMetadataCollection.MetadataList.Add(data);
+
+ var outputFileName = Path.Combine(outputDirectory, filePrefix + "_" + regionCode);
+
+ var outputForRegion = File.OpenWrite(outputFileName);
+ outMetadataCollection.WriteTo(outputForRegion);
+ }
+ }
+
+ static void Main(string[] args)
+ {
+ if (args.Length == 3)
+ {
+ GenerateCountryCodeToRegionCodeMap(args[0], args[1], args[2]);
+ }
+ else if (args.Length == 2)
+ {
+ GenerateProtofBuf(args[0], args[1]);
+ }
+ else
+ {
+ Console.WriteLine("Usage: PhoneNumbersConverter input_file output_directory output_prefix");
+ Console.WriteLine("Usage: PhoneNumbersConverter input_file countrycode_to_regioncode_output_file");
+ }
+ }
+ }
+}
diff --git a/csharp/PhoneNumbers.Converter/Properties/AssemblyInfo.cs b/csharp/PhoneNumbers.Converter/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..51c1846
--- /dev/null
+++ b/csharp/PhoneNumbers.Converter/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("PhoneNumbersConverter")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("PhoneNumbersConverter")]
+[assembly: AssemblyCopyright("Copyright © 2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("6338f249-f071-4116-858d-fdb266402318")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/csharp/PhoneNumbers.Test/CountryCodeToRegionCodeMapForTesting.cs b/csharp/PhoneNumbers.Test/CountryCodeToRegionCodeMapForTesting.cs
index e8808af..ca9a01a 100644
--- a/csharp/PhoneNumbers.Test/CountryCodeToRegionCodeMapForTesting.cs
+++ b/csharp/PhoneNumbers.Test/CountryCodeToRegionCodeMapForTesting.cs
@@ -1,35 +1,153 @@
-/*
- * Copyright (C) 2010 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+
+
+
+
+
+
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using System.Collections.Generic;
+namespace PhoneNumbers
+{
+ public class CountryCodeToRegionCodeMapForTesting
+ {
+
+ private static readonly Dictionary> _countryCodeToRegionCodeMap = new Dictionary>
+ {
+ {
+ 376,
+ new List
+ {
+ "AD",
+ }
+ },
+ {
+ 244,
+ new List
+ {
+ "AO",
+ }
+ },
+ {
+ 54,
+ new List
+ {
+ "AR",
+ }
+ },
+ {
+ 61,
+ new List
+ {
+ "AU",
+ }
+ },
+ {
+ 55,
+ new List
+ {
+ "BR",
+ }
+ },
+ {
+ 1,
+ new List
+ {
+ "US",
+ "BS",
+ }
+ },
+ {
+ 49,
+ new List
+ {
+ "DE",
+ }
+ },
+ {
+ 44,
+ new List
+ {
+ "GB",
+ }
+ },
+ {
+ 39,
+ new List
+ {
+ "IT",
+ }
+ },
+ {
+ 81,
+ new List
+ {
+ "JP",
+ }
+ },
+ {
+ 82,
+ new List
+ {
+ "KR",
+ }
+ },
+ {
+ 52,
+ new List
+ {
+ "MX",
+ }
+ },
+ {
+ 64,
+ new List
+ {
+ "NZ",
+ }
+ },
+ {
+ 48,
+ new List
+ {
+ "PL",
+ }
+ },
+ {
+ 262,
+ new List
+ {
+ "RE",
+ "YT",
+ }
+ },
+ {
+ 65,
+ new List
+ {
+ "SG",
+ }
+ },
+ {
+ 800,
+ new List
+ {
+ "001",
+ }
+ },
+ {
+ 979,
+ new List
+ {
+ "001",
+ }
+ },
+
+ };
+
-namespace PhoneNumbers.Test
-{
- class CountryCodeToRegionCodeMapForTesting
- {
- // A mapping from a country code to the region codes which denote the
- // country/region represented by that country code. In the case of multiple
- // countries sharing a calling code, such as the NANPA countries, the one
- // indicated with "isMainCountryForCode" in the metadata should be first.
- internal static Dictionary> GetCountryCodeToRegionCodeMap()
+ public static Dictionary> GetCountryCodeToRegionCodeMap()
{
- return BuildMetadataFromXml.GetCountryCodeToRegionCodeMap(
- TestMetadataTestCase.TEST_META_DATA_FILE_PREFIX);
- }
- }
-}
+ return _countryCodeToRegionCodeMap;
+ }
+ }
+}
diff --git a/csharp/PhoneNumbers.Test/PhoneNumbers.Test.csproj b/csharp/PhoneNumbers.Test/PhoneNumbers.Test.csproj
index 2179c46..8bb63fe 100644
--- a/csharp/PhoneNumbers.Test/PhoneNumbers.Test.csproj
+++ b/csharp/PhoneNumbers.Test/PhoneNumbers.Test.csproj
@@ -42,6 +42,9 @@
+
+ ..\lib\Google.ProtocolBuffers.dll
+
False
..\lib\nunit.framework.dll
diff --git a/csharp/PhoneNumbers.Test/TestMetadataTestCase.cs b/csharp/PhoneNumbers.Test/TestMetadataTestCase.cs
index 5ca18c7..0fae4b0 100644
--- a/csharp/PhoneNumbers.Test/TestMetadataTestCase.cs
+++ b/csharp/PhoneNumbers.Test/TestMetadataTestCase.cs
@@ -32,7 +32,7 @@ namespace PhoneNumbers.Test
*/
class TestMetadataTestCase
{
- public const String TEST_META_DATA_FILE_PREFIX = "PhoneNumberMetaDataForTesting.xml";
+ public const String TEST_META_DATA_FILE_PREFIX = "PhoneNumberMetadataForTestingProto";
protected PhoneNumberUtil phoneUtil;
diff --git a/csharp/PhoneNumbers.Test/TestPhoneNumberUtil.cs b/csharp/PhoneNumbers.Test/TestPhoneNumberUtil.cs
index 0dca471..8d73785 100644
--- a/csharp/PhoneNumbers.Test/TestPhoneNumberUtil.cs
+++ b/csharp/PhoneNumbers.Test/TestPhoneNumberUtil.cs
@@ -1160,9 +1160,16 @@ public void TestIsValidForRegion()
invalidNumber = new PhoneNumber.Builder().SetCountryCode(3923).SetNationalNumber(2366L).Build();
Assert.False(phoneUtil.IsValidNumberForRegion(invalidNumber, RegionCode.ZZ));
Assert.False(phoneUtil.IsValidNumberForRegion(invalidNumber, RegionCode.UN001));
- invalidNumber = new PhoneNumber.Builder().SetCountryCode(0).Build();
- Assert.False(phoneUtil.IsValidNumberForRegion(invalidNumber, RegionCode.UN001));
- Assert.False(phoneUtil.IsValidNumberForRegion(invalidNumber, RegionCode.ZZ));
+
+ try
+ {
+ invalidNumber = new PhoneNumber.Builder().SetCountryCode(0).Build();
+ Assert.False(phoneUtil.IsValidNumberForRegion(invalidNumber, RegionCode.UN001));
+ Assert.False(phoneUtil.IsValidNumberForRegion(invalidNumber, RegionCode.ZZ));
+ }
+ catch (Google.ProtocolBuffers.UninitializedMessageException)
+ {
+ }
}
[Test]
diff --git a/csharp/PhoneNumbers.Test/TestPhonenumber.cs b/csharp/PhoneNumbers.Test/TestPhonenumber.cs
index c77e451..fde7334 100644
--- a/csharp/PhoneNumbers.Test/TestPhonenumber.cs
+++ b/csharp/PhoneNumbers.Test/TestPhonenumber.cs
@@ -47,7 +47,7 @@ public void TestEqualWithItalianLeadingZeroSetToDefault()
.SetCountryCode(1).SetNationalNumber(6502530000L).Build();
// These should still be equal, since the default value for this field is false.
- Assert.AreEqual(numberA, numberB);
+ Assert.AreEqual(numberA.ItalianLeadingZero, numberB.ItalianLeadingZero);
Assert.AreEqual(numberA.GetHashCode(), numberB.GetHashCode());
}
diff --git a/csharp/PhoneNumbers.sln b/csharp/PhoneNumbers.sln
index 1c54f1e..5f509e4 100644
--- a/csharp/PhoneNumbers.sln
+++ b/csharp/PhoneNumbers.sln
@@ -1,10 +1,14 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
+# Visual Studio 2013
+VisualStudioVersion = 12.0.30501.0
+MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PhoneNumbers", "PhoneNumbers\PhoneNumbers.csproj", "{2DCD7C72-1A52-4961-88BC-B2E0BCC01B88}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PhoneNumbers.Test", "PhoneNumbers.Test\PhoneNumbers.Test.csproj", "{8E08D659-BBF6-4967-A56E-EA695DA6B45C}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PhoneNumbersConverter", "PhoneNumbers.Converter\PhoneNumbers.Converter.csproj", "{8B50EC63-29CD-4A53-A317-EDB7303A7909}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_Silverlight2|Any CPU = Debug_Silverlight2|Any CPU
@@ -34,6 +38,16 @@ Global
{8E08D659-BBF6-4967-A56E-EA695DA6B45C}.Release|Any CPU.Build.0 = Release|Any CPU
{8E08D659-BBF6-4967-A56E-EA695DA6B45C}.Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
{8E08D659-BBF6-4967-A56E-EA695DA6B45C}.Silverlight2|Any CPU.Build.0 = Release|Any CPU
+ {8B50EC63-29CD-4A53-A317-EDB7303A7909}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+ {8B50EC63-29CD-4A53-A317-EDB7303A7909}.Debug_Silverlight2|Any CPU.Build.0 = Debug|Any CPU
+ {8B50EC63-29CD-4A53-A317-EDB7303A7909}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8B50EC63-29CD-4A53-A317-EDB7303A7909}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8B50EC63-29CD-4A53-A317-EDB7303A7909}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+ {8B50EC63-29CD-4A53-A317-EDB7303A7909}.Release_Silverlight2|Any CPU.Build.0 = Release|Any CPU
+ {8B50EC63-29CD-4A53-A317-EDB7303A7909}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8B50EC63-29CD-4A53-A317-EDB7303A7909}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8B50EC63-29CD-4A53-A317-EDB7303A7909}.Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+ {8B50EC63-29CD-4A53-A317-EDB7303A7909}.Silverlight2|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/csharp/PhoneNumbers/AlternateFormatsCountryCodeToRegionCodeMap.cs b/csharp/PhoneNumbers/AlternateFormatsCountryCodeToRegionCodeMap.cs
new file mode 100644
index 0000000..02065c4
--- /dev/null
+++ b/csharp/PhoneNumbers/AlternateFormatsCountryCodeToRegionCodeMap.cs
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+using System;
+using System.Collections.Generic;
+namespace PhoneNumbers
+{
+ public class AlternateFormatsCountryCodeToRegionCodeMap
+ {
+
+ private static readonly Dictionary> _countryCodeToRegionCodeMap = new Dictionary>
+ {
+ {
+ 61,
+ new List
+ {
+ }
+ },
+ {
+ 43,
+ new List
+ {
+ }
+ },
+ {
+ 55,
+ new List
+ {
+ }
+ },
+ {
+ 49,
+ new List
+ {
+ }
+ },
+ {
+ 44,
+ new List
+ {
+ }
+ },
+ {
+ 81,
+ new List
+ {
+ }
+ },
+
+ };
+
+
+ public static Dictionary> GetCountryCodeToRegionCodeMap()
+ {
+ return _countryCodeToRegionCodeMap;
+ }
+ }
+}
diff --git a/csharp/PhoneNumbers/CountryCodeToRegionCodeMap.cs b/csharp/PhoneNumbers/CountryCodeToRegionCodeMap.cs
index 9a50940..89d8382 100644
--- a/csharp/PhoneNumbers/CountryCodeToRegionCodeMap.cs
+++ b/csharp/PhoneNumbers/CountryCodeToRegionCodeMap.cs
@@ -1,35 +1,1567 @@
-/*
- * Copyright (C) 2010 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+
+
+
+
+
+
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using System.Collections.Generic;
+namespace PhoneNumbers
+{
+ public class CountryCodeToRegionCodeMap
+ {
+
+ private static readonly Dictionary> _countryCodeToRegionCodeMap = new Dictionary>
+ {
+ {
+ 247,
+ new List
+ {
+ "AC",
+ }
+ },
+ {
+ 376,
+ new List
+ {
+ "AD",
+ }
+ },
+ {
+ 971,
+ new List
+ {
+ "AE",
+ }
+ },
+ {
+ 93,
+ new List
+ {
+ "AF",
+ }
+ },
+ {
+ 1,
+ new List
+ {
+ "US",
+ "AG",
+ "AI",
+ "AS",
+ "BB",
+ "BM",
+ "BS",
+ "CA",
+ "DM",
+ "DO",
+ "GD",
+ "GU",
+ "JM",
+ "KN",
+ "KY",
+ "LC",
+ "MP",
+ "MS",
+ "PR",
+ "SX",
+ "TC",
+ "TT",
+ "VC",
+ "VG",
+ "VI",
+ }
+ },
+ {
+ 355,
+ new List
+ {
+ "AL",
+ }
+ },
+ {
+ 374,
+ new List
+ {
+ "AM",
+ }
+ },
+ {
+ 599,
+ new List
+ {
+ "CW",
+ "AN",
+ "BQ",
+ }
+ },
+ {
+ 244,
+ new List
+ {
+ "AO",
+ }
+ },
+ {
+ 54,
+ new List
+ {
+ "AR",
+ }
+ },
+ {
+ 43,
+ new List
+ {
+ "AT",
+ }
+ },
+ {
+ 61,
+ new List
+ {
+ "AU",
+ "CC",
+ "CX",
+ }
+ },
+ {
+ 297,
+ new List
+ {
+ "AW",
+ }
+ },
+ {
+ 358,
+ new List
+ {
+ "FI",
+ "AX",
+ }
+ },
+ {
+ 994,
+ new List
+ {
+ "AZ",
+ }
+ },
+ {
+ 387,
+ new List
+ {
+ "BA",
+ }
+ },
+ {
+ 880,
+ new List
+ {
+ "BD",
+ }
+ },
+ {
+ 32,
+ new List
+ {
+ "BE",
+ }
+ },
+ {
+ 226,
+ new List
+ {
+ "BF",
+ }
+ },
+ {
+ 359,
+ new List
+ {
+ "BG",
+ }
+ },
+ {
+ 973,
+ new List
+ {
+ "BH",
+ }
+ },
+ {
+ 257,
+ new List
+ {
+ "BI",
+ }
+ },
+ {
+ 229,
+ new List
+ {
+ "BJ",
+ }
+ },
+ {
+ 590,
+ new List
+ {
+ "GP",
+ "BL",
+ "MF",
+ }
+ },
+ {
+ 673,
+ new List
+ {
+ "BN",
+ }
+ },
+ {
+ 591,
+ new List
+ {
+ "BO",
+ }
+ },
+ {
+ 55,
+ new List
+ {
+ "BR",
+ }
+ },
+ {
+ 975,
+ new List
+ {
+ "BT",
+ }
+ },
+ {
+ 267,
+ new List
+ {
+ "BW",
+ }
+ },
+ {
+ 375,
+ new List
+ {
+ "BY",
+ }
+ },
+ {
+ 501,
+ new List
+ {
+ "BZ",
+ }
+ },
+ {
+ 243,
+ new List
+ {
+ "CD",
+ }
+ },
+ {
+ 236,
+ new List
+ {
+ "CF",
+ }
+ },
+ {
+ 242,
+ new List
+ {
+ "CG",
+ }
+ },
+ {
+ 41,
+ new List
+ {
+ "CH",
+ }
+ },
+ {
+ 225,
+ new List
+ {
+ "CI",
+ }
+ },
+ {
+ 682,
+ new List
+ {
+ "CK",
+ }
+ },
+ {
+ 56,
+ new List
+ {
+ "CL",
+ }
+ },
+ {
+ 237,
+ new List
+ {
+ "CM",
+ }
+ },
+ {
+ 86,
+ new List
+ {
+ "CN",
+ }
+ },
+ {
+ 57,
+ new List
+ {
+ "CO",
+ }
+ },
+ {
+ 506,
+ new List
+ {
+ "CR",
+ }
+ },
+ {
+ 53,
+ new List
+ {
+ "CU",
+ }
+ },
+ {
+ 238,
+ new List
+ {
+ "CV",
+ }
+ },
+ {
+ 357,
+ new List
+ {
+ "CY",
+ }
+ },
+ {
+ 420,
+ new List
+ {
+ "CZ",
+ }
+ },
+ {
+ 49,
+ new List
+ {
+ "DE",
+ }
+ },
+ {
+ 253,
+ new List
+ {
+ "DJ",
+ }
+ },
+ {
+ 45,
+ new List
+ {
+ "DK",
+ }
+ },
+ {
+ 213,
+ new List
+ {
+ "DZ",
+ }
+ },
+ {
+ 593,
+ new List
+ {
+ "EC",
+ }
+ },
+ {
+ 372,
+ new List
+ {
+ "EE",
+ }
+ },
+ {
+ 20,
+ new List
+ {
+ "EG",
+ }
+ },
+ {
+ 291,
+ new List
+ {
+ "ER",
+ }
+ },
+ {
+ 34,
+ new List
+ {
+ "ES",
+ }
+ },
+ {
+ 251,
+ new List
+ {
+ "ET",
+ }
+ },
+ {
+ 679,
+ new List
+ {
+ "FJ",
+ }
+ },
+ {
+ 500,
+ new List
+ {
+ "FK",
+ }
+ },
+ {
+ 691,
+ new List
+ {
+ "FM",
+ }
+ },
+ {
+ 298,
+ new List
+ {
+ "FO",
+ }
+ },
+ {
+ 33,
+ new List
+ {
+ "FR",
+ }
+ },
+ {
+ 241,
+ new List
+ {
+ "GA",
+ }
+ },
+ {
+ 44,
+ new List
+ {
+ "GB",
+ "GG",
+ "IM",
+ "JE",
+ }
+ },
+ {
+ 995,
+ new List
+ {
+ "GE",
+ }
+ },
+ {
+ 594,
+ new List
+ {
+ "GF",
+ }
+ },
+ {
+ 233,
+ new List
+ {
+ "GH",
+ }
+ },
+ {
+ 350,
+ new List
+ {
+ "GI",
+ }
+ },
+ {
+ 299,
+ new List
+ {
+ "GL",
+ }
+ },
+ {
+ 220,
+ new List
+ {
+ "GM",
+ }
+ },
+ {
+ 224,
+ new List
+ {
+ "GN",
+ }
+ },
+ {
+ 240,
+ new List
+ {
+ "GQ",
+ }
+ },
+ {
+ 30,
+ new List
+ {
+ "GR",
+ }
+ },
+ {
+ 502,
+ new List
+ {
+ "GT",
+ }
+ },
+ {
+ 245,
+ new List
+ {
+ "GW",
+ }
+ },
+ {
+ 592,
+ new List
+ {
+ "GY",
+ }
+ },
+ {
+ 852,
+ new List
+ {
+ "HK",
+ }
+ },
+ {
+ 504,
+ new List
+ {
+ "HN",
+ }
+ },
+ {
+ 385,
+ new List
+ {
+ "HR",
+ }
+ },
+ {
+ 509,
+ new List
+ {
+ "HT",
+ }
+ },
+ {
+ 36,
+ new List
+ {
+ "HU",
+ }
+ },
+ {
+ 62,
+ new List
+ {
+ "ID",
+ }
+ },
+ {
+ 353,
+ new List
+ {
+ "IE",
+ }
+ },
+ {
+ 972,
+ new List
+ {
+ "IL",
+ }
+ },
+ {
+ 91,
+ new List
+ {
+ "IN",
+ }
+ },
+ {
+ 246,
+ new List
+ {
+ "IO",
+ }
+ },
+ {
+ 964,
+ new List
+ {
+ "IQ",
+ }
+ },
+ {
+ 98,
+ new List
+ {
+ "IR",
+ }
+ },
+ {
+ 354,
+ new List
+ {
+ "IS",
+ }
+ },
+ {
+ 39,
+ new List
+ {
+ "IT",
+ }
+ },
+ {
+ 962,
+ new List
+ {
+ "JO",
+ }
+ },
+ {
+ 81,
+ new List
+ {
+ "JP",
+ }
+ },
+ {
+ 254,
+ new List
+ {
+ "KE",
+ }
+ },
+ {
+ 996,
+ new List
+ {
+ "KG",
+ }
+ },
+ {
+ 855,
+ new List
+ {
+ "KH",
+ }
+ },
+ {
+ 686,
+ new List
+ {
+ "KI",
+ }
+ },
+ {
+ 269,
+ new List
+ {
+ "KM",
+ }
+ },
+ {
+ 850,
+ new List
+ {
+ "KP",
+ }
+ },
+ {
+ 82,
+ new List
+ {
+ "KR",
+ }
+ },
+ {
+ 965,
+ new List
+ {
+ "KW",
+ }
+ },
+ {
+ 7,
+ new List
+ {
+ "RU",
+ "KZ",
+ }
+ },
+ {
+ 856,
+ new List
+ {
+ "LA",
+ }
+ },
+ {
+ 961,
+ new List
+ {
+ "LB",
+ }
+ },
+ {
+ 423,
+ new List
+ {
+ "LI",
+ }
+ },
+ {
+ 94,
+ new List
+ {
+ "LK",
+ }
+ },
+ {
+ 231,
+ new List
+ {
+ "LR",
+ }
+ },
+ {
+ 266,
+ new List
+ {
+ "LS",
+ }
+ },
+ {
+ 370,
+ new List
+ {
+ "LT",
+ }
+ },
+ {
+ 352,
+ new List
+ {
+ "LU",
+ }
+ },
+ {
+ 371,
+ new List
+ {
+ "LV",
+ }
+ },
+ {
+ 218,
+ new List
+ {
+ "LY",
+ }
+ },
+ {
+ 212,
+ new List
+ {
+ "MA",
+ }
+ },
+ {
+ 377,
+ new List
+ {
+ "MC",
+ }
+ },
+ {
+ 373,
+ new List
+ {
+ "MD",
+ }
+ },
+ {
+ 382,
+ new List
+ {
+ "ME",
+ }
+ },
+ {
+ 261,
+ new List
+ {
+ "MG",
+ }
+ },
+ {
+ 692,
+ new List
+ {
+ "MH",
+ }
+ },
+ {
+ 389,
+ new List
+ {
+ "MK",
+ }
+ },
+ {
+ 223,
+ new List
+ {
+ "ML",
+ }
+ },
+ {
+ 95,
+ new List
+ {
+ "MM",
+ }
+ },
+ {
+ 976,
+ new List
+ {
+ "MN",
+ }
+ },
+ {
+ 853,
+ new List
+ {
+ "MO",
+ }
+ },
+ {
+ 596,
+ new List
+ {
+ "MQ",
+ }
+ },
+ {
+ 222,
+ new List
+ {
+ "MR",
+ }
+ },
+ {
+ 356,
+ new List
+ {
+ "MT",
+ }
+ },
+ {
+ 230,
+ new List
+ {
+ "MU",
+ }
+ },
+ {
+ 960,
+ new List
+ {
+ "MV",
+ }
+ },
+ {
+ 265,
+ new List
+ {
+ "MW",
+ }
+ },
+ {
+ 52,
+ new List
+ {
+ "MX",
+ }
+ },
+ {
+ 60,
+ new List
+ {
+ "MY",
+ }
+ },
+ {
+ 258,
+ new List
+ {
+ "MZ",
+ }
+ },
+ {
+ 264,
+ new List
+ {
+ "NA",
+ }
+ },
+ {
+ 687,
+ new List
+ {
+ "NC",
+ }
+ },
+ {
+ 227,
+ new List
+ {
+ "NE",
+ }
+ },
+ {
+ 672,
+ new List
+ {
+ "NF",
+ }
+ },
+ {
+ 234,
+ new List
+ {
+ "NG",
+ }
+ },
+ {
+ 505,
+ new List
+ {
+ "NI",
+ }
+ },
+ {
+ 31,
+ new List
+ {
+ "NL",
+ }
+ },
+ {
+ 47,
+ new List
+ {
+ "NO",
+ "SJ",
+ }
+ },
+ {
+ 977,
+ new List
+ {
+ "NP",
+ }
+ },
+ {
+ 674,
+ new List
+ {
+ "NR",
+ }
+ },
+ {
+ 683,
+ new List
+ {
+ "NU",
+ }
+ },
+ {
+ 64,
+ new List
+ {
+ "NZ",
+ }
+ },
+ {
+ 968,
+ new List
+ {
+ "OM",
+ }
+ },
+ {
+ 507,
+ new List
+ {
+ "PA",
+ }
+ },
+ {
+ 51,
+ new List
+ {
+ "PE",
+ }
+ },
+ {
+ 689,
+ new List
+ {
+ "PF",
+ }
+ },
+ {
+ 675,
+ new List
+ {
+ "PG",
+ }
+ },
+ {
+ 63,
+ new List
+ {
+ "PH",
+ }
+ },
+ {
+ 92,
+ new List
+ {
+ "PK",
+ }
+ },
+ {
+ 48,
+ new List
+ {
+ "PL",
+ }
+ },
+ {
+ 508,
+ new List
+ {
+ "PM",
+ }
+ },
+ {
+ 970,
+ new List
+ {
+ "PS",
+ }
+ },
+ {
+ 351,
+ new List
+ {
+ "PT",
+ }
+ },
+ {
+ 680,
+ new List
+ {
+ "PW",
+ }
+ },
+ {
+ 595,
+ new List
+ {
+ "PY",
+ }
+ },
+ {
+ 974,
+ new List
+ {
+ "QA",
+ }
+ },
+ {
+ 262,
+ new List
+ {
+ "RE",
+ "YT",
+ }
+ },
+ {
+ 40,
+ new List
+ {
+ "RO",
+ }
+ },
+ {
+ 381,
+ new List
+ {
+ "RS",
+ }
+ },
+ {
+ 250,
+ new List
+ {
+ "RW",
+ }
+ },
+ {
+ 966,
+ new List
+ {
+ "SA",
+ }
+ },
+ {
+ 677,
+ new List
+ {
+ "SB",
+ }
+ },
+ {
+ 248,
+ new List
+ {
+ "SC",
+ }
+ },
+ {
+ 249,
+ new List
+ {
+ "SD",
+ }
+ },
+ {
+ 46,
+ new List
+ {
+ "SE",
+ }
+ },
+ {
+ 65,
+ new List
+ {
+ "SG",
+ }
+ },
+ {
+ 290,
+ new List
+ {
+ "SH",
+ }
+ },
+ {
+ 386,
+ new List
+ {
+ "SI",
+ }
+ },
+ {
+ 421,
+ new List
+ {
+ "SK",
+ }
+ },
+ {
+ 232,
+ new List
+ {
+ "SL",
+ }
+ },
+ {
+ 378,
+ new List
+ {
+ "SM",
+ }
+ },
+ {
+ 221,
+ new List
+ {
+ "SN",
+ }
+ },
+ {
+ 252,
+ new List
+ {
+ "SO",
+ }
+ },
+ {
+ 597,
+ new List
+ {
+ "SR",
+ }
+ },
+ {
+ 211,
+ new List
+ {
+ "SS",
+ }
+ },
+ {
+ 239,
+ new List
+ {
+ "ST",
+ }
+ },
+ {
+ 503,
+ new List
+ {
+ "SV",
+ }
+ },
+ {
+ 963,
+ new List
+ {
+ "SY",
+ }
+ },
+ {
+ 268,
+ new List
+ {
+ "SZ",
+ }
+ },
+ {
+ 235,
+ new List
+ {
+ "TD",
+ }
+ },
+ {
+ 228,
+ new List
+ {
+ "TG",
+ }
+ },
+ {
+ 66,
+ new List
+ {
+ "TH",
+ }
+ },
+ {
+ 992,
+ new List
+ {
+ "TJ",
+ }
+ },
+ {
+ 690,
+ new List
+ {
+ "TK",
+ }
+ },
+ {
+ 670,
+ new List
+ {
+ "TL",
+ }
+ },
+ {
+ 993,
+ new List
+ {
+ "TM",
+ }
+ },
+ {
+ 216,
+ new List
+ {
+ "TN",
+ }
+ },
+ {
+ 676,
+ new List
+ {
+ "TO",
+ }
+ },
+ {
+ 90,
+ new List
+ {
+ "TR",
+ }
+ },
+ {
+ 688,
+ new List
+ {
+ "TV",
+ }
+ },
+ {
+ 886,
+ new List
+ {
+ "TW",
+ }
+ },
+ {
+ 255,
+ new List
+ {
+ "TZ",
+ }
+ },
+ {
+ 380,
+ new List
+ {
+ "UA",
+ }
+ },
+ {
+ 256,
+ new List
+ {
+ "UG",
+ }
+ },
+ {
+ 598,
+ new List
+ {
+ "UY",
+ }
+ },
+ {
+ 998,
+ new List
+ {
+ "UZ",
+ }
+ },
+ {
+ 379,
+ new List
+ {
+ "VA",
+ }
+ },
+ {
+ 58,
+ new List
+ {
+ "VE",
+ }
+ },
+ {
+ 84,
+ new List
+ {
+ "VN",
+ }
+ },
+ {
+ 678,
+ new List
+ {
+ "VU",
+ }
+ },
+ {
+ 681,
+ new List
+ {
+ "WF",
+ }
+ },
+ {
+ 685,
+ new List
+ {
+ "WS",
+ }
+ },
+ {
+ 967,
+ new List
+ {
+ "YE",
+ }
+ },
+ {
+ 27,
+ new List
+ {
+ "ZA",
+ }
+ },
+ {
+ 260,
+ new List