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/Runtime/Remoting/Meta


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001 ISoapXsd.cs, 1.1, 1.2 SoapAnyUri.cs, 1.1, 1.2 SoapBase64Binary.cs, 1.1, 1.2 SoapDate.cs, 1.2, 1.3 SoapDateTime.cs, 1.1, 1.2 SoapDay.cs, 1.1, 1.2 SoapDuration.cs, 1.1, 1.2 SoapEntities.cs, 1.1, 1.2 SoapEntity.cs, 1.1, 1.2 SoapHexBinary.cs, 1.1, 1.2 SoapId.cs, 1.1, 1.2 SoapIdref.cs, 1.1, 1.2 SoapIdrefs.cs, 1.1, 1.2 SoapInteger.cs, 1.1, 1.2 SoapLanguage.cs, 1.1, 1.2 SoapMonth.cs, 1.1, 1.2 SoapMonthDay.cs, 1.1, 1.2 SoapName.cs, 1.1, 1.2 SoapNcName.cs, 1.1, 1.2 SoapNegativeInteger.cs, 1.1, 1.2 SoapNmtoken.cs, 1.1, 1.2 SoapNmtokens.cs, 1.1, 1.2 SoapNonNegativeInteger.cs, 1.1, 1.2 SoapNonPositiveInteger.cs, 1.1, 1.2 SoapNormalizedString.cs, 1.1, 1.2 SoapNotation.cs, 1.1, 1.2 SoapPositiveInteger.cs, 1.1, 1.2 SoapQName.cs, 1.1, 1.2 SoapTime.cs, 1.1, 1.2 SoapToken.cs, 1.1, 1.2 SoapYear.cs, 1.1, 1.2 SoapYearMonth.cs, 1.1, 1.2
Date: Tue, 05 Aug 2003 22:07:56 -0400

Update of 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001
In directory 
subversions:/tmp/cvs-serv27592/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001

Modified Files:
        ISoapXsd.cs SoapAnyUri.cs SoapBase64Binary.cs SoapDate.cs 
        SoapDateTime.cs SoapDay.cs SoapDuration.cs SoapEntities.cs 
        SoapEntity.cs SoapHexBinary.cs SoapId.cs SoapIdref.cs 
        SoapIdrefs.cs SoapInteger.cs SoapLanguage.cs SoapMonth.cs 
        SoapMonthDay.cs SoapName.cs SoapNcName.cs 
        SoapNegativeInteger.cs SoapNmtoken.cs SoapNmtokens.cs 
        SoapNonNegativeInteger.cs SoapNonPositiveInteger.cs 
        SoapNormalizedString.cs SoapNotation.cs SoapPositiveInteger.cs 
        SoapQName.cs SoapTime.cs SoapToken.cs SoapYear.cs 
        SoapYearMonth.cs 
Log Message:


Outstanding TODO's with the SOAP-related routines in runtime.


Index: ISoapXsd.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/ISoapXsd.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** ISoapXsd.cs 17 Apr 2003 10:36:10 -0000      1.1
--- ISoapXsd.cs 6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  public interface ISoapXsd
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  public interface ISoapXsd
***************
*** 32,36 ****
  }; // interface ISoapXsd
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 32,36 ----
  }; // interface ISoapXsd
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapAnyUri.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapAnyUri.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapAnyUri.cs       17 Apr 2003 10:36:10 -0000      1.1
--- SoapAnyUri.cs       6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  [Serializable]
***************
*** 80,84 ****
  }; // class SoapAnyUri
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 80,84 ----
  }; // class SoapAnyUri
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapBase64Binary.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapBase64Binary.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapBase64Binary.cs 17 Apr 2003 10:36:10 -0000      1.1
--- SoapBase64Binary.cs 6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  using System.Text;
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  using System.Text;
***************
*** 103,107 ****
  }; // class SoapBase64Binary
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 103,107 ----
  }; // class SoapBase64Binary
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapDate.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapDate.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** SoapDate.cs 19 Apr 2003 07:15:38 -0000      1.2
--- SoapDate.cs 6 Aug 2003 02:07:53 -0000       1.3
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,29 ----
  {
  
! #if CONFIG_SERIALIZATION
! 
! using System.Globalization;
  
  [Serializable]
***************
*** 90,112 ****
                        }
  
        // Parse a value into an instance of this class.
-       [TODO]
        public static SoapDate Parse(String value)
                        {
!                               // TODO
!                               return null;
                        }
  
        // Convert this object into a string.
