---
title: "Class SettingsClientBase"
slug: "sdk--stylelabs.m.sdk.models.clients.settingsclientbase"
abstract: ""
---
# Class SettingsClientBase

Base implementation if [ISettingsClient](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.clients.isettingsclient.html).

## Inheritance

object

SettingsClientBase

## Implements

[ISettingsClient](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.clients.isettingsclient.html)

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

## Assembly: Stylelabs.M.Sdk.dll

## Syntax

```csharp
public abstract class SettingsClientBase : ISettingsClient
```

## Constructors

### SettingsClientBase(IMClient)

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

#### Declaration

```csharp
public SettingsClientBase(IMClient client)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [IMClient](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.imclient.html) | client | The client. |

## Methods

### GetCategoryIdAsync(string)

Gets a category id.

#### Declaration

```csharp
public virtual Task<long?> GetCategoryIdAsync(string name)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | name | The name of the category. |

#### Returns

| Type | Description |
| --- | --- |
| Task<>long | The category id. |

### GetSettingAsync(string, string, IEntityLoadConfiguration)

Gets a setting.

#### Declaration

```csharp
public Task<IEntity> GetSettingAsync(string category, string name, IEntityLoadConfiguration loadConfiguration = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | category | The category of the setting. |
| string | name | The name of the setting. |
| [IEntityLoadConfiguration](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.framework.essentials.loadconfigurations.ientityloadconfiguration.html) | loadConfiguration | The [IEntityLoadConfiguration](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.framework.essentials.loadconfigurations.ientityloadconfiguration.html). |

#### Returns

| Type | Description |
| --- | --- |
| Task<>[IEntity](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientity.html) | The [IEntity](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientity.html) of the setting. |

### GetSettingsForCategoryAsync(string, IEntityLoadConfiguration)

Gets all settings in a category.

#### Declaration

```csharp
public Task<IList<IEntity>> GetSettingsForCategoryAsync(string category, IEntityLoadConfiguration loadConfiguration = null)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | category | The category of the setting. |
| [IEntityLoadConfiguration](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.framework.essentials.loadconfigurations.ientityloadconfiguration.html) | loadConfiguration | The [IEntityLoadConfiguration](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.framework.essentials.loadconfigurations.ientityloadconfiguration.html). |

#### Returns

| Type | Description |
| --- | --- |
| Task<>IList<>[IEntity](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientity.html) | The list of [IEntity](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.base.ientity.html) settings. |

#### Exceptions

| Type | Condition |
| --- | --- |
| [NotFoundException](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.exceptions.notfoundexception.html) | If the category was not found. |

### Implements

[ISettingsClient](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.clients.isettingsclient.html)
