Fix copy&paste bug (#17059)
[platform/upstream/coreclr.git] / src / mscorlib / src / System / Globalization / EncodingDataItem.Unix.cs
1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4
5 namespace System.Globalization
6 {
7     internal class CodePageDataItem
8     {
9         private readonly int _codePage;
10         private readonly int _uiFamilyCodePage;
11         private readonly string _webName;
12         private readonly uint _flags;
13         private string _displayNameResourceKey;
14
15         internal CodePageDataItem(int codePage, int uiFamilyCodePage, string webName, uint flags)
16         {
17             _codePage = codePage;
18             _uiFamilyCodePage = uiFamilyCodePage;
19             _webName = webName;
20             _flags = flags;
21         }
22
23         public int CodePage
24         {
25             get { return _codePage; }
26         }
27
28         public int UIFamilyCodePage
29         {
30             get { return _uiFamilyCodePage; }
31         }
32
33         public String WebName
34         {
35             get { return _webName; }
36         }
37
38         public String HeaderName
39         {
40             get { return _webName; } // all the code pages used on unix only have a single name
41         }
42
43         public String BodyName
44         {
45             get { return _webName; } // all the code pages used on unix only have a single name
46         }
47
48         public uint Flags
49         {
50             get { return _flags; }
51         }
52
53         // PAL ends here
54
55         public string DisplayNameResourceKey
56         {
57             get
58             {
59                 if (_displayNameResourceKey == null)
60                 {
61                     _displayNameResourceKey = "Globalization_cp_" + CodePage;
62                 }
63
64                 return _displayNameResourceKey;
65             }
66         }
67     }
68 }