In this patch I used the ToString () member method to store the
"pattern" (I'm not sure If this is the correct type that must be used, but
at least I could use the base constructor to build back ;))
Great work & Best regards mono:: team!
cesar
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<a1:Regex id="ref-1"
xmlns:a1="http://schemas.microsoft.com/clr/nsassem/System.Text.RegularExpressions/System%2C%20Version%3D1.0.3300.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089">
<pattern id="ref-3">cEsAr</pattern>
<options xsi:type="a1:RegexOptions"
xmlns:a1="http://schemas.microsoft.com/clr/nsassem/System.Text.RegularExpressions/System%2C%20Version%3D1.0.3300.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089">Compiled</options>
</a1:Regex>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Index: regex.cs
===================================================================
RCS file: /mono/mcs/class/System/System.Text.RegularExpressions/regex.cs,v
retrieving revision 1.8
diff -u -r1.8 regex.cs
--- regex.cs 31 Jul 2002 16:41:39 -0000 1.8
+++ regex.cs 14 Aug 2002 05:29:43 -0000
@@ -172,6 +172,12 @@
}
}
+
+ public Regex (SerializationInfo info, StreamingContext context) :
+ this (info.GetString ("pattern"),
+ (RegexOptions) info.GetValue ("options", typeof
+(RegexOptions))) {
+ }
+
// public instance properties
public RegexOptions Options {
@@ -337,7 +343,8 @@
// ISerializable interface
public void GetObjectData (SerializationInfo info, StreamingContext
context) {
- throw new Exception ("Not implemented.");
+ info.AddValue ("pattern", this.ToString (), typeof (string));
+ info.AddValue ("options", this.Options, typeof (RegexOptions));
}
// internal