Object source
Last updated
Was this helpful?
Last updated
Was this helpful?
Location: main sources module.
ObjectSource converts an arbitrary object (including anonymous types) to a settings node:
Conversion process obeys the following priority list:
Objects with overridden ToString
are converted to value nodes;
Dictionaries with primitive key types are converted to object nodes;
Conversion is performed recursively for keys and values;
Objects that implement IEnumerable
are converted to array nodes;
Conversion is performed recursively for sequence elements;
Everything else is converted to object nodes;
Conversion is performed recursively for public instance fields and properties;
Like constant sources, object source does not produce any updates by itself; conversion exceptions are exposed via (null, error)
notifications.