/// <summary> /// Execute example /// </summary> /// <param name="cancellationToken">The cancellation token</param> /// <returns>The task</returns> public async Task Execute(CancellationToken cancellationToken) { var request = new ListAppGroupV1Request { Sort = new[] { ListAppGroupV1Sort.Name }, PageNumber = 1, PageSize = 50 }; var response = await _client.Execute(request, cancellationToken) .ThrowIfFailed() .ConfigureAwait(Await.Default); Require.NotNull(response, nameof(response)); }
private async Task <Guid?> GetAppGroupId(CancellationToken cancellationToken) { var request = new ListAppGroupV1Request { Sort = new[] { ListAppGroupV1Sort.Name }, PageNumber = 1, PageSize = 1 }; var response = await _listClient.Execute(request, cancellationToken) .ThrowIfFailed() .ConfigureAwait(Await.Default); if (response.IsSuccessful == true && response.Model.Total > 1) { var appGroupId = response.Model.AppGroups[0].AppGroupId; return(appGroupId); } return(null); }