1. Stylelabs.M.Sdk.Utilities

Class TypedEntityWrapper

Wrapper for property access to simplify usage via IL code.

Inheritance

object

TypedEntityWrapper

Namespace: StylelabsStylelabs.MSdkUtilities

Assembly: Stylelabs.M.Sdk.dll

Syntax

public class TypedEntityWrapper

Constructors

TypedEntityWrapper(IEntity)

Initializes a new instance of the TypedEntityWrapper class.

Declaration

public TypedEntityWrapper(IEntity entity)

Parameters

TypeNameDescription
IEntityentityThe entity.

Methods

GetPropertyValue(string, CultureInfo)

Gets the value of the specified property.

Declaration

public T GetPropertyValue<T>(string propertyName, CultureInfo cultureInfo = null)

Parameters

TypeNameDescription
stringpropertyNameThe name of the property.
CultureInfocultureInfoThe culture info.

Returns

TypeDescription
TThe value.

Type Parameters

NameDescription
TThe type.

GetRelation(string)

Gets the specified relation.

Declaration

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

Parameters

TypeNameDescription
stringrelationNameThe name of the relation.

Returns

TypeDescription
TRelationThe relation.

Type Parameters

NameDescription
TRelationThe type of the relation.

SetPropertyValue(string, object, CultureInfo)

Sets the value of the specified property.

Declaration

public void SetPropertyValue(string propertyName, object value, CultureInfo cultureInfo = null)

Parameters

TypeNameDescription
stringpropertyNameThe name of the property.
objectvalueThe value.
CultureInfocultureInfoThe culture info.
If you have suggestions for improving this article, let us know!