1. Stylelabs.M.Sdk.Contracts.Base

Interface ICultureSensitiveProperty

Represents a property where values are mapped to specific cultures.

Inherited Members

IProperty.DataType

IProperty.IsMultiLanguage

IMember.Name

IMember.DefinitionType

ICultureSensitiveDirtyTracking.GetDirtyCultures()

IDirtyTracking.IsTracking

IDirtyTracking.IsDirty

IDirtyTracking.StartTracking()

IDirtyTracking.MarkClean()

Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ContractsBase

Assembly: Stylelabs.M.Sdk.dll

Syntax

public interface ICultureSensitiveProperty : IProperty, IMember, ICultureSensitiveDirtyTracking, IDirtyTracking

Remarks

It is not possible to get or set a value in a culture when that culture was not loaded on the IEntity. It is possible to set values in cultures that are not enabled in M, if they are loaded on the IEntity, but they will not be persisted.

Methods

GetCultures()

Gets all cultures that the property supports. These are always equal to the cultures the IEntity was loaded with.

Declaration

IList<CultureInfo> GetCultures()

Returns

TypeDescription
IList<>CultureInfoThe cultures (never null).

GetValue(CultureInfo)

Gets the value for a specific culture.

Declaration

object GetValue(CultureInfo culture)

Parameters

TypeNameDescription
CultureInfocultureCulture of the value.

Returns

TypeDescription
objectThe value or null if it has no value for this culture.

GetValue(CultureInfo)

Gets the value for a specific culture.

Declaration

T GetValue<T>(CultureInfo culture)

Parameters

TypeNameDescription
CultureInfocultureCulture of the value.

Returns

TypeDescription
TThe value or null if it has no value for this culture.

Type Parameters

NameDescription
TType of the value (preferable nullable).

GetValues()

Gets all values per culture in a non generic way.

Declaration

IDictionary<CultureInfo, object> GetValues()

Returns

TypeDescription
IDictionary<, >CultureInfoobjectProperty values.

Remarks

This method only returns the values in the cultures the IEntity was loaded in.

GetValues()

Gets all values per culture.

Declaration

IDictionary<CultureInfo, T> GetValues<T>()

Returns

TypeDescription
IDictionary<, >CultureInfoAll property values.

Type Parameters

NameDescription
TType of the value (preferable nullable).

Remarks

This method only returns the values in the cultures the IEntity was loaded in.

GetValues(IEnumerable)

Gets all values in the requested cultures.

Declaration

IDictionary<CultureInfo, T> GetValues<T>(IEnumerable<CultureInfo> cultures)

Parameters

TypeNameDescription
IEnumerable<>CultureInfoculturesCultures to include.

Returns

TypeDescription
IDictionary<, >CultureInfoAll property values in the requested cultures.

Type Parameters

NameDescription
TType of the value (preferable nullable).

SetValue(CultureInfo, object)

Sets a value for a specific culture.

Declaration

void SetValue(CultureInfo culture, object value)

Parameters

TypeNameDescription
CultureInfocultureCulture of the value.
objectvalueValue.
If you have suggestions for improving this article, let us know!