-       [TODO]
        public override String ToString()
                        {
!                               // TODO
!                               return null;
                        }
  
  }; // class SoapDate
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 92,140 ----
                        }
  
+       // Format values for "Parse".
+       private static String[] formats = {"yyyy-MM-dd", "yyyy-MM-ddzzz"};
+ 
        // Parse a value into an instance of this class.
        public static SoapDate Parse(String value)
                        {
!                               int sign;
!                               if(value[0] == '-')
!                               {
!                                       value = value.Substring(1);
!                                       sign = -1;
!                               }
!                               else if(value[0] == '+')
!                               {
!                                       value = value.Substring(1);
!                                       sign = 0;
!                               }
!                               else
!                               {
!                                       sign = 0;
!                               }
!                               DateTime time = DateTime.ParseExact
!                                       (value, formats, 
CultureInfo.InvariantCulture,
!                                        DateTimeStyles.None);
!                               return new SoapDate(time, sign);
                        }
  
        // Convert this object into a string.
        public override String ToString()
                        {
!                               if(sign >= 0)
!                               {
!                                       return value.ToString("yyyy-MM-dd",
!                                                                               
  CultureInfo.InvariantCulture);
!                               }
!                               else
!                               {
!                                       return value.ToString("'-'yyyy-MM-dd",
!                                                                               
  CultureInfo.InvariantCulture);
!                               }
                        }
  
  }; // class SoapDate
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapDateTime.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapDateTime.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapDateTime.cs     19 Apr 2003 07:15:38 -0000      1.1
--- SoapDateTime.cs     6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  public sealed class SoapDateTime
--- 23,29 ----
  {
  
! #if CONFIG_SERIALIZATION
! 
! using System.Globalization;
  
  public sealed class SoapDateTime
***************
*** 36,58 ****
                        }
  
!       // Parse a value into a DateTime instance.
!       [TODO]
        public static DateTime Parse(String value)
                        {
!                               // TODO
!                               return new DateTime(0);
                        }
  
!       // Convert a date into a string.
!       [TODO]
        public static String ToString(DateTime value)
                        {
!                               // TODO
!                               return null;
                        }
  
  }; // class SoapDateTime
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 38,100 ----
                        }
  
!       // Format values for "Parse".
!       private static String[] formats = {
!                               "yyyy-MM-dd'T'HH:mm:ss.fffffffzzz",
!                               "yyyy-MM-dd'T'HH:mm:ss.ffff",
!                               "yyyy-MM-dd'T'HH:mm:ss.ffffzzz",
!                               "yyyy-MM-dd'T'HH:mm:ss.fff",
!                               "yyyy-MM-dd'T'HH:mm:ss.fffzzz",
!                               "yyyy-MM-dd'T'HH:mm:ss.ff",
!                               "yyyy-MM-dd'T'HH:mm:ss.ffzzz",
!                               "yyyy-MM-dd'T'HH:mm:ss.f",
!                               "yyyy-MM-dd'T'HH:mm:ss.fzzz",
!                               "yyyy-MM-dd'T'HH:mm:ss",
!                               "yyyy-MM-dd'T'HH:mm:sszzz",
!                               "yyyy-MM-dd'T'HH:mm:ss.fffff",
!                               "yyyy-MM-dd'T'HH:mm:ss.fffffzzz",
!                               "yyyy-MM-dd'T'HH:mm:ss.ffffff",
!                               "yyyy-MM-dd'T'HH:mm:ss.ffffffzzz",
!                               "yyyy-MM-dd'T'HH:mm:ss.fffffff",
!                               "yyyy-MM-dd'T'HH:mm:ss.ffffffff",
!                               "yyyy-MM-dd'T'HH:mm:ss.ffffffffzzz",
!                               "yyyy-MM-dd'T'HH:mm:ss.fffffffff",
!                               "yyyy-MM-dd'T'HH:mm:ss.fffffffffzzz",
!                               "yyyy-MM-dd'T'HH:mm:ss.ffffffffff",
!                               "yyyy-MM-dd'T'HH:mm:ss.ffffffffffzzz"
!                       };
! 
!       // Parse a value into an instance of this class.
        public static DateTime Parse(String value)
                        {
!                               if(value == null)
!                               {
!                                       return DateTime.MinValue;
!                               }
!                               else if(value.EndsWith("Z"))
!                               {
!                                       value = value.Substring(0, value.Length 
- 1) + "-00:00";
!                               }
!                               try
!                               {
!                                       return DateTime.ParseExact
!                                               (value, formats, 
CultureInfo.InvariantCulture,
!                                                DateTimeStyles.None);
!                               }
!                               catch(Exception)
!                               {
!                                       throw new 
RemotingException(_("Arg_InvalidSoapValue"));
!                               }
                        }
  
