< Summary

Class:Azure.ResourceManager.KeyVault.VaultsCreateOrUpdateOperation
Assembly:Azure.ResourceManager.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\VaultsCreateOrUpdateOperation.cs
Covered lines:7
Uncovered lines:11
Coverable lines:18
Total lines:66
Line coverage:38.8% (7 of 18)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
get_Id()-0%100%
get_Value()-0%100%
get_HasCompleted()-0%100%
get_HasValue()-0%100%
GetRawResponse()-0%100%
UpdateStatus(...)-0%100%
UpdateStatusAsync(...)-0%100%
WaitForCompletionAsync(...)-0%100%
WaitForCompletionAsync(...)-100%100%
Azure.Core.IOperationSource<Azure.ResourceManager.KeyVault.Models.Vault>.CreateResult(...)-0%100%
Azure-Core-IOperationSource<Azure-ResourceManager-KeyVault-Models-Vault>-CreateResultAsync()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\VaultsCreateOrUpdateOperation.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System;
 9using System.Text.Json;
 10using System.Threading;
 11using System.Threading.Tasks;
 12using Azure;
 13using Azure.Core;
 14using Azure.Core.Pipeline;
 15using Azure.ResourceManager.KeyVault.Models;
 16
 17namespace Azure.ResourceManager.KeyVault
 18{
 19    /// <summary> Create or update a key vault in the specified subscription. </summary>
 20    public partial class VaultsCreateOrUpdateOperation : Operation<Vault>, IOperationSource<Vault>
 21    {
 22        private readonly ArmOperationHelpers<Vault> _operation;
 5223        internal VaultsCreateOrUpdateOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request reque
 24        {
 5225            _operation = new ArmOperationHelpers<Vault>(this, clientDiagnostics, pipeline, request, response, OperationF
 5226        }
 27        /// <inheritdoc />
 028        public override string Id => _operation.Id;
 29
 30        /// <inheritdoc />
 031        public override Vault Value => _operation.Value;
 32
 33        /// <inheritdoc />
 034        public override bool HasCompleted => _operation.HasCompleted;
 35
 36        /// <inheritdoc />
 037        public override bool HasValue => _operation.HasValue;
 38
 39        /// <inheritdoc />
 040        public override Response GetRawResponse() => _operation.GetRawResponse();
 41
 42        /// <inheritdoc />
 043        public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(
 44
 45        /// <inheritdoc />
 046        public override ValueTask<Response> UpdateStatusAsync(CancellationToken cancellationToken = default) => _operati
 47
 48        /// <inheritdoc />
 049        public override ValueTask<Response<Vault>> WaitForCompletionAsync(CancellationToken cancellationToken = default)
 50
 51        /// <inheritdoc />
 5252        public override ValueTask<Response<Vault>> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken ca
 53
 54        Vault IOperationSource<Vault>.CreateResult(Response response, CancellationToken cancellationToken)
 55        {
 056            using var document = JsonDocument.Parse(response.ContentStream);
 057            return Vault.DeserializeVault(document.RootElement);
 058        }
 59
 60        async ValueTask<Vault> IOperationSource<Vault>.CreateResultAsync(Response response, CancellationToken cancellati
 61        {
 4862            using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).Confi
 4863            return Vault.DeserializeVault(document.RootElement);
 4864        }
 65    }
 66}