Update of /cvsroot/mvp-xml/Prototypes/SGen/SGen
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6976/SGen/SGen
Modified Files:
XmlSerializerGenerator.cs
Log Message:
Index: XmlSerializerGenerator.cs
===================================================================
RCS file: /cvsroot/mvp-xml/Prototypes/SGen/SGen/XmlSerializerGenerator.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- XmlSerializerGenerator.cs 14 Sep 2004 13:40:10 -0000 1.2
+++ XmlSerializerGenerator.cs 18 Dec 2004 05:11:53 -0000 1.3
@@ -143,7 +143,7 @@
_reader = reader;
}}
- /// <summary>Constructs the serializer with a pre-writer reader.</summary>
+ /// <summary>Constructs the serializer with a pre-built writer.</summary>
public {0}({2} writer)
{{
_writer = writer;
@@ -284,9 +284,12 @@
// Create a delegate for the event to expose.
CodeTypeDelegate del = new CodeTypeDelegate(
objectread + "DeserializedHandler");
+ char[] name = objectread.ToCharArray();
+ name[0] = Char.ToLower(name[0]);
del.Parameters.Add(new CodeParameterDeclarationExpression(
readm.Groups[ReadMethodReturnType].Value,
- objectread.ToLower()));
+ new string(name)));
+ del.Comments.Add(new CodeCommentStatement("/// <remarks/>", true));
ns.Types.Add(del);
// Expose event.
@@ -294,6 +297,7 @@
ev.Name = objectread + "Deserialized";
ev.Attributes = MemberAttributes.Public;
ev.Type = new CodeTypeReference(del.Name);
+ ev.Comments.Add(new CodeCommentStatement("/// <remarks/>", true));
reader.Members.Add(ev);
// Override base method.
@@ -316,8 +320,8 @@
reader.Members.Add(new CodeSnippetTypeMember(
String.Format(TemplateReadMethod,
type.FullName, readmatch.Groups[PublicMethodName].Value)));
- // Turn original public method into protected
- output = PublicRead.Replace(output, "protected object ${method}");
+ // Turn original public method into internal protected
+ output = PublicRead.Replace(output, "protected internal object ${method}");
// Turn all private methods into protected virtual, as they are overriden
// by the custom event rising reader.
@@ -340,8 +344,8 @@
String.Format(TemplateWriteMethod,
type.FullName, writematch.Groups[PublicMethodName].Value)));
- // Turn original public method into protected
- output = PublicWrite.Replace(output, "protected void ${method}");
+ // Turn original public method into internal protected
+ output = PublicWrite.Replace(output, "protected internal void ${method}");
#endregion Create custom writer
|