BindingFlags.Public needed here as Exception.HResult is now public in .NET 4.5. This...
[mono.git] / tools / locale-builder / RegionInfoEntry.cs
1 //
2 // Mono.Tools.LocaleBuilder.RegionInfoEntry
3 //
4 // Author(s):
5 //   Atsushi Enomoto  <atsushi@ximian.com>
6 //
7 // (C) 2005, Novell, Inc (http://www.novell.com)
8 //
9
10
11 using System;
12 using System.Text;
13 using System.Collections;
14
15 namespace Mono.Tools.LocaleBuilder
16 {
17         public class RegionInfoEntry : Entry
18         {
19                 public int RegionId; // it is GeoId in 2.0.
20                 // public byte MeasurementSystem;
21                 public string ISO2Name = String.Empty; // supplementalData.xml
22                 public string ISO3Name = String.Empty;
23                 public string Win3Name = String.Empty;
24                 public string EnglishName = String.Empty; // langs/en.xml
25                 public string CurrencySymbol = String.Empty;
26                 public string ISOCurrencySymbol = String.Empty; // supplementalData.xml
27                 public string CurrencyEnglishName = String.Empty; // langs/en.xml
28
29                 // NativeName and CurrencyNativeName are language dependent.
30
31                 public void AppendTableRow (StringBuilder builder)
32                 {
33                         builder.Append ("\t{ 0, "); // 0 is a slot for LCID (stored at managed code)
34                         builder.Append (RegionId);
35                         builder.Append (',');
36                         // builder.Append (MeasurementSystem);
37                         // builder.Append (',');
38                         builder.Append (EncodeStringIdx (ISO2Name));
39                         builder.Append (',');
40                         builder.Append (EncodeStringIdx (ISO3Name));
41                         builder.Append (',');
42                         builder.Append (EncodeStringIdx (Win3Name));
43                         builder.Append (',');
44                         builder.Append (EncodeStringIdx (EnglishName));
45                         builder.Append (',');
46                         builder.Append (EncodeStringIdx (CurrencySymbol));
47                         builder.Append (',');
48                         builder.Append (EncodeStringIdx (ISOCurrencySymbol));
49                         builder.Append (',');
50                         builder.Append (EncodeStringIdx (CurrencyEnglishName));
51                         builder.Append ('}');
52                 }
53
54                 public override string ToString ()
55                 {
56                         StringBuilder builder = new StringBuilder ();
57                         AppendTableRow (builder);
58                         return builder.ToString ();
59                 }
60         }
61 }
62
63