---
title: "Class CultureSensitiveProperty"
slug: "sdk--stylelabs.m.sdk.models.base.culturesensitiveproperty"
abstract: ""
---
# Class CultureSensitiveProperty

A culture sensitive property.

## Inheritance

object

[MemberBase](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.memberbase.html)

[PropertyBase](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.propertybase.html)

CultureSensitiveProperty

## Implements

[ICultureSensitiveProperty](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.iculturesensitiveproperty.html)

[IProperty](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.iproperty.html)

[IMember](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.imember.html)

[ICultureSensitiveDirtyTracking](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.dirtytracking.iculturesensitivedirtytracking.html)

[IDirtyTracking](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.dirtytracking.idirtytracking.html)

## Inherited Members

[PropertyBase.IsMultiLanguage](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.propertybase.html)

[PropertyBase.DataType](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.propertybase.html)

[PropertyBase.DefinitionType](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.propertybase.html)

[MemberBase.Name](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.memberbase.html)

[MemberBase.IsTracking](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.memberbase.html)

## Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ModelsBase

## Assembly: Stylelabs.M.Sdk.dll

## Syntax

```csharp
public class CultureSensitiveProperty : PropertyBase, ICultureSensitiveProperty, IProperty, IMember, ICultureSensitiveDirtyTracking, IDirtyTracking
```

## Constructors

### CultureSensitiveProperty(string, Type, ISet<CultureInfo>, IDictionary<CultureInfo, object>)

Initializes a new instance of the [CultureSensitiveProperty](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.culturesensitiveproperty.html) class.

#### Declaration

```csharp
public CultureSensitiveProperty(string name, Type type, ISet<CultureInfo> loadedCultures, IDictionary<CultureInfo, object> values)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | The name of the property. |
| Type | type | The type of the property. |
| ISet<>CultureInfo | loadedCultures | The cultures to load. |
| IDictionary<, >CultureInfoobject | values | The values of the property. |

### CultureSensitiveProperty(string, Type, ISet<CultureInfo>)

Initializes a new instance of the [CultureSensitiveProperty](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.culturesensitiveproperty.html) class.

#### Declaration

```csharp
public CultureSensitiveProperty(string name, Type type, ISet<CultureInfo> loadedCultures)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | The name of the property. |
| Type | type | The type of the property. |
| ISet<>CultureInfo | loadedCultures | The cultures to load. |

## Properties

### IsDirty

Gets a value indicating whether the property is dirty or not.

#### Declaration

```csharp
public override bool IsDirty { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool |  |

#### Overrides

[MemberBase.IsDirty](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.memberbase.html)

## Methods

### GetCultures()

Gets all cultures that the property supports. These are always equal to the cultures the [IEntity](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientity.html) was loaded with.

#### Declaration

```csharp
public IList<CultureInfo> GetCultures()
```

#### Returns

| Type | Description |
| --- | --- |
| IList<>CultureInfo | The cultures (never null). |

### GetDirtyCultures()

Gets all cultures that have dirty values.

#### Declaration

```csharp
public IList<CultureInfo> GetDirtyCultures()
```

#### Returns

| Type | Description |
| --- | --- |
| IList<>CultureInfo | A list of cultures. |

### GetTypeName()

Gets the type name of the subtype.

#### Declaration

```csharp
protected override string GetTypeName()
```

#### Returns

| Type | Description |
| --- | --- |
| string | Name of the subtype. |

#### Overrides

[PropertyBase.GetTypeName()](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.propertybase.html)

### GetValue(CultureInfo)

Gets a value.

#### Declaration

```csharp
public object GetValue(CultureInfo culture)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| CultureInfo | culture | The culture. |

#### Returns

| Type | Description |
| --- | --- |
| object | The property value. |

### GetValue<T>(CultureInfo)

Gets the value for a specific culture.

#### Declaration

```csharp
public T GetValue<T>(CultureInfo culture)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| CultureInfo | culture | Culture of the value. |

#### Returns

| Type | Description |
| --- | --- |
| T | The value or null if it has no value for this culture. |

#### Type Parameters

| Name | Description |
| --- | --- |
| T | Type of the value (preferable nullable). |

### GetValues()

Gets all values per culture in a non generic way.

#### Declaration

```csharp
public IDictionary<CultureInfo, object> GetValues()
```

#### Returns

| Type | Description |
| --- | --- |
| IDictionary<, >CultureInfoobject | Property values. |

#### Remarks

This method only returns the values in the cultures the [IEntity](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientity.html) was loaded in.

### GetValues<T>()

Gets all values per culture.

#### Declaration

```csharp
public IDictionary<CultureInfo, T> GetValues<T>()
```

#### Returns

| Type | Description |
| --- | --- |
| IDictionary<, >CultureInfo | All property values. |

#### Type Parameters

| Name | Description |
| --- | --- |
| T | Type of the value (preferable nullable). |

#### Remarks

This method only returns the values in the cultures the [IEntity](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientity.html) was loaded in.

### GetValues<T>(IEnumerable<CultureInfo>)

Gets all values in the requested cultures.

#### Declaration

```csharp
public IDictionary<CultureInfo, T> GetValues<T>(IEnumerable<CultureInfo> cultures)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| IEnumerable<>CultureInfo | cultures | Cultures to include. |

#### Returns

| Type | Description |
| --- | --- |
| IDictionary<, >CultureInfo | All property values in the requested cultures. |

#### Type Parameters

| Name | Description |
| --- | --- |
| T | Type of the value (preferable nullable). |

### MarkClean()

Marks as clean.

#### Declaration

```csharp
public override void MarkClean()
```

#### Overrides

[MemberBase.MarkClean()](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.memberbase.html)

### SetValue(CultureInfo, object)

Sets a value for a specific culture.

#### Declaration

```csharp
public void SetValue(CultureInfo culture, object value)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| CultureInfo | culture | Culture of the value. |
| object | value | Value. |

### StartTracking()

Starts tracking.

#### Declaration

```csharp
public override void StartTracking()
```

#### Overrides

[MemberBase.StartTracking()](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.base.memberbase.html)

### Implements

[ICultureSensitiveProperty](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.iculturesensitiveproperty.html)

[IProperty](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.iproperty.html)

[IMember](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.imember.html)

[ICultureSensitiveDirtyTracking](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.dirtytracking.iculturesensitivedirtytracking.html)

[IDirtyTracking](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.dirtytracking.idirtytracking.html)
