1. Stylelabs.M.Sdk.Clients

Interface IPoliciesClient

Contains functionality to get and update policies.

Namespace: StylelabsStylelabs.MSdkClients

Assembly: Stylelabs.M.Sdk.dll

Syntax

public interface IPoliciesClient

Methods

GetUserGroupPolicyAsync(long)

Gets the policy from specified user group.

Declaration

Task<IUserGroupPolicy> GetUserGroupPolicyAsync(long userGroupId)

Parameters

TypeNameDescription
longuserGroupIdId of the user group to get the policy from.

Returns

TypeDescription
Task<>IUserGroupPolicyThe policy or null when it was not found.

GetUserPolicyAsync(long)

Gets the policy from specified user.

Declaration

Task<IUserPolicy> GetUserPolicyAsync(long userId)

Parameters

TypeNameDescription
longuserIdId of the user to get the policy from.

Returns

TypeDescription
Task<>IUserPolicyThe policy or null when it was not found.

UpdateAsync(IPolicy)

Updates the specified policy.

Declaration

Task UpdateAsync(IPolicy policy)

Parameters

TypeNameDescription
IPolicypolicyThe policy to update.

Returns

TypeDescription
TaskAn awaitable .

Exceptions

TypeCondition
ValidationExceptionThrown when the policy could not be saved because a validation error occurred.
If you have suggestions for improving this article, let us know!