Пример #1
0
 /// <summary>
 /// Associates/dissociates the given user with/from an organization unit based
 /// on toggle parameter.
 /// </summary>
 /// <remarks>
 /// Required permissions: Users.Edit.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='toggleOuParameters'>
 /// &lt;para /&gt;Toggle - States whether to associate or to dissociate the
 /// organization unit with/from the user.
 /// &lt;para /&gt;OrganizationUnitId - The id of the organization unit to be
 /// associated/dissociated.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task ToggleOrganizationUnitByIdAsync(this IUsers operations, long id, ToggleOuParameters toggleOuParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     (await operations.ToggleOrganizationUnitByIdWithHttpMessagesAsync(id, toggleOuParameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Пример #2
0
 /// <summary>
 /// Associates/dissociates the given user with/from an organization unit based
 /// on toggle parameter.
 /// </summary>
 /// <remarks>
 /// Required permissions: Users.Edit.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='toggleOuParameters'>
 /// &lt;para /&gt;Toggle - States whether to associate or to dissociate the
 /// organization unit with/from the user.
 /// &lt;para /&gt;OrganizationUnitId - The id of the organization unit to be
 /// associated/dissociated.
 /// </param>
 public static void ToggleOrganizationUnitById(this IUsers operations, long id, ToggleOuParameters toggleOuParameters)
 {
     operations.ToggleOrganizationUnitByIdAsync(id, toggleOuParameters).GetAwaiter().GetResult();
 }