!       // Convert this object into a string.
        public static String ToString(DateTime value)
                        {
!                               return 
value.ToString("yyyy-MM-dd'T'HH:mm:ss.fffffffzzz",
!                                                                         
CultureInfo.InvariantCulture);
                        }
  
  }; // class SoapDateTime
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapDay.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapDay.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapDay.cs  19 Apr 2003 07:15:38 -0000      1.1
--- SoapDay.cs  6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,29 ----
  {
  
! #if CONFIG_SERIALIZATION
! 
! using System.Globalization;
  
  [Serializable]
***************
*** 66,88 ****
                        }
  
        // Parse a value into an instance of this class.
-       [TODO]
        public static SoapDay Parse(String value)
                        {
!                               // TODO
!                               return null;
                        }
  
        // Convert this object into a string.
-       [TODO]
        public override String ToString()
                        {
!                               // TODO
!                               return null;
                        }
  
  }; // class SoapDay
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 68,91 ----
                        }
  
+       // Format values for "Parse".
+       private static String[] formats = {"---dd", "---ddzzz"};
+ 
        // Parse a value into an instance of this class.
        public static SoapDay Parse(String value)
                        {
!                               return new SoapDay(DateTime.ParseExact
!                                       (value, formats, 
CultureInfo.InvariantCulture,
!                                        DateTimeStyles.None));
                        }
  
        // Convert this object into a string.
        public override String ToString()
                        {
!                               return value.ToString("---dd", 
CultureInfo.InvariantCulture);
                        }
  
  }; // class SoapDay
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapDuration.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapDuration.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapDuration.cs     19 Apr 2003 07:15:38 -0000      1.1
--- SoapDuration.cs     6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  public sealed class SoapDuration
--- 23,34 ----
  {
  
! #if CONFIG_SERIALIZATION
! 
! using System.Text;
! 
! // This class processes durations in ISO/XSD notation:
! //
! //                    [-]PxxxxYxxMxxDTxxHxxMxxS
! //                    [-]PxxxxYxxMxxDTxxHxxMxx.xxxxxxxS
  
  public sealed class SoapDuration
***************
*** 37,58 ****
  
        // Parse a value into a TimeSpan instance.
-       [TODO]
        public static TimeSpan Parse(String value)
                        {
!                               // TODO
!                               return new TimeSpan(0);
                        }
  
        // Convert a time span into a string.
-       [TODO]
        public static String ToString(TimeSpan value)
                        {
!                               // TODO
!                               return null;
                        }
  
  }; // class SoapDuration
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 44,232 ----
  
        // Parse a value into a TimeSpan instance.
        public static TimeSpan Parse(String value)
                        {
!                               int sign;
!                               int posn;
! 
!                               // Bail out early if no value supplied.
!                               if(value == null)
!                               {
!                                       return TimeSpan.Zero;
!                               }
!                               else if(value == String.Empty)
!                               {
!                                       return TimeSpan.Zero;
!                               }
! 
!                               // Process the sign.
!                               if(value[0] == '-')
!                               {
!                                       sign = -1;
!                                       posn = 1;
!                               }
!                               else
!                               {
!                                       sign = 0;
!                                       posn = 0;
!                               }
! 
!                               // Initialize the field values.
!                               int years = 0;
!                               int months = 0;
!                               int days = 0;
!                               int hours = 0;
!                               int minutes = 0;
!                               int seconds = 0;
!                               int fractions = 0;
! 
!                               // Process the fields within the value.
!                               char ch;
!                               int val = 0;
!                               int numDigits = 0;
!                               bool withinTime = false;
!                               bool withinFractions = false;
!                               while(posn < value.Length)
!                               {
!                                       ch = value[posn++];
!                                       if(ch >= '0' && ch <= '9')
!                                       {
!                                               val = val * 10 + (int)(ch - 
'0');
!                                               ++numDigits;
!                                               if(numDigits >= 9)
!                                               {
!                                                       throw new 
RemotingException
!                                                               
(_("Arg_InvalidSoapValue"));
!                                               }
!                                       }
!                                       else
!                                       {
!                                               switch(ch)
!                                               {
!                                                       case 'P': case 'Z':     
        break;
!                                                       case 'T':               
                withinTime = true; break;
!                                                       case 'Y':               
                years = val; break;
! 
!                                                       case 'M':
!                                                       {
!                                                               if(withinTime)
!                                                               {
!                                                                       minutes 
= val;
!                                                               }
!                                                               else
!                                                               {
!                                                                       months 
= val;
!                                                               }
!                                                       }
!                                                       break;
! 
!                                                       case 'D':               
                days = val; break;
!                                                       case 'H':               
                hours = val; break;
! 
!                                                       case '.':
!                                                       {
!                                                               seconds = val;
!                                                               withinFractions 
= true;
!                                                       }
!                                                       break;
! 
!                                                       case 'S':
!                                                       {
!                                                               
if(withinFractions)
!                                                               {
!                                                                       
while(numDigits < 7)
!                                                                       {
!                                                                               
val *= 10;
!                                                                       }
!                                                                       
while(numDigits > 7)
!                                                                       {
!                                                                               
val /= 10;
!                                                                       }
!                                                                       
fractions = val;
!                                                               }
!                                                               else
!                                                               {
!                                                                       seconds 
= val;
!                                                               }
!                                                       }
!                                                       break;
! 
!                                                       default:
!                                                       {
!                                                               throw new 
RemotingException
!                                                                       
(_("Arg_InvalidSoapValue"));
!                                                       }
!                                                       // Not reached.
!                                               }
!                                               val = 0;
!                                               numDigits = 0;
!                                       }
!                               }
! 
!                               // Build the final value and return.
!                               long ticks = years * (360 * 
TimeSpan.TicksPerDay) +
!                                                        months * (30 * 
TimeSpan.TicksPerDay) +
!                                                        days * 
TimeSpan.TicksPerDay +
!                                                        hours * 
TimeSpan.TicksPerHour +
!                                                        minutes * 
TimeSpan.TicksPerHour +
!                                                        seconds * 
TimeSpan.TicksPerSecond +
!                                                        fractions;
!                               return new TimeSpan(sign * ticks);
                        }
  
        // Convert a time span into a string.
        public static String ToString(TimeSpan value)
                        {
!                               StringBuilder builder = new StringBuilder(32);
! 
!                               // Process the duration's sign.
!                               long ticks = value.Ticks;
!                               if(ticks < 0)
!                               {
!                                       builder.Append('-');
!                                       ticks = -ticks;
!                               }
! 
!                               // Calculate the years and months, using a 
standard
!                               // month length of 30 and a year length of 360.
!                               long days = ticks / TimeSpan.TicksPerDay;
!                               int years = (int)(days / 360);
!                               days -= years * 360L;
!                               int months = (int)(days / 30);
!                               days -= months * 30L;
! 
!                               // Output the date portion.
!                               builder.Append('P');
!                               builder.Append(years);
!                               builder.Append('Y');
!                               builder.Append(months);
!                               builder.Append('M');
!                               builder.Append(days);
!                               builder.Append('D');
! 
!                               // Output the time portion.
!                               ticks %= TimeSpan.TicksPerDay;
!                               builder.Append('T');
!                               builder.Append(ticks / TimeSpan.TicksPerHour);
!                               builder.Append('H');
!                               ticks %= TimeSpan.TicksPerHour;
!                               builder.Append(ticks / TimeSpan.TicksPerMinute);
!                               builder.Append('M');
!                               ticks %= TimeSpan.TicksPerMinute;
!                               builder.Append(ticks / TimeSpan.TicksPerSecond);
!                               ticks %= TimeSpan.TicksPerSecond;
!                               if(ticks != 0)
!                               {
!                                       builder.Append('.');
!                                       builder.Append(String.Format("{0:D7}", 
ticks));
!                               }
!                               builder.Append('S');
! 
!                               // Return the final string.
!                               return builder.ToString();
                        }
  
  }; // class SoapDuration
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapEntities.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapEntities.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapEntities.cs     19 Apr 2003 07:15:38 -0000      1.1
--- SoapEntities.cs     6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  [Serializable]
***************
*** 80,84 ****
  }; // class SoapEntities
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 80,84 ----
  }; // class SoapEntities
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapEntity.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapEntity.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapEntity.cs       19 Apr 2003 07:15:38 -0000      1.1
--- SoapEntity.cs       6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  [Serializable]
***************
*** 80,84 ****
  }; // class SoapEntity
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 80,84 ----
  }; // class SoapEntity
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapHexBinary.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapHexBinary.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapHexBinary.cs    19 Apr 2003 07:15:38 -0000      1.1
--- SoapHexBinary.cs    6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  using System.Text;
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  using System.Text;
***************
*** 73,83 ****
                                if(value == null)
                                {
!                                       return new SoapHexBinary();
!                               }
!                               else
!                               {
!                                       // TODO
!                                       return null;
                                }
                        }
  
