Exemplo n.º 1
0
        public async Task <bool> UpdateConditionalNamingRuleAsync(ConditionalNamingTypes type, string id, ConditionalNamingRule body, CancellationToken cancellationToken = default)
        {
            var response = await GetConditionalNamingUrl(type)
                           .AppendPathSegment(id)
                           .PutJsonAsync(body, cancellationToken)
                           .ConfigureAwait(false);

            return(response.IsSuccessStatusCode);
        }
Exemplo n.º 2
0
        public async Task <EntityShortRepresentation> AddConditionalNamingRuleAsync(ConditionalNamingTypes type, ConditionalNamingRule body, CancellationToken cancellationToken = default)
        {
            var response = await GetConditionalNamingUrl(type)
                           .PostJsonAsync(body, cancellationToken)
                           .ReceiveJsonWithErrorChecking <EntityShortRepresentation>()
                           .ConfigureAwait(false);

            return(response);
        }