Class EntityPropertyConverter
- Namespace
- Microsoft.WindowsAzure.Storage.Table
- Assembly
- Microsoft.WindowsAzure.Storage.dll
EntityPropertyConverter class.
public static class EntityPropertyConverter
- Inheritance
-
EntityPropertyConverter
- Inherited Members
Fields
DefaultPropertyNameDelimiter
The property delimiter.
public const string DefaultPropertyNameDelimiter = "_"
Field Value
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.
public static T ConvertBack<T>(IDictionary<string, EntityProperty> flattenedEntityProperties, OperationContext operationContext)
Parameters
flattenedEntityProperties
IDictionary<string, EntityProperty>The flattened entity property dictionary.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- T
The result containing the reconstructed object with its full object hierarchy.
Type Parameters
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.
public static T ConvertBack<T>(IDictionary<string, EntityProperty> flattenedEntityProperties, EntityPropertyConverterOptions entityPropertyConverterOptions, OperationContext operationContext)
Parameters
flattenedEntityProperties
IDictionary<string, EntityProperty>The flattened entity property dictionary.
entityPropertyConverterOptions
EntityPropertyConverterOptionsA EntityPropertyConverterOptions object that specifies options for the entity property conversion.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- T
The result containing the reconstructed object with its full object hierarchy.
Type Parameters
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.
public static Dictionary<string, EntityProperty> Flatten(object root, OperationContext operationContext)
Parameters
root
objectThe object to flatten and convert.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- Dictionary<string, EntityProperty>
The result containing IDictionary<TKey, TValue> of 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.
public static Dictionary<string, EntityProperty> Flatten(object root, EntityPropertyConverterOptions entityPropertyConverterOptions, OperationContext operationContext)
Parameters
root
objectThe object to flatten and convert.
entityPropertyConverterOptions
EntityPropertyConverterOptionsA EntityPropertyConverterOptions object that specifies options for the entity property conversion.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- Dictionary<string, EntityProperty>
The result containing IDictionary<TKey, TValue> of EntityProperty objects for all properties of the flattened root object.