--- 73,117 ----
                                if(value == null)
                                {
!                                       return new SoapHexBinary(new byte [0]);
                                }
+                               byte[] buf = new byte [value.Length];
+                               int posn = 0;
+                               int temp = -1;
+                               int digit;
+                               foreach(char ch in value)
+                               {
+                                       if(ch >= '0' && ch <= '9')
+                                       {
+                                               digit = (int)(ch - '0');
+                                       }
+                                       else if(ch >= 'A' && ch <= 'F')
+                                       {
+                                               digit = (int)(ch - 'A' + 10);
+                                       }
+                                       else if(ch >= 'a' && ch <= 'f')
+                                       {
+                                               digit = (int)(ch - 'a' + 10);
+                                       }
+                                       else
+                                       {
+                                               throw new 
RemotingException(_("Arg_InvalidSoapValue"));
+                                       }
+                                       if(temp == -1)
+                                       {
+                                               temp = digit;
+                                       }
+                                       else
+                                       {
+                                               buf[posn++] = (byte)((temp << 
4) + digit);
+                                               temp = -1;
+                                       }
+                               }
+                               if(temp != -1)
+                               {
+                                       throw new 
RemotingException(_("Arg_InvalidSoapValue"));
+                               }
+                               byte[] result = new byte [posn];
+                               Array.Copy(buf, 0, result, 0, posn);
+                               return new SoapHexBinary(result);
                        }
  
