Class JsonDictionaryContract
Contract details for a System.Type used by the JsonSerializer.
Inherited Members
Namespace: Bayat.Json.Serialization
Assembly: Bayat.Json.Runtime.dll
Syntax
public class JsonDictionaryContract : JsonContainerContract
Constructors
| Improve this Doc View SourceJsonDictionaryContract(Type)
Initializes a new instance of the JsonDictionaryContract class.
Declaration
public JsonDictionaryContract(Type underlyingType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | underlyingType | The underlying type for the contract. |
Properties
| Improve this Doc View SourceDictionaryKeyResolver
Gets or sets the dictionary key resolver.
Declaration
public Func<string, string> DictionaryKeyResolver { get; set; }
Property Value
Type | Description |
---|---|
System.Func<System.String, System.String> | The dictionary key resolver. |
DictionaryKeyType
Gets the System.Type of the dictionary keys.
Declaration
public Type DictionaryKeyType { get; }
Property Value
Type | Description |
---|---|
System.Type | The System.Type of the dictionary keys. |
DictionaryValueType
Gets the System.Type of the dictionary values.
Declaration
public Type DictionaryValueType { get; }
Property Value
Type | Description |
---|---|
System.Type | The System.Type of the dictionary values. |
HasParameterizedCreator
Gets a value indicating whether the creator has a parameter with the dictionary values.
Declaration
public bool HasParameterizedCreator { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
HasParameterizedCreatorInternal
Declaration
public bool HasParameterizedCreatorInternal { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
KeyContract
Declaration
public JsonContract KeyContract { get; set; }
Property Value
Type | Description |
---|---|
JsonContract |
OverrideCreator
Gets or sets the function used to create the object. When set this function will override DefaultCreator.
Declaration
public ObjectConstructor<object> OverrideCreator { get; set; }
Property Value
Type | Description |
---|---|
ObjectConstructor<System.Object> | The function used to create the object. |
ParameterizedCreator
Declaration
public ObjectConstructor<object> ParameterizedCreator { get; }
Property Value
Type | Description |
---|---|
ObjectConstructor<System.Object> |
PropertyNameResolver
Gets or sets the property name resolver.
Declaration
[Obsolete("PropertyNameResolver is obsolete. Use DictionaryKeyResolver instead.")]
public Func<string, string> PropertyNameResolver { get; set; }
Property Value
Type | Description |
---|---|
System.Func<System.String, System.String> | The property name resolver. |
ShouldCreateWrapper
Declaration
public bool ShouldCreateWrapper { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceCreateTemporaryDictionary()
Declaration
public IDictionary CreateTemporaryDictionary()
Returns
Type | Description |
---|---|
System.Collections.IDictionary |
CreateWrapper(Object)
Declaration
public IWrappedDictionary CreateWrapper(object dictionary)
Parameters
Type | Name | Description |
---|---|---|
System.Object | dictionary |
Returns
Type | Description |
---|---|
IWrappedDictionary |