You can subscribe to this list here.
2004 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(10) |
Aug
(8) |
Sep
|
Oct
(13) |
Nov
(50) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
|
Mar
(10) |
Apr
(12) |
May
(3) |
Jun
(6) |
Jul
(3) |
Aug
(1) |
Sep
(49) |
Oct
|
Nov
|
Dec
(3) |
2006 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
(6) |
Dec
(11) |
2007 |
Jan
(1) |
Feb
(6) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
2008 |
Jan
(5) |
Feb
(6) |
Mar
(25) |
Apr
(8) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Owen R. <exo...@us...> - 2005-09-08 12:42:39
|
Update of /cvsroot/netreflector/NetReflector/tools/fxcop/Repository In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8955/tools/fxcop/Repository Added Files: system32.bin Log Message: fixed vil upgraded fxcop --- NEW FILE: system32.bin --- (This appears to be a binary file; contents omitted.) |
From: Owen R. <exo...@us...> - 2005-09-08 04:02:07
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8996/src/NetReflector.Test/resources Modified Files: HashTestClass.cs Log Message: attempting to fix long standing broken build by sorting members Index: HashTestClass.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/resources/HashTestClass.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** HashTestClass.cs 22 Oct 2004 12:45:34 -0000 1.6 --- HashTestClass.cs 8 Sep 2005 04:01:57 -0000 1.7 *************** *** 10,16 **** [ReflectorHash("elements", "id", Required=false)] ! public Hashtable ElementHash; ! [ReflectorHash("list", InstanceType=typeof(Hashtable), Required=false)] public IDictionary List { --- 10,16 ---- [ReflectorHash("elements", "id", Required=false)] ! public SortedList ElementHash; ! [ReflectorHash("list", InstanceType=typeof(SortedList), Required=false)] public IDictionary List { *************** *** 21,31 **** public static HashTestClass CreateHashtableWithStrings() { ! Hashtable hashtable = new Hashtable(); ! hashtable.Add("1", "a"); ! hashtable.Add("2", "b"); ! hashtable.Add("3", "c"); HashTestClass hash = new HashTestClass(); ! hash.ElementHash = hashtable; return hash; } --- 21,31 ---- public static HashTestClass CreateHashtableWithStrings() { ! SortedList list = new SortedList(); ! list.Add("1", "a"); ! list.Add("2", "b"); ! list.Add("3", "c"); HashTestClass hash = new HashTestClass(); ! hash.ElementHash = list; return hash; } *************** *** 33,43 **** public static HashTestClass CreateHashtableWithElements() { ! Hashtable hashtable = new Hashtable(); ! hashtable.Add("1", ElementTestClass.Create("1")); ! hashtable.Add("2", ElementTestClass.Create("2")); ! hashtable.Add("3", ElementTestClass.Create("3")); HashTestClass hash = new HashTestClass(); ! hash.ElementHash = hashtable; return hash; } --- 33,43 ---- public static HashTestClass CreateHashtableWithElements() { ! SortedList list = new SortedList(); ! list.Add("1", ElementTestClass.Create("1")); ! list.Add("2", ElementTestClass.Create("2")); ! list.Add("3", ElementTestClass.Create("3")); HashTestClass hash = new HashTestClass(); ! hash.ElementHash = list; return hash; } *************** *** 55,64 **** public static string GetXmlForHashtableWithStrings() { ! return @"<hashtest><elements><string id=""2"">b</string><string id=""3"">c</string><string id=""1"">a</string></elements></hashtest>"; } public static string GetXmlForHashtableWithElements() { ! return @"<hashtest><elements><element id=""2""><id>2</id></element><element id=""3""><id>3</id></element><element id=""1""><id>1</id></element></elements></hashtest>"; } } --- 55,64 ---- public static string GetXmlForHashtableWithStrings() { ! return @"<hashtest><elements><string id=""1"">a</string><string id=""2"">b</string><string id=""3"">c</string></elements></hashtest>"; } public static string GetXmlForHashtableWithElements() { ! return @"<hashtest><elements><element id=""1""><id>1</id></element><element id=""2""><id>2</id></element><element id=""3""><id>3</id></element></elements></hashtest>"; } } |
From: Owen R. <exo...@us...> - 2005-09-08 03:47:18
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector/Serialisers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6408/src/NetReflector/Serialisers Modified Files: IXmlTypeSerialiser.cs XmlMemberSerialiser.cs XmlTypeSerialiser.cs Log Message: attempting to fix long standing broken build by sorting members Index: XmlMemberSerialiser.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/Serialisers/XmlMemberSerialiser.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** XmlMemberSerialiser.cs 8 Sep 2005 01:07:47 -0000 1.11 --- XmlMemberSerialiser.cs 8 Sep 2005 03:47:09 -0000 1.12 *************** *** 68,72 **** } ! public object Read(XmlNode node, NetReflectorTypeTable table) { if (node == null) --- 68,72 ---- } ! public virtual object Read(XmlNode node, NetReflectorTypeTable table) { if (node == null) *************** *** 148,152 **** } ! public void SetValue(object instance, object value) { member.SetValue(instance, value); --- 148,152 ---- } ! public virtual void SetValue(object instance, object value) { member.SetValue(instance, value); Index: IXmlTypeSerialiser.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/Serialisers/IXmlTypeSerialiser.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IXmlTypeSerialiser.cs 15 Nov 2004 05:13:02 -0000 1.3 --- IXmlTypeSerialiser.cs 8 Sep 2005 03:47:09 -0000 1.4 *************** *** 1,3 **** --- 1,4 ---- using System; + using System.Collections; namespace Exortech.NetReflector *************** *** 7,11 **** Type Type { get; } ReflectorTypeAttribute Attribute { get; } ! IXmlMemberSerialiser[] MemberSerialisers { get; } } } --- 8,12 ---- Type Type { get; } ReflectorTypeAttribute Attribute { get; } ! IEnumerable MemberSerialisers { get; } } } Index: XmlTypeSerialiser.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/Serialisers/XmlTypeSerialiser.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** XmlTypeSerialiser.cs 8 Sep 2005 01:07:47 -0000 1.10 --- XmlTypeSerialiser.cs 8 Sep 2005 03:47:09 -0000 1.11 *************** *** 11,15 **** private Type type; private ReflectorTypeAttribute attribute; ! private IXmlMemberSerialiser[] serialisers; private IInstantiator instantiator; --- 11,15 ---- private Type type; private ReflectorTypeAttribute attribute; ! private IEnumerable serialisers; private IInstantiator instantiator; *************** *** 39,43 **** } ! public IXmlMemberSerialiser[] MemberSerialisers { get --- 39,43 ---- } ! public IEnumerable MemberSerialisers { get *************** *** 51,57 **** } ! private IXmlMemberSerialiser[] InitialiseMemberSerialisers() { ! ArrayList serialisers = new ArrayList(); foreach (MemberInfo member in type.GetMembers()) { --- 51,57 ---- } ! private IEnumerable InitialiseMemberSerialisers() { ! SortedList serialisers = new SortedList(); foreach (MemberInfo member in type.GetMembers()) { *************** *** 59,66 **** if (attribute != null) { ! serialisers.Add(attribute.CreateSerialiser(ReflectorMember.Create(member))); } } ! return (IXmlMemberSerialiser[]) serialisers.ToArray(typeof (IXmlMemberSerialiser)); } --- 59,66 ---- if (attribute != null) { ! serialisers.Add(member.Name, attribute.CreateSerialiser(ReflectorMember.Create(member))); } } ! return serialisers.Values; } |
From: Owen R. <exo...@us...> - 2005-09-08 03:47:18
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector/attributes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6408/src/NetReflector/attributes Modified Files: ReflectorPropertyAttribute.cs Log Message: attempting to fix long standing broken build by sorting members Index: ReflectorPropertyAttribute.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/attributes/ReflectorPropertyAttribute.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ReflectorPropertyAttribute.cs 8 Sep 2005 02:03:18 -0000 1.8 --- ReflectorPropertyAttribute.cs 8 Sep 2005 03:47:09 -0000 1.9 *************** *** 6,10 **** { [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = true, AllowMultiple = false)] ! public class ReflectorPropertyAttribute : Attribute, IReflectorAttribute { private string name; --- 6,11 ---- { [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = true, AllowMultiple = false)] ! public class ! ReflectorPropertyAttribute : Attribute, IReflectorAttribute { private string name; *************** *** 66,75 **** return (attributes.Length == 0) ? null : (ReflectorPropertyAttribute)attributes[0]; } - - public ISerialiserFactory SerialiserFactory - { - get { return factory; } - set { factory = value; } - } } } \ No newline at end of file --- 67,70 ---- |
From: Owen R. <exo...@us...> - 2005-09-08 03:47:17
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Generators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6408/src/NetReflector.Test/Generators Modified Files: XmlDocumentationGeneratorTest.cs Log Message: attempting to fix long standing broken build by sorting members Index: XmlDocumentationGeneratorTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Generators/XmlDocumentationGeneratorTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** XmlDocumentationGeneratorTest.cs 8 Sep 2005 01:07:47 -0000 1.2 --- XmlDocumentationGeneratorTest.cs 8 Sep 2005 03:47:09 -0000 1.3 *************** *** 1,2 **** --- 1,4 ---- + using System; + using System.Collections; using System.IO; using System.Reflection; *************** *** 46,50 **** XmlMemberDocumentationGenerator generator = new XmlMemberDocumentationGenerator(); ! generator.Write(new XmlTextWriter(writer), new IXmlMemberSerialiser[] {CreateSerialiser("Name"), CreateSerialiser("Count")}); string expectedXml = @"<members><member><name>Name</name><reflectorName>name</reflectorName><description>name of the test class</description><required>True</required></member>" + --- 48,52 ---- XmlMemberDocumentationGenerator generator = new XmlMemberDocumentationGenerator(); ! generator.Write(new XmlTextWriter(writer), new TestXmlMemberSerialiser()); string expectedXml = @"<members><member><name>Name</name><reflectorName>name</reflectorName><description>name of the test class</description><required>True</required></member>" + *************** *** 53,69 **** } - private IXmlMemberSerialiser CreateSerialiser(string name) - { - MemberInfo member = typeof (TestClass).GetMember(name)[0]; - return (IXmlMemberSerialiser) ReflectorPropertyAttribute.GetAttribute(member).CreateSerialiser(ReflectorMember.Create(member)); - } private class XmlMemberDocumentationGeneratorExtension : XmlMemberDocumentationGenerator { ! public override void Write(XmlWriter writer, IXmlMemberSerialiser[] memberSerialisers) { // do nothing } } } } \ No newline at end of file --- 55,100 ---- } private class XmlMemberDocumentationGeneratorExtension : XmlMemberDocumentationGenerator { ! public override void Write(XmlWriter writer, IXmlTypeSerialiser typeSerialiser) { // do nothing } } + + private class TestXmlMemberSerialiser : IXmlTypeSerialiser + { + private IXmlMemberSerialiser CreateSerialiser(string name) + { + MemberInfo member = typeof (TestClass).GetMember(name)[0]; + return (IXmlMemberSerialiser) ReflectorPropertyAttribute.GetAttribute(member).CreateSerialiser(ReflectorMember.Create(member)); + } + + public Type Type + { + get { throw new NotImplementedException(); } + } + + public ReflectorTypeAttribute Attribute + { + get { throw new NotImplementedException(); } + } + + public IEnumerable MemberSerialisers + { + get { return new IXmlMemberSerialiser[] {CreateSerialiser("Name"), CreateSerialiser("Count")}; } + } + + public void Write(XmlWriter writer, object target) + { + throw new NotImplementedException(); + } + + public object Read(XmlNode node, NetReflectorTypeTable table) + { + throw new NotImplementedException(); + } + } } } \ No newline at end of file |
From: Owen R. <exo...@us...> - 2005-09-08 03:47:17
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6408/src/NetReflector.Test/resources Modified Files: ArrayTestClass.cs TestClass.cs Log Message: attempting to fix long standing broken build by sorting members Index: TestClass.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/resources/TestClass.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TestClass.cs 19 Jun 2005 00:17:33 -0000 1.7 --- TestClass.cs 8 Sep 2005 03:47:09 -0000 1.8 *************** *** 65,69 **** public static string GetXml(DateTime date, string innerTestClassXml) { ! return string.Format(@"<reflectTest><field>field</field><name>foo</name><count>54</count><message>message</message><date>{0}</date>{1}</reflectTest>", date, innerTestClassXml); } --- 65,69 ---- public static string GetXml(DateTime date, string innerTestClassXml) { ! return string.Format(@"<reflectTest><count>54</count><date>{0}</date><field>field</field>{1}<message>message</message><name>foo</name></reflectTest>", date, innerTestClassXml); } Index: ArrayTestClass.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/resources/ArrayTestClass.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ArrayTestClass.cs 16 Nov 2004 04:41:19 -0000 1.6 --- ArrayTestClass.cs 8 Sep 2005 03:47:09 -0000 1.7 *************** *** 39,44 **** public static string GetXml() { ! return "<array-test><stringArray><string>1</string><string>2</string><string>3</string></stringArray><days />" + ! "<elementArray><element><id>1</id></element><element><id>2</id></element><element><id>3</id></element></elementArray></array-test>"; } --- 39,43 ---- public static string GetXml() { ! return "<array-test><days /><elementArray><element><id>1</id></element><element><id>2</id></element><element><id>3</id></element></elementArray><stringArray><string>1</string><string>2</string><string>3</string></stringArray></array-test>"; } |
From: Owen R. <exo...@us...> - 2005-09-08 03:47:17
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Attributes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6408/src/NetReflector.Test/Attributes Modified Files: ReflectorPropertyTest.cs Log Message: attempting to fix long standing broken build by sorting members Index: ReflectorPropertyTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Attributes/ReflectorPropertyTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ReflectorPropertyTest.cs 8 Sep 2005 02:03:18 -0000 1.2 --- ReflectorPropertyTest.cs 8 Sep 2005 03:47:09 -0000 1.3 *************** *** 1,3 **** - using System; using System.Xml; using Exortech.NetReflector.Util; --- 1,2 ---- *************** *** 20,27 **** public void ShouldUseCustomSerialiserFactory() { ! TestCustomSerialiser test = new TestCustomSerialiser(); ! ReflectorPropertyAttribute attribute = (ReflectorPropertyAttribute) test.GetType().GetField("Foo").GetCustomAttributes(typeof(ReflectorPropertyAttribute), true)[0]; ! IXmlSerialiser serialiser = attribute.CreateSerialiser(member); ! Assert.AreEqual(CustomSerialiserFactory.Serialiser, serialiser); } --- 19,25 ---- public void ShouldUseCustomSerialiserFactory() { ! string xml = @"<customSerialiser><foo>3</foo></customSerialiser>"; ! TestCustomSerialiser test = (TestCustomSerialiser) NetReflector.Read(xml); ! Assert.AreEqual(2, test.Foo); } *************** *** 37,61 **** internal class CustomSerialiserFactory : ISerialiserFactory { ! public static readonly IXmlSerialiser Serialiser = new CustomSerialiser(); ! public IXmlSerialiser Create(ReflectorMember memberInfo, ReflectorPropertyAttribute attribute) { ! return Serialiser; } } ! internal class CustomSerialiser : IXmlSerialiser { ! public void Write(XmlWriter writer, object target) ! { ! throw new NotImplementedException(); ! } ! public object Read(XmlNode node, NetReflectorTypeTable table) { ! throw new NotImplementedException(); } } internal class TestCustomSerialiser { --- 35,58 ---- internal class CustomSerialiserFactory : ISerialiserFactory { ! // public static readonly IXmlSerialiser Serialiser = new CustomSerialiser(); ! public IXmlSerialiser Create(ReflectorMember member, ReflectorPropertyAttribute attribute) { ! return new CustomSerialiser(member, attribute); } } ! internal class CustomSerialiser : XmlMemberSerialiser { ! public CustomSerialiser(ReflectorMember member, ReflectorPropertyAttribute attribute) : base(member, attribute) ! {} ! public override object Read(XmlNode node, NetReflectorTypeTable table) { ! return 2; } } + [ReflectorType("customSerialiser")] internal class TestCustomSerialiser { |
From: Owen R. <exo...@us...> - 2005-09-08 03:47:17
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6408/src/NetReflector.Test Modified Files: NetReflectorTypeTableTest.cs Log Message: attempting to fix long standing broken build by sorting members Index: NetReflectorTypeTableTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/NetReflectorTypeTableTest.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** NetReflectorTypeTableTest.cs 8 Sep 2005 01:07:47 -0000 1.7 --- NetReflectorTypeTableTest.cs 8 Sep 2005 03:47:09 -0000 1.8 *************** *** 11,14 **** --- 11,16 ---- public class NetReflectorTypeTableTest { + private const int NumberOfReflectorTypesInAssembly = 11; + [Test] public void AddTypeToTypeTable() *************** *** 27,31 **** table.Add(Assembly.GetExecutingAssembly()); ! Assert.AreEqual(10, table.Count); Assert.AreEqual(typeof (TestClass), table["reflectTest"].Type); Assert.AreEqual(typeof (TestInnerClass), table["inner"].Type); --- 29,33 ---- table.Add(Assembly.GetExecutingAssembly()); ! Assert.AreEqual(NumberOfReflectorTypesInAssembly, table.Count); Assert.AreEqual(typeof (TestClass), table["reflectTest"].Type); Assert.AreEqual(typeof (TestInnerClass), table["inner"].Type); *************** *** 44,48 **** table.Add(Assembly.GetExecutingAssembly()); ! Assert.AreEqual(10, table.Count); } --- 46,50 ---- table.Add(Assembly.GetExecutingAssembly()); ! Assert.AreEqual(NumberOfReflectorTypesInAssembly, table.Count); } *************** *** 76,80 **** NetReflectorTypeTable table = new NetReflectorTypeTable(); table.Add(Directory.GetCurrentDirectory(), "*Test.dll"); ! Assert.AreEqual(11, table.Count); Assert.IsNotNull(table["plugin"], "Plugin type not found"); Assert.IsNotNull(table["array-test"], "Array-test type not found"); --- 78,82 ---- NetReflectorTypeTable table = new NetReflectorTypeTable(); table.Add(Directory.GetCurrentDirectory(), "*Test.dll"); ! Assert.AreEqual(NumberOfReflectorTypesInAssembly + 1, table.Count); Assert.IsNotNull(table["plugin"], "Plugin type not found"); Assert.IsNotNull(table["array-test"], "Array-test type not found"); |
From: Owen R. <exo...@us...> - 2005-09-08 03:47:17
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector/Generators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6408/src/NetReflector/Generators Modified Files: XmlDocumentationGenerator.cs XsdGenerator.cs Log Message: attempting to fix long standing broken build by sorting members Index: XmlDocumentationGenerator.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/Generators/XmlDocumentationGenerator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XmlDocumentationGenerator.cs 15 Nov 2004 05:59:14 -0000 1.1 --- XmlDocumentationGenerator.cs 8 Sep 2005 03:47:09 -0000 1.2 *************** *** 53,57 **** writer.WriteElementString("reflectorName", typeSerialiser.Attribute.Name); WriteIfNotNull(writer, "description", typeSerialiser.Attribute.Description); ! memberGenerator.Write(writer, typeSerialiser.MemberSerialisers); writer.WriteEndElement(); } --- 53,57 ---- writer.WriteElementString("reflectorName", typeSerialiser.Attribute.Name); WriteIfNotNull(writer, "description", typeSerialiser.Attribute.Description); ! memberGenerator.Write(writer, typeSerialiser); writer.WriteEndElement(); } *************** *** 71,78 **** public class XmlMemberDocumentationGenerator { ! public virtual void Write(XmlWriter writer, IXmlMemberSerialiser[] memberSerialisers) { writer.WriteStartElement("members"); ! foreach (IXmlMemberSerialiser memberSerialiser in memberSerialisers) { writer.WriteStartElement("member"); --- 71,78 ---- public class XmlMemberDocumentationGenerator { ! public virtual void Write(XmlWriter writer, IXmlTypeSerialiser typeSerialiser) { writer.WriteStartElement("members"); ! foreach (IXmlMemberSerialiser memberSerialiser in typeSerialiser.MemberSerialisers) { writer.WriteStartElement("member"); Index: XsdGenerator.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/Generators/XsdGenerator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XsdGenerator.cs 15 Nov 2004 05:13:05 -0000 1.1 --- XsdGenerator.cs 8 Sep 2005 03:47:09 -0000 1.2 *************** *** 34,38 **** XmlSchemaComplexType complexType = new XmlSchemaComplexType(); complexType.Name = GetComplexTypeName(serialiser); ! complexType.Particle = GenerateSchemaElementsForMembers(serialiser.MemberSerialisers); schema.Items.Add(complexType); } --- 34,38 ---- XmlSchemaComplexType complexType = new XmlSchemaComplexType(); complexType.Name = GetComplexTypeName(serialiser); ! complexType.Particle = GenerateSchemaElementsForMembers(serialiser); schema.Items.Add(complexType); } *************** *** 43,50 **** } ! private XmlSchemaParticle GenerateSchemaElementsForMembers(IXmlMemberSerialiser[] memberSerialisers) { XmlSchemaAll group = new XmlSchemaAll(); ! foreach (IXmlMemberSerialiser memberSerialiser in memberSerialisers) { XmlSchemaElement item = new XmlSchemaElement(); --- 43,50 ---- } ! private XmlSchemaParticle GenerateSchemaElementsForMembers(IXmlTypeSerialiser typeSerialiser) { XmlSchemaAll group = new XmlSchemaAll(); ! foreach (IXmlMemberSerialiser memberSerialiser in typeSerialiser.MemberSerialisers) { XmlSchemaElement item = new XmlSchemaElement(); |
From: Owen R. <exo...@us...> - 2005-09-08 02:03:30
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Attributes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20404/src/NetReflector.Test/Attributes Modified Files: ReflectorPropertyTest.cs Log Message: NETREF-5: adding support for customisable serialisation. attributes use DefaultSerialiserFactory by default -- however clients can override for more control over serialisation process. changing implementation to support limitation in that attributes can't take custom types into their properties. passing types instead. Index: ReflectorPropertyTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Attributes/ReflectorPropertyTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReflectorPropertyTest.cs 8 Sep 2005 01:07:47 -0000 1.1 --- ReflectorPropertyTest.cs 8 Sep 2005 02:03:18 -0000 1.2 *************** *** 1,5 **** using Exortech.NetReflector.Util; - using NMock; - using NMock.Constraints; using NUnit.Framework; --- 1,5 ---- + using System; + using System.Xml; using Exortech.NetReflector.Util; using NUnit.Framework; *************** *** 9,13 **** public class ReflectorPropertyTest { - private ReflectorPropertyAttribute attribute; private ReflectorMember member; --- 9,12 ---- *************** *** 15,19 **** protected void SetUp() { - attribute = new ReflectorPropertyAttribute("foo"); member = ReflectorMember.Create(typeof (TestClass).GetProperty("Name")); } --- 14,17 ---- *************** *** 22,34 **** public void ShouldUseCustomSerialiserFactory() { ! IMock mockSerialiser = new DynamicMock(typeof (IXmlMemberSerialiser)); ! IMock mockFactory = new DynamicMock(typeof (ISerialiserFactory)); ! ! mockFactory.ExpectAndReturn("Create", mockSerialiser.MockInstance, new IsTypeOf(typeof (ReflectorMember)), attribute); ! ! attribute.SerialiserFactory = (ISerialiserFactory) mockFactory.MockInstance; ! attribute.CreateSerialiser(member); ! ! mockFactory.Verify(); } --- 20,27 ---- public void ShouldUseCustomSerialiserFactory() { ! TestCustomSerialiser test = new TestCustomSerialiser(); ! ReflectorPropertyAttribute attribute = (ReflectorPropertyAttribute) test.GetType().GetField("Foo").GetCustomAttributes(typeof(ReflectorPropertyAttribute), true)[0]; ! IXmlSerialiser serialiser = attribute.CreateSerialiser(member); ! Assert.AreEqual(CustomSerialiserFactory.Serialiser, serialiser); } *************** *** 37,44 **** { ReflectorPropertyAttribute attribute = new ReflectorPropertyAttribute("foo"); - IXmlSerialiser serialiser = attribute.CreateSerialiser(member); Assert.IsNotNull(serialiser); } } } \ No newline at end of file --- 30,65 ---- { ReflectorPropertyAttribute attribute = new ReflectorPropertyAttribute("foo"); IXmlSerialiser serialiser = attribute.CreateSerialiser(member); Assert.IsNotNull(serialiser); } } + + internal class CustomSerialiserFactory : ISerialiserFactory + { + public static readonly IXmlSerialiser Serialiser = new CustomSerialiser(); + + public IXmlSerialiser Create(ReflectorMember memberInfo, ReflectorPropertyAttribute attribute) + { + return Serialiser; + } + } + + internal class CustomSerialiser : IXmlSerialiser + { + public void Write(XmlWriter writer, object target) + { + throw new NotImplementedException(); + } + + public object Read(XmlNode node, NetReflectorTypeTable table) + { + throw new NotImplementedException(); + } + } + + internal class TestCustomSerialiser + { + [ReflectorProperty("foo", typeof (CustomSerialiserFactory))] + public int Foo; + } } \ No newline at end of file |
From: Owen R. <exo...@us...> - 2005-09-08 02:03:30
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20404/src/NetReflector.Test Modified Files: NetReflectorTest.csproj Log Message: NETREF-5: adding support for customisable serialisation. attributes use DefaultSerialiserFactory by default -- however clients can override for more control over serialisation process. changing implementation to support limitation in that attributes can't take custom types into their properties. passing types instead. Index: NetReflectorTest.csproj =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/NetReflectorTest.csproj,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** NetReflectorTest.csproj 8 Sep 2005 01:07:47 -0000 1.15 --- NetReflectorTest.csproj 8 Sep 2005 02:03:18 -0000 1.16 *************** *** 96,104 **** HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" /> - <Reference - Name = "nmock" - AssemblyName = "nmock" - HintPath = "..\..\lib\nmock.dll" - /> </References> </Build> --- 96,99 ---- |
From: Owen R. <exo...@us...> - 2005-09-08 02:03:30
|
Update of /cvsroot/netreflector/NetReflector In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20404 Modified Files: reflector.build Log Message: NETREF-5: adding support for customisable serialisation. attributes use DefaultSerialiserFactory by default -- however clients can override for more control over serialisation process. changing implementation to support limitation in that attributes can't take custom types into their properties. passing types instead. Index: reflector.build =================================================================== RCS file: /cvsroot/netreflector/NetReflector/reflector.build,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** reflector.build 8 Sep 2005 01:07:46 -0000 1.13 --- reflector.build 8 Sep 2005 02:03:18 -0000 1.14 *************** *** 83,87 **** <include name="${build.dir}\${core.dll}"/> <include name="${lib.dir}\nunit.framework.dll"/> - <include name="${lib.dir}\nmock.dll"/> </references> <!-- don't warn about uncommented public methods --> --- 83,86 ---- *************** *** 89,93 **** </csc> <copy file="${lib.dir}\nunit.framework.dll" todir="${build.dir}"/> - <copy file="${lib.dir}\nmock.dll" todir="${build.dir}"/> </target> --- 88,91 ---- |
From: Owen R. <exo...@us...> - 2005-09-08 02:03:30
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector/attributes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20404/src/NetReflector/attributes Modified Files: ReflectorPropertyAttribute.cs Log Message: NETREF-5: adding support for customisable serialisation. attributes use DefaultSerialiserFactory by default -- however clients can override for more control over serialisation process. changing implementation to support limitation in that attributes can't take custom types into their properties. passing types instead. Index: ReflectorPropertyAttribute.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/attributes/ReflectorPropertyAttribute.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ReflectorPropertyAttribute.cs 8 Sep 2005 01:07:47 -0000 1.7 --- ReflectorPropertyAttribute.cs 8 Sep 2005 02:03:18 -0000 1.8 *************** *** 20,23 **** --- 20,29 ---- } + public ReflectorPropertyAttribute(string name, Type factoryType) : this(name) + { + this.name = name; + this.factory = (ISerialiserFactory) Activator.CreateInstance(factoryType); + } + public string Name { *************** *** 63,66 **** --- 69,73 ---- public ISerialiserFactory SerialiserFactory { + get { return factory; } set { factory = value; } } |
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Serialisers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10450/src/NetReflector.Test/Serialisers Modified Files: XmlArraySerialiserTest.cs XmlCollectionSerialiserTest.cs XmlDictionarySerialiserTest.cs Added Files: DefaultSerialiserFactoryTest.cs Log Message: NETREF-5: adding support for customisable serialisation. attributes use DefaultSerialiserFactory by default -- however clients can override for more control over serialisation process. Index: XmlCollectionSerialiserTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Serialisers/XmlCollectionSerialiserTest.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** XmlCollectionSerialiserTest.cs 7 Mar 2005 05:46:07 -0000 1.4 --- XmlCollectionSerialiserTest.cs 8 Sep 2005 01:07:47 -0000 1.5 *************** *** 1,3 **** ! using Exortech.NetReflector.Test.resources; using NUnit.Framework; --- 1,3 ---- ! using Exortech.NetReflector.Test.Resources; using NUnit.Framework; *************** *** 5,9 **** { [TestFixture] ! public class XmlCollectionSerialiserTest { private NetReflectorTypeTable table; --- 5,9 ---- { [TestFixture] ! public class XmlCollectionSerialiserTest { private NetReflectorTypeTable table; *************** *** 28,36 **** Assert.AreEqual(CollectionTestClass.GetXmlWithMissingNullElements(), xml); } ! [Test] public void ReadCollectionTestClass() { ! CollectionTestClass actual = (CollectionTestClass)NetReflector.Read(CollectionTestClass.GetXml(), table); CollectionTestClass.AssertEquals(CollectionTestClass.Create(), actual); } --- 28,36 ---- Assert.AreEqual(CollectionTestClass.GetXmlWithMissingNullElements(), xml); } ! [Test] public void ReadCollectionTestClass() { ! CollectionTestClass actual = (CollectionTestClass) NetReflector.Read(CollectionTestClass.GetXml(), table); CollectionTestClass.AssertEquals(CollectionTestClass.Create(), actual); } *************** *** 45,47 **** } } ! } --- 45,47 ---- } } ! } \ No newline at end of file Index: XmlArraySerialiserTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Serialisers/XmlArraySerialiserTest.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** XmlArraySerialiserTest.cs 25 Jun 2005 01:40:14 -0000 1.5 --- XmlArraySerialiserTest.cs 8 Sep 2005 01:07:47 -0000 1.6 *************** *** 41,44 **** --- 41,49 ---- } + private void AssertXmlIsEquivalent(string expected, string actual) + { + + } + private string XmlEncode(string value) { Index: XmlDictionarySerialiserTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Serialisers/XmlDictionarySerialiserTest.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** XmlDictionarySerialiserTest.cs 7 Mar 2005 05:46:07 -0000 1.3 --- XmlDictionarySerialiserTest.cs 8 Sep 2005 01:07:47 -0000 1.4 *************** *** 1,3 **** ! using Exortech.NetReflector.Test.resources; using NUnit.Framework; --- 1,3 ---- ! using Exortech.NetReflector.Test.Resources; using NUnit.Framework; --- NEW FILE: DefaultSerialiserFactoryTest.cs --- using Exortech.NetReflector.Util; using NUnit.Framework; namespace Exortech.NetReflector.Test.Serialisers { [TestFixture] public class DefaultSerialiserFactoryTest { private ReflectorPropertyAttribute attribute; private DefaultSerialiserFactory factory; [SetUp] protected void SetUp() { attribute = new ReflectorPropertyAttribute("foo"); factory = new DefaultSerialiserFactory(); } [Test] public void ShouldCreateArraySerialiserWhenArrayPropertyIsPassed() { IXmlSerialiser serialiser = factory.Create(ReflectorMember.Create(typeof (ArrayTestClass).GetProperty("Elements")), attribute); Assert.AreEqual(typeof(XmlArraySerialiser), serialiser.GetType()); } [Test] public void ShouldCreateCollectionSerialiserWhenCollectionPropertyIsPassed() { IXmlSerialiser serialiser = factory.Create(ReflectorMember.Create(typeof (CollectionTestClass).GetProperty("List")), attribute); Assert.AreEqual(typeof(XmlCollectionSerialiser), serialiser.GetType()); } } } |
From: Owen R. <exo...@us...> - 2005-09-08 01:07:56
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector/Serialisers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10450/src/NetReflector/Serialisers Modified Files: XmlArraySerialiser.cs XmlCollectionSerialiser.cs XmlDictionarySerialiser.cs XmlMemberSerialiser.cs XmlTypeSerialiser.cs Added Files: DefaultSerialiserFactory.cs ISerialiserFactory.cs Log Message: NETREF-5: adding support for customisable serialisation. attributes use DefaultSerialiserFactory by default -- however clients can override for more control over serialisation process. Index: XmlDictionarySerialiser.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/Serialisers/XmlDictionarySerialiser.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** XmlDictionarySerialiser.cs 7 Apr 2005 04:30:40 -0000 1.4 --- XmlDictionarySerialiser.cs 8 Sep 2005 01:07:47 -0000 1.5 *************** *** 1,7 **** - using Exortech.NetReflector.Util; using System; using System.Collections; - using System.Reflection; using System.Xml; namespace Exortech.NetReflector --- 1,6 ---- using System; using System.Collections; using System.Xml; + using Exortech.NetReflector.Util; namespace Exortech.NetReflector *************** *** 12,17 **** private string elementName = "string"; ! public XmlDictionarySerialiser(MemberInfo member, ReflectorHashAttribute attribute) : base(member, attribute) ! { this.attribute = attribute; } --- 11,16 ---- private string elementName = "string"; ! public XmlDictionarySerialiser(ReflectorMember member, ReflectorHashAttribute attribute) : base(member, attribute) ! { this.attribute = attribute; } *************** *** 19,23 **** protected override void WriteValue(XmlWriter writer, object value) { ! IDictionary dictionary = (IDictionary)value; foreach (object key in dictionary.Keys) { --- 18,22 ---- protected override void WriteValue(XmlWriter writer, object value) { ! IDictionary dictionary = (IDictionary) value; foreach (object key in dictionary.Keys) { *************** *** 38,44 **** writer.WriteAttributeString(attribute.Key, key.ToString()); ! XmlTypeSerialiser serialiser = (XmlTypeSerialiser)typeAttribute.CreateSerialiser(target.GetType()); serialiser.WriteMembers(writer, target); ! writer.WriteEndElement(); } --- 37,43 ---- writer.WriteAttributeString(attribute.Key, key.ToString()); ! XmlTypeSerialiser serialiser = (XmlTypeSerialiser) typeAttribute.CreateSerialiser(target.GetType()); serialiser.WriteMembers(writer, target); ! writer.WriteEndElement(); } *************** *** 64,66 **** } } ! } --- 63,65 ---- } } ! } \ No newline at end of file --- NEW FILE: DefaultSerialiserFactory.cs --- using System.Collections; using Exortech.NetReflector.Util; namespace Exortech.NetReflector { public class DefaultSerialiserFactory : ISerialiserFactory { public IXmlSerialiser Create(ReflectorMember member, ReflectorPropertyAttribute attribute) { if (member.MemberType.IsArray) { return new XmlArraySerialiser(member, attribute); } else if (typeof(ICollection).IsAssignableFrom(member.MemberType)) { return new XmlCollectionSerialiser(member, attribute); } return new XmlMemberSerialiser(member, attribute); } } } Index: XmlArraySerialiser.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/Serialisers/XmlArraySerialiser.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** XmlArraySerialiser.cs 7 Apr 2005 04:30:40 -0000 1.4 --- XmlArraySerialiser.cs 8 Sep 2005 01:07:47 -0000 1.5 *************** *** 1,4 **** using System; - using System.Reflection; using System.Xml; using Exortech.NetReflector.Util; --- 1,3 ---- *************** *** 10,14 **** protected readonly ReflectorTypeConverter converter; ! public XmlArraySerialiser(MemberInfo member, ReflectorPropertyAttribute attribute) : base(member, attribute) { converter = new ReflectorTypeConverter(); --- 9,13 ---- protected readonly ReflectorTypeConverter converter; ! public XmlArraySerialiser(ReflectorMember member, ReflectorPropertyAttribute attribute) : base(member, attribute) { converter = new ReflectorTypeConverter(); --- NEW FILE: ISerialiserFactory.cs --- using System.Reflection; using Exortech.NetReflector.Util; namespace Exortech.NetReflector { public interface ISerialiserFactory { IXmlSerialiser Create(ReflectorMember memberInfo, ReflectorPropertyAttribute attribute); } } Index: XmlMemberSerialiser.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/Serialisers/XmlMemberSerialiser.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** XmlMemberSerialiser.cs 25 Jun 2005 01:40:16 -0000 1.10 --- XmlMemberSerialiser.cs 8 Sep 2005 01:07:47 -0000 1.11 *************** *** 1,4 **** using System; - using System.Reflection; using System.Xml; using Exortech.NetReflector.Util; --- 1,3 ---- *************** *** 12,18 **** private IInstantiator instantiator; ! public XmlMemberSerialiser(MemberInfo member, ReflectorPropertyAttribute attribute) { ! this.member = Util.ReflectorMember.Create(member); this.attribute = attribute; this.instantiator = new DefaultInstantiator(); --- 11,17 ---- private IInstantiator instantiator; ! public XmlMemberSerialiser(ReflectorMember member, ReflectorPropertyAttribute attribute) { ! this.member = member; this.attribute = attribute; this.instantiator = new DefaultInstantiator(); Index: XmlCollectionSerialiser.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/Serialisers/XmlCollectionSerialiser.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** XmlCollectionSerialiser.cs 7 Apr 2005 04:30:40 -0000 1.4 --- XmlCollectionSerialiser.cs 8 Sep 2005 01:07:47 -0000 1.5 *************** *** 1,7 **** - using Exortech.NetReflector.Util; using System; using System.Collections; - using System.Reflection; using System.Xml; namespace Exortech.NetReflector --- 1,6 ---- using System; using System.Collections; using System.Xml; + using Exortech.NetReflector.Util; namespace Exortech.NetReflector *************** *** 11,19 **** private static readonly string elementName = "string"; ! public XmlCollectionSerialiser(MemberInfo member, ReflectorPropertyAttribute attribute) : base(member, attribute) { } protected override void WriteValue(XmlWriter writer, object value) { ! foreach (object element in ((IEnumerable)value)) { if (element == null) continue; --- 10,19 ---- private static readonly string elementName = "string"; ! public XmlCollectionSerialiser(ReflectorMember member, ReflectorPropertyAttribute attribute) : base(member, attribute) ! {} protected override void WriteValue(XmlWriter writer, object value) { ! foreach (object element in ((IEnumerable) value)) { if (element == null) continue; *************** *** 45,47 **** } } ! } --- 45,47 ---- } } ! } \ No newline at end of file Index: XmlTypeSerialiser.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/Serialisers/XmlTypeSerialiser.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** XmlTypeSerialiser.cs 25 Jun 2005 01:40:17 -0000 1.9 --- XmlTypeSerialiser.cs 8 Sep 2005 01:07:47 -0000 1.10 *************** *** 59,63 **** if (attribute != null) { ! serialisers.Add(attribute.CreateSerialiser(member)); } } --- 59,63 ---- if (attribute != null) { ! serialisers.Add(attribute.CreateSerialiser(ReflectorMember.Create(member))); } } |
Update of /cvsroot/netreflector/NetReflector/src/NetReflector/attributes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10450/src/NetReflector/attributes Modified Files: ReflectorArrayAttribute.cs ReflectorCollectionAttribute.cs ReflectorHashAttribute.cs ReflectorPropertyAttribute.cs Log Message: NETREF-5: adding support for customisable serialisation. attributes use DefaultSerialiserFactory by default -- however clients can override for more control over serialisation process. Index: ReflectorArrayAttribute.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/attributes/ReflectorArrayAttribute.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ReflectorArrayAttribute.cs 15 Nov 2004 05:13:03 -0000 1.4 --- ReflectorArrayAttribute.cs 8 Sep 2005 01:07:47 -0000 1.5 *************** *** 1,4 **** using System; - using System.Reflection; namespace Exortech.NetReflector --- 1,3 ---- *************** *** 8,18 **** { public ReflectorArrayAttribute(string name) : base(name) ! { ! } ! ! public override IXmlSerialiser CreateSerialiser(MemberInfo member) ! { ! return new XmlArraySerialiser(member, this); ! } } ! } --- 7,11 ---- { public ReflectorArrayAttribute(string name) : base(name) ! {} } ! } \ No newline at end of file Index: ReflectorHashAttribute.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/attributes/ReflectorHashAttribute.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ReflectorHashAttribute.cs 15 Nov 2004 05:13:03 -0000 1.5 --- ReflectorHashAttribute.cs 8 Sep 2005 01:07:47 -0000 1.6 *************** *** 1,4 **** using System; ! using System.Reflection; namespace Exortech.NetReflector --- 1,4 ---- using System; ! using Exortech.NetReflector.Util; namespace Exortech.NetReflector *************** *** 10,15 **** public ReflectorHashAttribute(string name) : base(name) ! { ! } public ReflectorHashAttribute(string name, string key) : this(name) --- 10,14 ---- public ReflectorHashAttribute(string name) : base(name) ! {} public ReflectorHashAttribute(string name, string key) : this(name) *************** *** 24,31 **** } ! public override IXmlSerialiser CreateSerialiser(MemberInfo member) { return new XmlDictionarySerialiser(member, this); } } ! } --- 23,30 ---- } ! public override IXmlSerialiser CreateSerialiser(ReflectorMember member) { return new XmlDictionarySerialiser(member, this); } } ! } \ No newline at end of file Index: ReflectorPropertyAttribute.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/attributes/ReflectorPropertyAttribute.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ReflectorPropertyAttribute.cs 7 Apr 2005 04:30:40 -0000 1.6 --- ReflectorPropertyAttribute.cs 8 Sep 2005 01:07:47 -0000 1.7 *************** *** 1,4 **** --- 1,5 ---- using System; using System.Reflection; + using Exortech.NetReflector.Util; namespace Exortech.NetReflector *************** *** 12,15 **** --- 13,17 ---- private Type instanceType; private string instanceTypeKey; + private ISerialiserFactory factory = new DefaultSerialiserFactory(); public ReflectorPropertyAttribute(string name) *************** *** 48,54 **** } ! public virtual IXmlSerialiser CreateSerialiser(MemberInfo member) { ! return new XmlMemberSerialiser(member, this); } --- 50,56 ---- } ! public virtual IXmlSerialiser CreateSerialiser(ReflectorMember member) { ! return factory.Create(member, this); } *************** *** 58,61 **** --- 60,68 ---- return (attributes.Length == 0) ? null : (ReflectorPropertyAttribute)attributes[0]; } + + public ISerialiserFactory SerialiserFactory + { + set { factory = value; } + } } } \ No newline at end of file Index: ReflectorCollectionAttribute.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/attributes/ReflectorCollectionAttribute.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ReflectorCollectionAttribute.cs 15 Nov 2004 05:13:03 -0000 1.5 --- ReflectorCollectionAttribute.cs 8 Sep 2005 01:07:47 -0000 1.6 *************** *** 1,4 **** using System; - using System.Reflection; namespace Exortech.NetReflector --- 1,3 ---- *************** *** 8,18 **** { public ReflectorCollectionAttribute(string name) : base(name) ! { ! } ! ! public override IXmlSerialiser CreateSerialiser(MemberInfo member) ! { ! return new XmlCollectionSerialiser(member, this); ! } } ! } --- 7,11 ---- { public ReflectorCollectionAttribute(string name) : base(name) ! {} } ! } \ No newline at end of file |
From: Owen R. <exo...@us...> - 2005-09-08 01:07:56
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10450/src/NetReflector.Test/resources Modified Files: TestInstantiator.cs Log Message: NETREF-5: adding support for customisable serialisation. attributes use DefaultSerialiserFactory by default -- however clients can override for more control over serialisation process. Index: TestInstantiator.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/resources/TestInstantiator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestInstantiator.cs 7 Mar 2005 05:46:07 -0000 1.1 --- TestInstantiator.cs 8 Sep 2005 01:07:47 -0000 1.2 *************** *** 2,6 **** using Exortech.NetReflector.Util; ! namespace Exortech.NetReflector.Test.resources { public class TestInstantiator : IInstantiator --- 2,6 ---- using Exortech.NetReflector.Util; ! namespace Exortech.NetReflector.Test.Resources { public class TestInstantiator : IInstantiator *************** *** 20,22 **** } } ! } --- 20,22 ---- } } ! } \ No newline at end of file |
From: Owen R. <exo...@us...> - 2005-09-08 01:07:56
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10450/src/NetReflector.Test Modified Files: NetReflectorTest.csproj NetReflectorTypeTableTest.cs Log Message: NETREF-5: adding support for customisable serialisation. attributes use DefaultSerialiserFactory by default -- however clients can override for more control over serialisation process. Index: NetReflectorTest.csproj =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/NetReflectorTest.csproj,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** NetReflectorTest.csproj 7 Apr 2005 04:30:37 -0000 1.14 --- NetReflectorTest.csproj 8 Sep 2005 01:07:47 -0000 1.15 *************** *** 96,99 **** --- 96,104 ---- HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" /> + <Reference + Name = "nmock" + AssemblyName = "nmock" + HintPath = "..\..\lib\nmock.dll" + /> </References> </Build> *************** *** 121,124 **** --- 126,134 ---- /> <File + RelPath = "Attributes\ReflectorPropertyTest.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Generators\XmlDocumentationGeneratorTest.cs" SubType = "Code" *************** *** 191,194 **** --- 201,209 ---- /> <File + RelPath = "Serialisers\DefaultSerialiserFactoryTest.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Serialisers\XmlArraySerialiserTest.cs" SubType = "Code" Index: NetReflectorTypeTableTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/NetReflectorTypeTableTest.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** NetReflectorTypeTableTest.cs 7 Apr 2005 04:30:37 -0000 1.6 --- NetReflectorTypeTableTest.cs 8 Sep 2005 01:07:47 -0000 1.7 *************** *** 3,7 **** using System.Reflection; using System.Reflection.Emit; ! using Exortech.NetReflector.Test.resources; using NUnit.Framework; --- 3,7 ---- using System.Reflection; using System.Reflection.Emit; ! using Exortech.NetReflector.Test.Resources; using NUnit.Framework; |
From: Owen R. <exo...@us...> - 2005-09-08 01:07:56
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Attributes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10450/src/NetReflector.Test/Attributes Added Files: ReflectorPropertyTest.cs Log Message: NETREF-5: adding support for customisable serialisation. attributes use DefaultSerialiserFactory by default -- however clients can override for more control over serialisation process. --- NEW FILE: ReflectorPropertyTest.cs --- using Exortech.NetReflector.Util; using NMock; using NMock.Constraints; using NUnit.Framework; namespace Exortech.NetReflector.Test.Attributes { [TestFixture] public class ReflectorPropertyTest { private ReflectorPropertyAttribute attribute; private ReflectorMember member; [SetUp] protected void SetUp() { attribute = new ReflectorPropertyAttribute("foo"); member = ReflectorMember.Create(typeof (TestClass).GetProperty("Name")); } [Test] public void ShouldUseCustomSerialiserFactory() { IMock mockSerialiser = new DynamicMock(typeof (IXmlMemberSerialiser)); IMock mockFactory = new DynamicMock(typeof (ISerialiserFactory)); mockFactory.ExpectAndReturn("Create", mockSerialiser.MockInstance, new IsTypeOf(typeof (ReflectorMember)), attribute); attribute.SerialiserFactory = (ISerialiserFactory) mockFactory.MockInstance; attribute.CreateSerialiser(member); mockFactory.Verify(); } [Test] public void ShouldUseDefaultSerialiserFactory() { ReflectorPropertyAttribute attribute = new ReflectorPropertyAttribute("foo"); IXmlSerialiser serialiser = attribute.CreateSerialiser(member); Assert.IsNotNull(serialiser); } } } |
From: Owen R. <exo...@us...> - 2005-09-08 01:07:55
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10450/src/NetReflector Modified Files: NetReflector.csproj Log Message: NETREF-5: adding support for customisable serialisation. attributes use DefaultSerialiserFactory by default -- however clients can override for more control over serialisation process. Index: NetReflector.csproj =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/NetReflector.csproj,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** NetReflector.csproj 15 Apr 2005 04:45:09 -0000 1.9 --- NetReflector.csproj 8 Sep 2005 01:07:47 -0000 1.10 *************** *** 155,158 **** --- 155,168 ---- /> <File + RelPath = "Serialisers\DefaultSerialiserFactory.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Serialisers\ISerialiserFactory.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Serialisers\IXmlMemberSerialiser.cs" SubType = "Code" |
From: Owen R. <exo...@us...> - 2005-09-08 01:07:55
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Generators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10450/src/NetReflector.Test/Generators Modified Files: XmlDocumentationGeneratorTest.cs Log Message: NETREF-5: adding support for customisable serialisation. attributes use DefaultSerialiserFactory by default -- however clients can override for more control over serialisation process. Index: XmlDocumentationGeneratorTest.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Generators/XmlDocumentationGeneratorTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** XmlDocumentationGeneratorTest.cs 15 Nov 2004 05:58:58 -0000 1.1 --- XmlDocumentationGeneratorTest.cs 8 Sep 2005 01:07:47 -0000 1.2 *************** *** 3,6 **** --- 3,7 ---- using System.Xml; using Exortech.NetReflector.Generators; + using Exortech.NetReflector.Util; using NUnit.Framework; *************** *** 55,59 **** { MemberInfo member = typeof (TestClass).GetMember(name)[0]; ! return (IXmlMemberSerialiser) ReflectorPropertyAttribute.GetAttribute(member).CreateSerialiser(member); } --- 56,60 ---- { MemberInfo member = typeof (TestClass).GetMember(name)[0]; ! return (IXmlMemberSerialiser) ReflectorPropertyAttribute.GetAttribute(member).CreateSerialiser(ReflectorMember.Create(member)); } |
From: Owen R. <exo...@us...> - 2005-09-08 01:07:55
|
Update of /cvsroot/netreflector/NetReflector In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10450 Modified Files: reflector.build Log Message: NETREF-5: adding support for customisable serialisation. attributes use DefaultSerialiserFactory by default -- however clients can override for more control over serialisation process. Index: reflector.build =================================================================== RCS file: /cvsroot/netreflector/NetReflector/reflector.build,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** reflector.build 15 Aug 2005 11:45:35 -0000 1.12 --- reflector.build 8 Sep 2005 01:07:46 -0000 1.13 *************** *** 83,86 **** --- 83,87 ---- <include name="${build.dir}\${core.dll}"/> <include name="${lib.dir}\nunit.framework.dll"/> + <include name="${lib.dir}\nmock.dll"/> </references> <!-- don't warn about uncommented public methods --> *************** *** 88,91 **** --- 89,93 ---- </csc> <copy file="${lib.dir}\nunit.framework.dll" todir="${build.dir}"/> + <copy file="${lib.dir}\nmock.dll" todir="${build.dir}"/> </target> |
From: Owen R. <exo...@us...> - 2005-09-08 00:12:32
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Attributes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30995/Attributes Log Message: Directory /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Attributes added to the repository |
From: Mike R. <mik...@us...> - 2005-08-15 11:45:47
|
Update of /cvsroot/netreflector/NetReflector In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5159 Modified Files: reflector.build Log Message: updates for CCNetLive server update Index: reflector.build =================================================================== RCS file: /cvsroot/netreflector/NetReflector/reflector.build,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** reflector.build 7 Jul 2005 04:34:45 -0000 1.11 --- reflector.build 15 Aug 2005 11:45:35 -0000 1.12 *************** *** 152,157 **** <!-- FOR RUNNING CCNET AGAINST ITSELF --> <target name="ContinuousIntegration"> ! <if test="${not property::exists('ccnet.label')}"> ! <fail message="ccnet.label property not set, so can't create labelled distribution files" /> </if> --- 152,157 ---- <!-- FOR RUNNING CCNET AGAINST ITSELF --> <target name="ContinuousIntegration"> ! <if test="${not property::exists('CCNetLabel')}"> ! <fail message="CCNetLabel property not set, so can't create labelled distribution files" /> </if> *************** *** 161,169 **** <call target="dist.publish" /> <call target="reporting" /> ! <echo message="CI Run for build number ${ccnet.label} successfully completed" /> </target> <target name="transform.build.number" > ! <property name="build.number" value="1.0.0.${ccnet.label}" /> <echo message="Build number: ${build.number}"/> </target> --- 161,169 ---- <call target="dist.publish" /> <call target="reporting" /> ! <echo message="CI Run for build number ${CCNetLabel} successfully completed" /> </target> <target name="transform.build.number" > ! <property name="build.number" value="1.0.0.${CCNetLabel}" /> <echo message="Build number: ${build.number}"/> </target> |
From: Owen R. <exo...@us...> - 2005-07-07 04:34:57
|
Update of /cvsroot/netreflector/NetReflector In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28127 Modified Files: reflector.build Log Message: fixing build file warning Index: reflector.build =================================================================== RCS file: /cvsroot/netreflector/NetReflector/reflector.build,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** reflector.build 7 Jul 2005 04:20:20 -0000 1.10 --- reflector.build 7 Jul 2005 04:34:45 -0000 1.11 *************** *** 173,177 **** <asminfo output="src/NetReflector/VersionAssemblyInfo.cs" language="CSharp"> <imports> ! <import name="System.Reflection" /> </imports> <attributes> --- 173,177 ---- <asminfo output="src/NetReflector/VersionAssemblyInfo.cs" language="CSharp"> <imports> ! <import namespace="System.Reflection" /> </imports> <attributes> |