1. ICultureSensitiveProperty

Interface ICultureSensitiveProperty

Version:
日本語翻訳に関する免責事項

このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。

Represents a property where values are mapped to specific cultures.

Namespace: Stylelabs.M.Sdk.Contracts.Base
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<CultureInfo>

The cultures (never null)

GetValue(CultureInfo)

Gets the value for a specific culture.

Declaration
object GetValue(CultureInfo culture)
Parameters
TypeNameDescription
CultureInfoculture

Culture of the value.

Returns
TypeDescription
System.Object

The value or null if it has no value for this culture.

GetValue<T>(CultureInfo)

Gets the value for a specific culture.

Declaration
T GetValue<T>(CultureInfo culture)
Parameters
TypeNameDescription
CultureInfoculture

Culture of the value.

Returns
TypeDescription
T

The value or null if it has no value for this culture.

Type Parameters
NameDescription
T

Type of the value (preferable nullable).

GetValues()

Gets all values per culture in a non generic way.

Declaration
IDictionary<CultureInfo, object> GetValues()
Returns
TypeDescription
IDictionary<CultureInfo, System.Object>

Property values.

Remarks

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

GetValues<T>()

Gets all values per culture.

Declaration
IDictionary<CultureInfo, T> GetValues<T>()
Returns
TypeDescription
IDictionary<CultureInfo, T>

All property values.

Type Parameters
NameDescription
T

Type of the value (preferable nullable).

Remarks

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

GetValues<T>(IEnumerable<CultureInfo>)

Gets all values in the requested cultures.

Declaration
IDictionary<CultureInfo, T> GetValues<T>(IEnumerable<CultureInfo> cultures)
Parameters
TypeNameDescription
IEnumerable<CultureInfo>cultures

Cultures to include.

Returns
TypeDescription
IDictionary<CultureInfo, T>

All property values in the requested cultures

Type Parameters
NameDescription
T

Type of the value (preferable nullable).

SetValue(CultureInfo, Object)

Sets a value for a specific culture.

Declaration
void SetValue(CultureInfo culture, object value)
Parameters
TypeNameDescription
CultureInfoculture

Culture of the value

System.Objectvalue

Value

この記事を改善するための提案がある場合は、 お知らせください!