Click or drag to resize

DictionaryExtension Class

Provides extension methods for dictionaries.
Inheritance Hierarchy
SystemObject
  TB.ComponentModelDictionaryExtension

Namespace:  TB.ComponentModel
Assembly:  UniversalTypeConverter (in UniversalTypeConverter.dll) Version: 2.0.0
Syntax
C#
public static class DictionaryExtension
Methods
  NameDescription
Public methodStatic memberCreate(IDictionaryString, Object, Type, CultureInfo)
Creates a new instance of the given type by mapping the key value pairs of the given dictionary to constructor parameters, public properties and public fields of the given type. The default converter is used for conversion if needed. Throws an InstantiationException if creation failed. For success, at least on key value pair must be used as a constructor parameter, public property or public field. If the dictionary contains only one key value pair, its value is returned if it is exactly of the demanded type.
Public methodStatic memberCreateT(IDictionaryString, Object, CultureInfo)
Creates a new instance of the given type by mapping the key value pairs of the given dictionary to constructor parameters, public properties and public fields of the given type. The default converter is used for conversion if needed. Throws an InstantiationException if creation failed. For success, at least on key value pair must be used as a constructor parameter, public property or public field. If the dictionary contains only one key value pair, its value is returned if it is exactly of the demanded type.
Public methodStatic memberTryCreate(IDictionaryString, Object, Type, Object, CultureInfo)
Creates a new instance of the given type by mapping the key value pairs of the dictionary to constructor parameters, public properties and public fields of the given type. The default converter is used for conversion if needed. Returns true if creation succeeded. For success, at least on key value pair must be used as a constructor parameter, public property or public field. If the dictionary contains only one key value pair, its value is returned if it is exactly of the demanded type.
Public methodStatic memberTryCreateT(IDictionaryString, Object, T, CultureInfo)
Creates a new instance of the given type by mapping the key value pairs of the dictionary to constructor parameters, public properties and public fields of the given type. The default converter is used for conversion if needed. Returns true if creation succeeded. For success, at least on key value pair must be used as a constructor parameter, public property or public field. If the dictionary contains only one key value pair, its value is returned if it is exactly of the demanded type.
Top
See Also