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; } } |