JsonExSerializer.TypeConversion.ConverterUtil Class Reference

Helper class for custom type conversion. Will populate an object from a dictionary or copy its properties to a dictionary. More...

List of all members.

Public Member Functions

 ConverterUtil (Type forType, SerializationContext context)
void PopulateFromDictionary (object instance, IDictionary values, bool ignoreMissingProperties)
 Populates the properties of an object from a map.
void CopyToDictionary (object instance, IDictionary values)
 Copies an object's properties to a dictionary.


Detailed Description

Helper class for custom type conversion. Will populate an object from a dictionary or copy its properties to a dictionary.


Constructor & Destructor Documentation

JsonExSerializer.TypeConversion.ConverterUtil.ConverterUtil ( Type  forType,
SerializationContext  context 
)


Member Function Documentation

void JsonExSerializer.TypeConversion.ConverterUtil.PopulateFromDictionary ( object  instance,
IDictionary  values,
bool  ignoreMissingProperties 
)

Populates the properties of an object from a map.

Parameters:
instance the object to populate, the type must match the one that this instance was created for
values a dictionary of values
ignoreMissingProperties true to ignore any keys in the dictionary that are not properties on the object. If false, an exception will be thrown if a property cannot be found.

void JsonExSerializer.TypeConversion.ConverterUtil.CopyToDictionary ( object  instance,
IDictionary  values 
)

Copies an object's properties to a dictionary.

Parameters:
instance the object to copy
values the dictionary to copy to, cannot be null


Generated on Fri Feb 15 23:33:59 2008 for JsonExSerializer by  doxygen 1.5.2