Class EntityPropertyConverter
EntityPropertyConverter class.
Inheritance
Inherited Members
Namespace: Microsoft.WindowsAzure.Storage.Table
Assembly: Cqrs.Azure.Storage.dll
Syntax
public static class EntityPropertyConverter
Fields
DefaultPropertyNameDelimiter
The property delimiter.
Declaration
public const string DefaultPropertyNameDelimiter = "_"
Field Value
Type | Description |
---|---|
System.String |
Properties
DefaultSettings
The default Newtonsoft.Json.JsonSerializerSettings to use.
Declaration
public static JsonSerializerSettings DefaultSettings { get; }
Property Value
Type | Description |
---|---|
Newtonsoft.Json.JsonSerializerSettings |
Methods
ConvertBack<T>(IDictionary<String, EntityProperty>, OperationContext)
Reconstructs the complete object graph of type T using the flattened entity property dictionary and returns reconstructed object. The property dictionary may contain only basic properties, only nested properties or a mix of both types.
Declaration
public static T ConvertBack<T>(IDictionary<string, EntityProperty> flattenedEntityProperties, OperationContext operationContext)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, Microsoft.WindowsAzure.Storage.Table.EntityProperty> | flattenedEntityProperties | The flattened entity property dictionary. |
Microsoft.WindowsAzure.Storage.OperationContext | operationContext | An Microsoft.WindowsAzure.Storage.OperationContext object that represents the context for the current operation. |
Returns
Type | Description |
---|---|
T | The result containing the reconstructed object with its full object hierarchy. |
Type Parameters
Name | Description |
---|---|
T | The type of the object to populate |
ConvertBack<T>(IDictionary<String, EntityProperty>, EntityPropertyConverterOptions, OperationContext)
Reconstructs the complete object graph of type T using the flattened entity property dictionary and returns reconstructed object. The property dictionary may contain only basic properties, only nested properties or a mix of both types.
Declaration
public static T ConvertBack<T>(IDictionary<string, EntityProperty> flattenedEntityProperties, EntityPropertyConverterOptions entityPropertyConverterOptions, OperationContext operationContext)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, Microsoft.WindowsAzure.Storage.Table.EntityProperty> | flattenedEntityProperties | The flattened entity property dictionary. |
Microsoft.WindowsAzure.Storage.Table.EntityPropertyConverterOptions | entityPropertyConverterOptions | A Microsoft.WindowsAzure.Storage.Table.EntityPropertyConverterOptions object that specifies options for the entity property conversion. |
Microsoft.WindowsAzure.Storage.OperationContext | operationContext | An Microsoft.WindowsAzure.Storage.OperationContext object that represents the context for the current operation. |
Returns
Type | Description |
---|---|
T | The result containing the reconstructed object with its full object hierarchy. |
Type Parameters
Name | Description |
---|---|
T | The type of the object to populate |
Flatten(Object, OperationContext)
Traverses object graph, flattens and converts all nested (and not nested) properties to EntityProperties, stores them in the property dictionary. The keys are constructed by appending the names of the properties visited during pre-order depth first traversal from root to each end node property delimited by '_'. Allows complex objects to be stored in persistent storage systems or passed between web services in a generic way.
Declaration
public static Dictionary<string, EntityProperty> Flatten(object root, OperationContext operationContext)
Parameters
Type | Name | Description |
---|---|---|
System.Object | root | The object to flatten and convert. |
Microsoft.WindowsAzure.Storage.OperationContext | operationContext | An Microsoft.WindowsAzure.Storage.OperationContext object that represents the context for the current operation. |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, Microsoft.WindowsAzure.Storage.Table.EntityProperty> | The result containing System.Collections.Generic.IDictionary<TKey, TValue> of Microsoft.WindowsAzure.Storage.Table.EntityProperty objects for all properties of the flattened root object. |
Flatten(Object, EntityPropertyConverterOptions, OperationContext)
Traverses object graph, flattens and converts all nested (and not nested) properties to EntityProperties, stores them in the property dictionary. The keys are constructed by appending the names of the properties visited during pre-order depth first traversal from root to each end node property delimited by '_'. Allows complex objects to be stored in persistent storage systems or passed between web services in a generic way.
Declaration
public static Dictionary<string, EntityProperty> Flatten(object root, EntityPropertyConverterOptions entityPropertyConverterOptions, OperationContext operationContext)
Parameters
Type | Name | Description |
---|---|---|
System.Object | root | The object to flatten and convert. |
Microsoft.WindowsAzure.Storage.Table.EntityPropertyConverterOptions | entityPropertyConverterOptions | A Microsoft.WindowsAzure.Storage.Table.EntityPropertyConverterOptions object that specifies options for the entity property conversion. |
Microsoft.WindowsAzure.Storage.OperationContext | operationContext | An Microsoft.WindowsAzure.Storage.OperationContext object that represents the context for the current operation. |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, Microsoft.WindowsAzure.Storage.Table.EntityProperty> | The result containing System.Collections.Generic.IDictionary<TKey, TValue> of Microsoft.WindowsAzure.Storage.Table.EntityProperty objects for all properties of the flattened root object. |