[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Globalization RegionI
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Globalization RegionInfo.cs,1.2,1.3 |
Date: |
Fri, 30 May 2003 22:24:45 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Globalization
In directory subversions:/tmp/cvs-serv17525/runtime/System/Globalization
Modified Files:
RegionInfo.cs
Log Message:
Move the region name table into the I18N assembly.
Index: RegionInfo.cs
===================================================================
RCS file:
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Globalization/RegionInfo.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** RegionInfo.cs 16 Apr 2003 06:36:50 -0000 1.2
--- RegionInfo.cs 31 May 2003 02:24:43 -0000 1.3
***************
*** 25,34 ****
using System;
! using System.Private;
public class RegionInfo
{
! // Internal state.
! private RegionName regionName;
// The current region.
--- 25,35 ----
using System;
! using System.Text;
public class RegionInfo
{
! // Internal state. Points to a "RegionInfo" object that
! // is allocated by the I18N routines.
! private RegionInfo regionInfo;
// The current region.
***************
*** 38,42 ****
public RegionInfo(int culture)
{
! regionName =
RegionNameTable.GetNameInfoByID(culture, true);
}
public RegionInfo(String name)
--- 39,53 ----
public RegionInfo(int culture)
{
! // The I18N routines use -1 to tell this class
! // not to perform a recursive region lookup.
! if(culture != -1)
! {
! regionInfo = (RegionInfo)
!
(Encoding.InvokeI18N("GetRegion", culture));
! if(regionInfo == null)
! {
! throw new
ArgumentException(_("Arg_InvalidRegion"));
! }
! }
}
public RegionInfo(String name)
***************
*** 46,50 ****
throw new ArgumentNullException("name");
}
! regionName =
RegionNameTable.GetNameInfoByName(name, true);
}
--- 57,66 ----
throw new ArgumentNullException("name");
}
! regionInfo = (RegionInfo)
! (Encoding.InvokeI18N("GetRegion",
name));
! if(regionInfo == null)
! {
! throw new
ArgumentException(_("Arg_InvalidRegion"));
! }
}
***************
*** 71,75 ****
get
{
! return regionName.currencySymbol;
}
}
--- 87,91 ----
get
{
! return regionInfo.CurrencySymbol;
}
}
***************
*** 78,86 ****
get
{
! // The "DisplayName" returns the name
of the region
! // in the installation language, not
the current locale.
! // In our system, the installation
language is always
! // going to be English.
! return regionName.englishName;
}
}
--- 94,98 ----
get
{
! return regionInfo.DisplayName;
}
}
***************
*** 89,93 ****
get
{
! return regionName.englishName;
}
}
--- 101,105 ----
get
{
! return regionInfo.EnglishName;
}
}
***************
*** 96,100 ****
get
{
! return regionName.isMetric;
}
}
--- 108,112 ----
get
{
! return regionInfo.IsMetric;
}
}
***************
*** 103,107 ****
get
{
! return regionName.isoCurrencySymbol;
}
}
--- 115,119 ----
get
{
! return regionInfo.ISOCurrencySymbol;
}
}
***************
*** 110,114 ****
get
{
! return regionName.name;
}
}
--- 122,126 ----
get
{
! return regionInfo.Name;
}
}
***************
*** 117,121 ****
get
{
! return regionName.threeLetterISOName;
}
}
--- 129,133 ----
get
{
! return
regionInfo.ThreeLetterISORegionName;
}
}
***************
*** 124,128 ****
get
{
! return
regionName.threeLetterWindowsName;
}
}
--- 136,140 ----
get
{
! return
regionInfo.ThreeLetterWindowsRegionName;
}
}
***************
*** 131,135 ****
get
{
! return regionName.twoLetterISOName;
}
}
--- 143,147 ----
get
{
! return
regionInfo.TwoLetterISORegionName;
}
}
***************
*** 141,146 ****
if(other != null)
{
! return (regionName.regionID ==
!
other.regionName.regionID);
}
else
--- 153,157 ----
if(other != null)
{
! return
regionInfo.Equals(other.regionInfo);
}
else
***************
*** 153,157 ****
public override int GetHashCode()
{
! return regionName.regionID;
}
--- 164,168 ----
public override int GetHashCode()
{
! return regionInfo.GetHashCode();
}
***************
*** 159,163 ****
public override String ToString()
{
! return regionName.threeLetterISOName;
}
--- 170,174 ----
public override String ToString()
{
! return ThreeLetterISORegionName;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Globalization RegionInfo.cs,1.2,1.3,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.958,1.959
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/I18N/Common RegionData.cs,NONE,1.1 RegionName.cs,NONE,1.1 RegionNameTable.cs,NONE,1.1Manager.cs,1.9,1.10
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.958,1.959
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/I18N/Common RegionData.cs,NONE,1.1 RegionName.cs,NONE,1.1 RegionNameTable.cs,NONE,1.1Manager.cs,1.9,1.10
- Index(es):