***************
*** 87,99 ****
                                if(value == null)
                                {
!                                       return null;
                                }
!                               // TODO
!                               return null;
                        }
  
  }; // class SoapHexBinary
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 121,139 ----
                                if(value == null)
                                {
!                                       return String.Empty;
!                               }
!                               StringBuilder builder = new 
StringBuilder(value.Length * 2);
!                               String hexchars = "0123456789ABCDEF";
!                               foreach(char ch in value)
!                               {
!                                       builder.Append(hexchars[(ch >> 4) & 
0x0F]);
!                                       builder.Append(hexchars[ch & 0x0F]);
                                }
!                               return builder.ToString();
                        }
  
  }; // class SoapHexBinary
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapId.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapId.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapId.cs   19 Apr 2003 07:15:38 -0000      1.1
--- SoapId.cs   6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  [Serializable]
***************
*** 80,84 ****
  }; // class SoapId
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 80,84 ----
  }; // class SoapId
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapIdref.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapIdref.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapIdref.cs        19 Apr 2003 07:15:38 -0000      1.1
--- SoapIdref.cs        6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  [Serializable]
***************
*** 80,84 ****
  }; // class SoapIdref
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 80,84 ----
  }; // class SoapIdref
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapIdrefs.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapIdrefs.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapIdrefs.cs       19 Apr 2003 07:15:38 -0000      1.1
--- SoapIdrefs.cs       6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  [Serializable]
***************
*** 80,84 ****
  }; // class SoapIdrefs
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 80,84 ----
  }; // class SoapIdrefs
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapInteger.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapInteger.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapInteger.cs      19 Apr 2003 07:15:38 -0000      1.1
--- SoapInteger.cs      6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  using System.Globalization;
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  using System.Globalization;
***************
*** 84,88 ****
  }; // class SoapInteger
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 84,88 ----
  }; // class SoapInteger
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapLanguage.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapLanguage.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapLanguage.cs     19 Apr 2003 07:15:38 -0000      1.1
--- SoapLanguage.cs     6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  [Serializable]
***************
*** 80,84 ****
  }; // class SoapLanguage
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 80,84 ----
  }; // class SoapLanguage
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapMonth.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapMonth.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapMonth.cs        19 Apr 2003 07:15:38 -0000      1.1
--- SoapMonth.cs        6 Aug 2003 02:07:53 -0000       1.2
***************
*** 24,28 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 24,30 ----
  {
  
! #if CONFIG_SERIALIZATION
! 
! using System.Globalization;
  
  [Serializable]
***************
*** 67,89 ****
                        }
  
        // Parse a value into an instance of this class.
