Interface ISettingsClient

Version: 4.0

Client for fetching setting and category entities.

Namespace: StylelabsStylelabs.MSdkClients
Assembly: Stylelabs.M.Sdk.dll
Syntax
RequestResponse
public interface ISettingsClient

Methods

GetCategoryIdAsync(string)

Gets the id of a category by name.

Declaration
RequestResponse
Task<long?> GetCategoryIdAsync(string name)
Parameters
TypeNameDescription
stringname

The category name.

Returns
TypeDescription
Task<>long

Id 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
RequestResponse
Task<IEntity> GetSettingAsync(string category, string name, IEntityLoadConfiguration loadConfiguration = null)
Parameters
TypeNameDescription
stringcategory

The category to get the setting from.

stringname

The name of the setting to get.

IEntityLoadConfigurationloadConfiguration

Load configuration.

Returns
TypeDescription
Task<>IEntity

The 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
RequestResponse
Task<IList<IEntity>> GetSettingsForCategoryAsync(string category, IEntityLoadConfiguration loadConfiguration = null)
Parameters
TypeNameDescription
stringcategory

The category to get the setting for.

IEntityLoadConfigurationloadConfiguration

Load configuration.

Returns
TypeDescription
Task<>IList<>IEntity

A list of all setting entities for the specified category.

Exceptions
TypeCondition
NotFoundException

Unable to find the category with the specified name.

Do you have some feedback for us?

If you have suggestions for improving this article,