Class TypedEntityWrapper

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
TypeNameDescription
IEntityentity

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
TypeNameDescription
stringpropertyName

The name of the property.

CultureInfocultureInfo

The culture info.

Returns
TypeDescription
T

The value.

Type Parameters
NameDescription
T

The type.

GetRelation<TRelation>(string)

Gets the specified relation.

Declaration
RequestResponse

public TRelation GetRelation<TRelation>(string relationName) where TRelation : class, IRelation
Parameters
TypeNameDescription
stringrelationName

The name of the relation.

Returns
TypeDescription
TRelation

The relation.

Type Parameters
NameDescription
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
TypeNameDescription
stringpropertyName

The name of the property.

objectvalue

The value.

CultureInfocultureInfo

The culture info.

Do you have some feedback for us?

If you have suggestions for improving this article,