1. CultureSensitiveProperty

Class CultureSensitiveProperty

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

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

A culture sensitive property.

Inheritance
System.Object
CultureSensitiveProperty
Namespace: Stylelabs.M.Sdk.Models.Base
Assembly: Stylelabs.M.Sdk.dll
Syntax
public class CultureSensitiveProperty : PropertyBase, ICultureSensitiveProperty, IProperty, IMember, ICultureSensitiveDirtyTracking, IDirtyTracking

Constructors

CultureSensitiveProperty(String, Type, ISet<CultureInfo>)

Declaration
public CultureSensitiveProperty(string name, Type type, ISet<CultureInfo> loadedCultures)
Parameters
TypeNameDescription
System.Stringname
Typetype
ISet<CultureInfo>loadedCultures

CultureSensitiveProperty(String, Type, ISet<CultureInfo>, IDictionary<CultureInfo, Object>)

Declaration
public CultureSensitiveProperty(string name, Type type, ISet<CultureInfo> loadedCultures, IDictionary<CultureInfo, object> values)
Parameters
TypeNameDescription
System.Stringname
Typetype
ISet<CultureInfo>loadedCultures
IDictionary<CultureInfo, System.Object>values

Properties

IsDirty

Declaration
public override bool IsDirty { get; }
Property Value
TypeDescription
System.Boolean
Overrides

Methods

GetCultures()

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

Declaration
public IList<CultureInfo> GetCultures()
Returns
TypeDescription
IList<CultureInfo>

The cultures (never null)

GetDirtyCultures()

Declaration
public IList<CultureInfo> GetDirtyCultures()
Returns
TypeDescription
IList<CultureInfo>

GetTypeName()

Gets the type name of the subtype.

Declaration
protected override string GetTypeName()
Returns
TypeDescription
System.String

Name of the subtype.

Overrides

GetValue(CultureInfo)

Declaration
public object GetValue(CultureInfo culture)
Parameters
TypeNameDescription
CultureInfoculture
Returns
TypeDescription
System.Object

GetValue<T>(CultureInfo)

Gets the value for a specific culture.

Declaration
public 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
public 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
public 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
public 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).

MarkClean()

Declaration
public override void MarkClean()
Overrides

SetValue(CultureInfo, Object)

Sets a value for a specific culture.

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

Culture of the value

System.Objectvalue

Value

StartTracking()

Starts tracking the object for changes.

Declaration
public override void StartTracking()
Overrides

Implements

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