Class TypedEntityWrapper
Version: 4.0
Wrapper for property access to simplify usage via IL code.
Inheritance
object
TypedEntityWrapper
Namespace: StylelabsStylelabs.MSdkUtilities
Assembly: Stylelabs.M.Sdk.dll
Syntax
RequestResponse
public class TypedEntityWrapper
Constructors
TypedEntityWrapper(IEntity)
Initializes a new instance of the TypedEntityWrapper class.
Declaration
RequestResponse
public TypedEntityWrapper(IEntity entity)
Parameters
Type | Name | Description |
---|---|---|
IEntity | entity |
The entity. |
Methods
GetPropertyValue<T>(string, CultureInfo)
Gets the value of the specified property.
Declaration
RequestResponse
public T GetPropertyValue<T>(string propertyName, CultureInfo cultureInfo = null)
Parameters
Type | Name | Description |
---|---|---|
string | propertyName |
The name of the property. |
CultureInfo | cultureInfo |
The culture info. |
Returns
Type | Description |
---|---|
T |
The value. |
Type Parameters
Name | Description |
---|---|
T |
The type. |
GetRelation<TRelation>(string)
Gets the specified relation.
Declaration
RequestResponse
public TRelation GetRelation<TRelation>(string relationName) where TRelation : class, IRelation
Parameters
Type | Name | Description |
---|---|---|
string | relationName |
The name of the relation. |
Returns
Type | Description |
---|---|
TRelation |
The relation. |
Type Parameters
Name | Description |
---|---|
TRelation |
The type of the relation. |
SetPropertyValue(string, object, CultureInfo)
Sets the value of the specified property.
Declaration
RequestResponse
public void SetPropertyValue(string propertyName, object value, CultureInfo cultureInfo = null)
Parameters
Type | Name | Description |
---|---|---|
string | propertyName |
The name of the property. |
object | value |
The value. |
CultureInfo | cultureInfo |
The culture info. |