www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - about attribute... (trying to implement a "DataContractSerializer" functionality)

reply "Lloyd Dupont" <ld-REMOVE galador.net> writes:
From the book I was under the impression that there could be user defined 
attribute.
I wonder if this has been implemented?

My problem: I try to implement a simplistic "DataContractSerializer" (as in
http://msdn.microsoft.com/en-us/library/SYSTEM.RUNTIME.SERIALIZATION.DATACONTRACTSERIALIZER(v=vs.100,d=lightweight).aspx
)
Which, basically, use reflection / introspection to save on a permanent 
format whatever properties / fields has been marked as being important. I.e. 
attribute driven serialization if I might say...

Is there such a thing?
Any tip on how to go on implementing something.. similar? 
Jun 12 2011
parent jdrewsen <jdrewsen nospam.com> writes:
Den 12-06-2011 15:43, Lloyd Dupont skrev:
  From the book I was under the impression that there could be user
 defined attribute.
 I wonder if this has been implemented?

 My problem: I try to implement a simplistic "DataContractSerializer" (as in
 http://msdn.microsoft.com/en-us/library/SYSTEM.RUNTIME.SERIALIZATION.DATACONTRACTSERIALIZER(v=vs.100,d=lightweight).aspx

 )
 Which, basically, use reflection / introspection to save on a permanent
 format whatever properties / fields has been marked as being important.
 I.e. attribute driven serialization if I might say...

 Is there such a thing?
 Any tip on how to go on implementing something.. similar?
User defined attributes are currently not supported and I do not think there is any sign that they will appear in D any time soon. /Jonas
Jun 12 2011