< Summary

Class:Azure.ResourceManager.DigitalTwins.DigitalTwinsCreateOrUpdateOperation
Assembly:Azure.ResourceManager.DigitalTwins
File(s):C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\DigitalTwinsCreateOrUpdateOperation.cs
Covered lines:8
Uncovered lines:10
Coverable lines:18
Total lines:66
Line coverage:44.4% (8 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()-100%100%
UpdateStatus(...)-0%100%
UpdateStatusAsync(...)-0%100%
WaitForCompletionAsync(...)-0%100%
WaitForCompletionAsync(...)-100%100%
Azure.Core.IOperationSource<Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsDescription>.CreateResult(...)-0%100%
Azure-Core-IOperationSource<Azure-ResourceManager-DigitalTwins-Models-DigitalTwinsDescription>-CreateResultAsync()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\DigitalTwinsCreateOrUpdateOperation.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.DigitalTwins.Models;
 16
 17namespace Azure.ResourceManager.DigitalTwins
 18{
 19    /// <summary> Create or update the metadata of a DigitalTwinsInstance. The usual pattern to modify a property is to 
 20    public partial class DigitalTwinsCreateOrUpdateOperation : Operation<DigitalTwinsDescription>, IOperationSource<Digi
 21    {
 22        private readonly ArmOperationHelpers<DigitalTwinsDescription> _operation;
 423        internal DigitalTwinsCreateOrUpdateOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request
 24        {
 425            _operation = new ArmOperationHelpers<DigitalTwinsDescription>(this, clientDiagnostics, pipeline, request, re
 426        }
 27        /// <inheritdoc />
 028        public override string Id => _operation.Id;
 29
 30        /// <inheritdoc />
 031        public override DigitalTwinsDescription 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 />
 840        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<DigitalTwinsDescription>> WaitForCompletionAsync(CancellationToken cancellati
 50
 51        /// <inheritdoc />
 452        public override ValueTask<Response<DigitalTwinsDescription>> WaitForCompletionAsync(TimeSpan pollingInterval, Ca
 53
 54        DigitalTwinsDescription IOperationSource<DigitalTwinsDescription>.CreateResult(Response response, CancellationTo
 55        {
 056            using var document = JsonDocument.Parse(response.ContentStream);
 057            return DigitalTwinsDescription.DeserializeDigitalTwinsDescription(document.RootElement);
 058        }
 59
 60        async ValueTask<DigitalTwinsDescription> IOperationSource<DigitalTwinsDescription>.CreateResultAsync(Response re
 61        {
 462            using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).Confi
 463            return DigitalTwinsDescription.DeserializeDigitalTwinsDescription(document.RootElement);
 464        }
 65    }
 66}