예제 #1
0
        public async Task <bool> UpdateDetectionRuleFullWebServiceAsync(string id, FullWebServiceRule body = null, CancellationToken cancellationToken = default)
        {
            var response = await GetDetectionRulesFullWebServiceUrl()
                           .AppendPathSegment(id)
                           .PutJsonAsync(body, cancellationToken)
                           .ConfigureAwait(false);

            return(response.IsSuccessStatusCode);
        }
예제 #2
0
        public async Task <EntityShortRepresentation> CreateDetectionRuleFullWebServiceAsync(Positions?position = null, FullWebServiceRule body = null,
                                                                                             CancellationToken cancellationToken = default)
        {
            var response = await GetDetectionRulesFullWebServiceUrl()
                           .SetQueryParam(nameof(position), s_positionsConverter.ConvertToString(position))
                           .PostJsonAsync(body, cancellationToken)
                           .ReceiveJsonWithErrorChecking <EntityShortRepresentation>()
                           .ConfigureAwait(false);

            return(response);
        }