-       [TODO]
        public static SoapMonth Parse(String value)
                        {
!                               // TODO
!                               return null;
                        }
  
        // Convert this object into a string.
-       [TODO]
        public override String ToString()
                        {
!                               // TODO
!                               return null;
                        }
  
  }; // class SoapMonth
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 69,92 ----
                        }
  
+       // Format values for "Parse".
+       private static String[] formats = {"--MM--", "--MM--zzz"};
+ 
        // Parse a value into an instance of this class.
        public static SoapMonth Parse(String value)
                        {
!                               return new SoapMonth(DateTime.ParseExact
!                                       (value, formats, 
CultureInfo.InvariantCulture,
!                                        DateTimeStyles.None));
                        }
  
        // Convert this object into a string.
        public override String ToString()
                        {
!                               return value.ToString("--MM--", 
CultureInfo.InvariantCulture);
                        }
  
  }; // class SoapMonth
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapMonthDay.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapMonthDay.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapMonthDay.cs     19 Apr 2003 07:15:38 -0000      1.1
--- SoapMonthDay.cs     6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,29 ----
  {
  
! #if CONFIG_SERIALIZATION
! 
! using System.Globalization;
  
  [Serializable]
***************
*** 66,88 ****
                        }
  
        // Parse a value into an instance of this class.
-       [TODO]
        public static SoapMonthDay Parse(String value)
                        {
!                               // TODO
!                               return null;
                        }
  
        // Convert this object into a string.
-       [TODO]
        public override String ToString()
                        {
!                               // TODO
!                               return null;
                        }
  
  }; // class SoapMonthDay
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 68,91 ----
                        }
  
+       // Format values for "Parse".
+       private static String[] formats = {"--MM-dd", "--MM-ddzzz"};
+ 
        // Parse a value into an instance of this class.
        public static SoapMonthDay Parse(String value)
                        {
!                               return new SoapMonthDay(DateTime.ParseExact
!                                       (value, formats, 
CultureInfo.InvariantCulture,
!                                        DateTimeStyles.None));
                        }
  
        // Convert this object into a string.
        public override String ToString()
                        {
!                               return value.ToString("--MM-dd", 
CultureInfo.InvariantCulture);
                        }
  
  }; // class SoapMonthDay
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapName.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapName.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapName.cs 19 Apr 2003 07:15:38 -0000      1.1
--- SoapName.cs 6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  [Serializable]
***************
*** 80,84 ****
  }; // class SoapName
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 80,84 ----
  }; // class SoapName
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapNcName.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapNcName.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapNcName.cs       19 Apr 2003 07:15:38 -0000      1.1
--- SoapNcName.cs       6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  [Serializable]
***************
*** 80,84 ****
  }; // class SoapNcName
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 80,84 ----
  }; // class SoapNcName
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapNegativeInteger.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapNegativeInteger.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapNegativeInteger.cs      19 Apr 2003 07:15:38 -0000      1.1
--- SoapNegativeInteger.cs      6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  using System.Globalization;
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  using System.Globalization;
***************
*** 89,93 ****
  }; // class SoapNegativeInteger
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 89,93 ----
  }; // class SoapNegativeInteger
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapNmtoken.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapNmtoken.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapNmtoken.cs      19 Apr 2003 07:15:38 -0000      1.1
--- SoapNmtoken.cs      6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  [Serializable]
***************
*** 80,84 ****
  }; // class SoapNmtoken
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 80,84 ----
  }; // class SoapNmtoken
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapNmtokens.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapNmtokens.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapNmtokens.cs     19 Apr 2003 07:15:38 -0000      1.1
--- SoapNmtokens.cs     6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  [Serializable]
***************
*** 80,84 ****
  }; // class SoapNmtokens
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 80,84 ----
  }; // class SoapNmtokens
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapNonNegativeInteger.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapNonNegativeInteger.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapNonNegativeInteger.cs   19 Apr 2003 07:15:38 -0000      1.1
--- SoapNonNegativeInteger.cs   6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  using System.Globalization;
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  using System.Globalization;
***************
*** 89,93 ****
  }; // class SoapNonNegativeInteger
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 89,93 ----
  }; // class SoapNonNegativeInteger
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapNonPositiveInteger.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapNonPositiveInteger.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapNonPositiveInteger.cs   19 Apr 2003 07:15:38 -0000      1.1
--- SoapNonPositiveInteger.cs   6 Aug 2003 02:07:53 -0000       1.2
***************
*** 24,28 ****
  {
  
! #if CONFIG_REMOTING
  
  using System.Globalization;
--- 24,28 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  using System.Globalization;
***************
*** 90,94 ****
  }; // class SoapNonPositiveInteger
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 90,94 ----
  }; // class SoapNonPositiveInteger
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapNormalizedString.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapNormalizedString.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapNormalizedString.cs     19 Apr 2003 07:15:38 -0000      1.1
--- SoapNormalizedString.cs     6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  using System.Text;
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  using System.Text;
***************
*** 127,131 ****
  }; // class SoapNormalizedString
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 127,131 ----
  }; // class SoapNormalizedString
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapNotation.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapNotation.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapNotation.cs     19 Apr 2003 07:15:38 -0000      1.1
--- SoapNotation.cs     6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  [Serializable]
***************
*** 80,84 ****
  }; // class SoapNotation
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 80,84 ----
  }; // class SoapNotation
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapPositiveInteger.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapPositiveInteger.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapPositiveInteger.cs      19 Apr 2003 07:15:38 -0000      1.1
--- SoapPositiveInteger.cs      6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  using System.Globalization;
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  using System.Globalization;
***************
*** 89,93 ****
  }; // class SoapPositiveInteger
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 89,93 ----
  }; // class SoapPositiveInteger
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapQName.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapQName.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapQName.cs        19 Apr 2003 07:15:38 -0000      1.1
--- SoapQName.cs        6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  [Serializable]
***************
*** 139,143 ****
  }; // class SoapQName
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 139,143 ----
  }; // class SoapQName
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapTime.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapTime.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapTime.cs 19 Apr 2003 07:15:38 -0000      1.1
--- SoapTime.cs 6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,29 ----
  {
  
! #if CONFIG_SERIALIZATION
! 
! using System.Globalization;
  
  [Serializable]
***************
*** 66,88 ****
                        }
  
        // Parse a value into an instance of this class.
