1. Stylelabs.M.Sdk.Clients

Interface ISettingsClient

Client for fetching setting and category entities.

Namespace: StylelabsStylelabs.MSdkClients

Assembly: Stylelabs.M.Sdk.dll

Syntax

public interface ISettingsClient

Methods

GetCategoryIdAsync(string)

Gets the id of a category by name.

Declaration

Task<long?> GetCategoryIdAsync(string name)

Parameters

TypeNameDescription
stringnameThe category name.

Returns

TypeDescription
Task<>longId of the category entity.

GetSettingAsync(string, string, IEntityLoadConfiguration)

Gets the setting with the specified name from the specified category. If the category or setting could not be found, null is returned.

Declaration

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

Parameters

TypeNameDescription
stringcategoryThe category to get the setting from.
stringnameThe name of the setting to get.
IEntityLoadConfigurationloadConfigurationLoad configuration.

Returns

TypeDescription
Task<>IEntityThe setting with the specified name from the specified category or null if that setting doesn't exist.

GetSettingsForCategoryAsync(string, IEntityLoadConfiguration)

Gets the settings for the specified category.

Declaration

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

Parameters

TypeNameDescription
stringcategoryThe category to get the setting for.
IEntityLoadConfigurationloadConfigurationLoad configuration.

Returns

TypeDescription
Task<>IList<>IEntityA list of all setting entities for the specified category.

Exceptions

TypeCondition
NotFoundExceptionUnable to find the category with the specified name.
If you have suggestions for improving this article, let us know!