dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Globalization Compare


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Globalization CompareInfo.cs,1.11,1.12 CultureInfo.cs,1.19,1.20 TextInfo.cs,1.5,1.6
Date: Wed, 23 Apr 2003 20:50:37 -0400

Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Globalization
In directory subversions:/tmp/cvs-serv24645/runtime/System/Globalization

Modified Files:
        CompareInfo.cs CultureInfo.cs TextInfo.cs 
Log Message:


Signature-compatibility fixes.


Index: CompareInfo.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Globalization/CompareInfo.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** CompareInfo.cs      16 Apr 2003 06:36:50 -0000      1.11
--- CompareInfo.cs      24 Apr 2003 00:50:35 -0000      1.12
***************
*** 3,7 ****
   *            "System.Globalization.CompareInfo" class.
   *
!  * Copyright (C) 2001, 2002  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
--- 3,7 ----
   *            "System.Globalization.CompareInfo" class.
   *
!  * Copyright (C) 2001, 2002, 2003  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
***************
*** 173,190 ****
                                                                          
options);
                        }
!       public virtual int Compare(String string1, int offset1,
!                                                          String string2, int 
offset2,
!                                                          int length)
                        {
!                               return DefaultCompare(string1, offset1, length,
!                                                                         
string2, offset2, length,
                                                                          
CompareOptions.None);
                        }
!       public virtual int Compare(String string1, int offset1,
!                                                          String string2, int 
offset2,
!                                                          int length, 
CompareOptions options)
                        {
!                               return DefaultCompare(string1, offset1, length,
!                                                                         
string2, offset2, length, options);
                        }
  
--- 173,189 ----
                                                                          
options);
                        }
!       public virtual int Compare(String string1, int offset1, int length1,
!                                                          String string2, int 
offset2, int length2)
                        {
!                               return DefaultCompare(string1, offset1, length1,
!                                                                         
string2, offset2, length2,
                                                                          
CompareOptions.None);
                        }
!       public virtual int Compare(String string1, int offset1, int length1,
!                                                          String string2, int 
offset2, int length2,
!                                                          CompareOptions 
options)
                        {
!                               return DefaultCompare(string1, offset1, length1,
!                                                                         
string2, offset2, length2, options);
                        }
  
***************
*** 460,465 ****
                                while(count >= vlen)
                                {
!                                       if(Compare(source, startIndex, value, 0,
!                                                          vlen, options) == 0)
                                        {
                                                return startIndex;
--- 459,464 ----
                                while(count >= vlen)
                                {
!                                       if(Compare(source, startIndex, vlen,
!                                                          value, 0, vlen, 
options) == 0)
                                        {
                                                return startIndex;
***************
*** 493,497 ****
                                else
                                {
!                                       return (Compare(source, 0, prefix, 0,
                                                                    
prefix.Length, options) == 0);
                                }
--- 492,496 ----
                                else
                                {
!                                       return (Compare(source, 0, 
prefix.Length, prefix, 0,
                                                                    
prefix.Length, options) == 0);
                                }
***************
*** 521,525 ****
                                {
                                        return (Compare(source, source.Length - 
suffix.Length,
!                                                                   suffix, 0, 
suffix.Length, options) == 0);
                                }
                        }
--- 520,525 ----
                                {
                                        return (Compare(source, source.Length - 
suffix.Length,
!                                                                   
suffix.Length, suffix, 0,
!                                                                       
suffix.Length, options) == 0);
                                }
                        }
***************
*** 654,658 ****
                                while(count >= vlen)
                                {
!                                       if(Compare(source, startIndex - vlen + 
1,
                                                   value, 0, vlen, options) == 
0)
                                        {
--- 654,658 ----
                                while(count >= vlen)
                                {
!                                       if(Compare(source, startIndex - vlen + 
1, vlen,
                                                   value, 0, vlen, options) == 
0)
                                        {

Index: CultureInfo.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Globalization/CultureInfo.cs,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** CultureInfo.cs      16 Apr 2003 06:36:50 -0000      1.19
--- CultureInfo.cs      24 Apr 2003 00:50:35 -0000      1.20
***************
*** 2,6 ****
   * CultureInfo.cs - Implementation of "System.Globalization.CultureInfo".
   *
!  * Copyright (C) 2001  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
--- 2,6 ----
   * CultureInfo.cs - Implementation of "System.Globalization.CultureInfo".
   *
!  * Copyright (C) 2001, 2003  Southern Storm Software, Pty Ltd.
   *
   * This program is free software; you can redistribute it and/or modify
***************
*** 474,478 ****
  
        // Determine if this culture instance is read-only.
!       public virtual bool IsReadOnly
                        {
                                get
--- 474,478 ----
  
        // Determine if this culture instance is read-only.
!       public bool IsReadOnly
                        {
                                get
***************
*** 636,640 ****
  
        // Determine if this culture is configured for user overrides.
!       public virtual bool UseUserOverride
                        {
                                get
--- 636,640 ----
  
        // Determine if this culture is configured for user overrides.
!       public bool UseUserOverride
                        {
                                get
***************
*** 645,649 ****
  
        // Implementation of the ICloneable interface.
!       public Object Clone()
                        {
                                return MemberwiseClone();
--- 645,649 ----
  
        // Implementation of the ICloneable interface.
!       public virtual Object Clone()
                        {
                                return MemberwiseClone();
***************
*** 651,655 ****
  
        // Implementation of the IFormatProvider interface.
!       public Object GetFormat(Type formatType)
                        {
                                if(formatType == 
typeof(System.Globalization.CultureInfo))
--- 651,655 ----
  
        // Implementation of the IFormatProvider interface.
!       public virtual Object GetFormat(Type formatType)
                        {
                                if(formatType == 
typeof(System.Globalization.CultureInfo))
***************
*** 661,664 ****
--- 661,696 ----
                                        return null;
                                }
+                       }
+ 
+       // Clear any cached culture data in this object.
+       public void ClearCachedData()
+                       {
+                               // Nothing to do here.
+                       }
+ 
+       // Determine if two culture objects are equal.
+       public override bool Equals(Object obj)
+                       {
+                               CultureInfo other = (obj as CultureInfo);
+                               if(other != null)
+                               {
+                                       return (other.cultureID == cultureID);
+                               }
+                               else
+                               {
+                                       return false;
+                               }
+                       }
+ 
+       // Get the hash code for this object.
+       public override int GetHashCode()
+                       {
+                               return cultureID;
+                       }
+ 
+       // Convert this object into a string.
+       public override String ToString()
+                       {
+                               return Name;
                        }
  

Index: TextInfo.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Globalization/TextInfo.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** TextInfo.cs 16 Apr 2003 06:36:50 -0000      1.5
--- TextInfo.cs 24 Apr 2003 00:50:35 -0000      1.6
***************
*** 168,172 ****
  
        // Convert a string to title case.
!       public virtual String ToTitleCase(String str)
                        {
                                if(str == null)
--- 168,172 ----
  
        // Convert a string to title case.
!       public String ToTitleCase(String str)
                        {
                                if(str == null)
***************
*** 194,197 ****
--- 194,203 ----
                                }
                                return builder.ToString();
+                       }
+ 
+       // Convert this object into a string.
+       public override String ToString()
+                       {
+                               return "TextInfo - " + culture.ToString();
                        }
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]