-       [TODO]
        public static SoapTime Parse(String value)
                        {
!                               // TODO
!                               return null;
                        }
  
        // Convert this object into a string.
-       [TODO]
        public override String ToString()
                        {
!                               // TODO
!                               return null;
                        }
  
  }; // class SoapTime
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 68,120 ----
                        }
  
+       // Format values for "Parse".
+       private static String[] formats = {
+                               "HH:mm:ss.fffffffzzz",
+                               "HH:mm:ss.ffff",
+                               "HH:mm:ss.ffffzzz",
+                               "HH:mm:ss.fff",
+                               "HH:mm:ss.fffzzz",
+                               "HH:mm:ss.ff",
+                               "HH:mm:ss.ffzzz",
+                               "HH:mm:ss.f",
+                               "HH:mm:ss.fzzz",
+                               "HH:mm:ss", 
+                               "HH:mm:sszzz",
+                               "HH:mm:ss.fffff",
+                               "HH:mm:ss.fffffzzz",
+                               "HH:mm:ss.ffffff",
+                               "HH:mm:ss.ffffffzzz",
+                               "HH:mm:ss.fffffff",
+                               "HH:mm:ss.ffffffff",
+                               "HH:mm:ss.ffffffffzzz",
+                               "HH:mm:ss.fffffffff",
+                               "HH:mm:ss.fffffffffzzz",
+                               "HH:mm:ss.fffffffff",
+                               "HH:mm:ss.fffffffffzzz"
+                       };
+ 
        // Parse a value into an instance of this class.
        public static SoapTime Parse(String value)
                        {
!                               if(value != null && value.EndsWith("Z"))
!                               {
!                                       value = value.Substring(0, value.Length 
- 1) + "-00:00";
!                               }
!                               return new SoapTime(DateTime.ParseExact
!                                       (value, formats, 
CultureInfo.InvariantCulture,
!                                        DateTimeStyles.None));
                        }
  
        // Convert this object into a string.
        public override String ToString()
                        {
!                               DateTime time = DateTime.Today + 
value.TimeOfDay;
!                               return time.ToString("HH:mm:ss.fffffffzzz",
!                                                                        
CultureInfo.InvariantCulture);
                        }
  
  }; // class SoapTime
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapToken.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapToken.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapToken.cs        19 Apr 2003 07:15:38 -0000      1.1
--- SoapToken.cs        6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,27 ----
  {
  
! #if CONFIG_SERIALIZATION
  
  [Serializable]
***************
*** 95,99 ****
  }; // class SoapToken
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 95,99 ----
  }; // class SoapToken
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapYear.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapYear.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapYear.cs 19 Apr 2003 07:15:38 -0000      1.1
--- SoapYear.cs 6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,29 ----
  {
  
! #if CONFIG_SERIALIZATION
! 
! using System.Globalization;
  
  [Serializable]
***************
*** 90,112 ****
                        }
  
        // Parse a value into an instance of this class.
