C
ChrisAdams
Hi Guys,
I'm trying to write a server control that exposes as one of it's properties
an object.
I've created a TypeConvertor that converts from a string representation to
an instance of my object, and have also implemented the converstion from the
object to an InstanceDescriptor.
When I create the InstanceDescriptor, I am passing in the parameters for the
default no argument constructor of my object, and the third parameter to
specify that the object can not be fully created from the InstanceDescriptor
- which should force the serializer to output code for the properties of my
object as well....
return new InstanceDescriptor( XmlDocType.GetConstructor(
System.Type.EmptyTypes ), null, false);
However the code that is generated for the asp.net does not have any code
for setting the propertiess of my object.
I know I could just create a constructor that takes in the values, and
return the relevant InstanceDescriptor, but I would like to get it working
the other way first. Does anyone know if this is possible, and where I could
be gonig wrong?
Also I've looked at implementing my own CodeDomSerializer for my object, but
cannot get the asp.net to actually call my implementation - again if any
knows where I am going wrong with this, would be helpful to hear from you.
Thanks.
Chris.
I'm trying to write a server control that exposes as one of it's properties
an object.
I've created a TypeConvertor that converts from a string representation to
an instance of my object, and have also implemented the converstion from the
object to an InstanceDescriptor.
When I create the InstanceDescriptor, I am passing in the parameters for the
default no argument constructor of my object, and the third parameter to
specify that the object can not be fully created from the InstanceDescriptor
- which should force the serializer to output code for the properties of my
object as well....
return new InstanceDescriptor( XmlDocType.GetConstructor(
System.Type.EmptyTypes ), null, false);
However the code that is generated for the asp.net does not have any code
for setting the propertiess of my object.
I know I could just create a constructor that takes in the values, and
return the relevant InstanceDescriptor, but I would like to get it working
the other way first. Does anyone know if this is possible, and where I could
be gonig wrong?
Also I've looked at implementing my own CodeDomSerializer for my object, but
cannot get the asp.net to actually call my implementation - again if any
knows where I am going wrong with this, would be helpful to hear from you.
Thanks.
Chris.