示例#1
0
        /// <summary>
        /// List all owners of a telegraf config.
        /// </summary>
        /// <param name="telegrafId">ID of the telegraf config</param>
        /// <returns>a list of telegraf config owners</returns>
        public async Task<List<ResourceOwner>> GetOwnersAsync(string telegrafId)
        {
            Arguments.CheckNonEmptyString(telegrafId, nameof(telegrafId));

            var response = await _service.GetTelegrafsIDOwnersAsync(telegrafId).ConfigureAwait(false);
            return response.Users;
        }
        /// <summary>
        /// List all owners of a telegraf config.
        /// </summary>
        /// <param name="telegrafId">ID of the telegraf config</param>
        /// <returns>a list of telegraf config owners</returns>
        public async Task <List <ResourceOwner> > GetOwnersAsync(string telegrafId)
        {
            Arguments.CheckNonEmptyString(telegrafId, nameof(telegrafId));

            return((await _service.GetTelegrafsIDOwnersAsync(telegrafId)).Users);
        }
        /// <summary>
        /// List all owners of a telegraf config.
        /// </summary>
        /// <param name="telegrafId">ID of the telegraf config</param>
        /// <returns>a list of telegraf config owners</returns>
        public async Task <List <ResourceOwner> > GetOwners(string telegrafId)
        {
            Arguments.CheckNonEmptyString(telegrafId, nameof(telegrafId));

            return(await _service.GetTelegrafsIDOwnersAsync(telegrafId).ContinueWith(t => t.Result.Users));
        }