-       [TODO]
        public static SoapYear Parse(String value)
                        {
!                               // TODO
!                               return null;
                        }
  
        // Convert this object into a string.
-       [TODO]
        public override String ToString()
                        {
!                               // TODO
!                               return null;
                        }
  
  }; // class SoapYear
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 92,140 ----
                        }
  
+       // Format values for "Parse".
+       private static String[] formats = {"yyyy", "yyyyzzz"};
+ 
        // Parse a value into an instance of this class.
        public static SoapYear Parse(String value)
                        {
!                               int sign;
!                               if(value[0] == '-')
!                               {
!                                       value = value.Substring(1);
!                                       sign = -1;
!                               }
!                               else if(value[0] == '+')
!                               {
!                                       value = value.Substring(1);
!                                       sign = 0;
!                               }
!                               else
!                               {
!                                       sign = 0;
!                               }
!                               DateTime time = DateTime.ParseExact
!                                       (value, formats, 
CultureInfo.InvariantCulture,
!                                        DateTimeStyles.None);
!                               return new SoapYear(time, sign);
                        }
  
        // Convert this object into a string.
        public override String ToString()
                        {
!                               if(sign >= 0)
!                               {
!                                       return value.ToString("yyyy",
!                                                                               
  CultureInfo.InvariantCulture);
!                               }
!                               else
!                               {
!                                       return value.ToString("'-'yyyy",
!                                                                               
  CultureInfo.InvariantCulture);
!                               }
                        }
  
  }; // class SoapYear
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001

Index: SoapYearMonth.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Runtime/Remoting/Metadata/W3cXsd2001/SoapYearMonth.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** SoapYearMonth.cs    19 Apr 2003 07:15:38 -0000      1.1
--- SoapYearMonth.cs    6 Aug 2003 02:07:53 -0000       1.2
***************
*** 23,27 ****
  {
  
! #if CONFIG_REMOTING
  
  [Serializable]
--- 23,29 ----
  {
  
! #if CONFIG_SERIALIZATION
! 
! using System.Globalization;
  
  [Serializable]
***************
*** 90,112 ****
                        }
  
        // Parse a value into an instance of this class.
-       [TODO]
        public static SoapYearMonth Parse(String value)
                        {
!                               // TODO
!                               return null;
                        }
  
        // Convert this object into a string.
-       [TODO]
        public override String ToString()
                        {
!                               // TODO
!                               return null;
                        }
  
  }; // class SoapYearMonth
  
! #endif // CONFIG_REMOTING
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001
--- 92,140 ----
                        }
  
+       // Format values for "Parse".
+       private static String[] formats = {"yyyy-MM", "yyyy-MMzzz"};
+ 
        // Parse a value into an instance of this class.
        public static SoapYearMonth Parse(String value)
                        {
!                               int sign;
!                               if(value[0] == '-')
!                               {
!                                       value = value.Substring(1);
!                                       sign = -1;
!                               }
!                               else if(value[0] == '+')
!                               {
!                                       value = value.Substring(1);
!                                       sign = 0;
!                               }
!                               else
!                               {
!                                       sign = 0;
!                               }
!                               DateTime time = DateTime.ParseExact
!                                       (value, formats, 
CultureInfo.InvariantCulture,
!                                        DateTimeStyles.None);
!                               return new SoapYearMonth(time, sign);
                        }
  
        // Convert this object into a string.
        public override String ToString()
                        {
!                               if(sign >= 0)
!                               {
!                                       return value.ToString("yyyy-MM",
!                                                                               
  CultureInfo.InvariantCulture);
!                               }
!                               else
!                               {
!                                       return value.ToString("'-'yyyy-MM",
!                                                                               
  CultureInfo.InvariantCulture);
!                               }
                        }
  
  }; // class SoapYearMonth
  
! #endif // CONFIG_SERIALIZATION
  
  }; // namespace System.Runtime.Remoting.Metadata.W3cXsd2001





reply via email to

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