示例#1
0
        public async Task <Response <FeatureOperationsListResult> > ListAllAsync(CancellationToken cancellationToken = default)
        {
            using var message = CreateListAllRequest();
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);

            switch (message.Response.Status)
            {
            case 200:
            {
                FeatureOperationsListResult value = default;
                using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);

                value = FeatureOperationsListResult.DeserializeFeatureOperationsListResult(document.RootElement);
                return(Response.FromValue(value, message.Response));
            }
示例#2
0
        public async Task <Response <FeatureOperationsListResult> > ListAllAsync(string subscriptionId, CancellationToken cancellationToken = default)
        {
            if (subscriptionId == null)
            {
                throw new ArgumentNullException(nameof(subscriptionId));
            }

            using var message = CreateListAllRequest(subscriptionId);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);

            switch (message.Response.Status)
            {
            case 200:
            {
                FeatureOperationsListResult value = default;
                using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);

                value = FeatureOperationsListResult.DeserializeFeatureOperationsListResult(document.RootElement);
                return(Response.FromValue(value, message.Response));
            }