< Summary

Class:Azure.DigitalTwins.Core.Serialization.DigitalTwinMetadata
Assembly:Azure.DigitalTwins.Core
File(s):C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.DigitalTwins.Core\src\Serialization\DigitalTwinMetadata.cs
Covered lines:0
Uncovered lines:2
Coverable lines:2
Total lines:31
Line coverage:0% (0 of 2)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_ModelId()-0%100%
get_WriteableProperties()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.DigitalTwins.Core\src\Serialization\DigitalTwinMetadata.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System.Collections.Generic;
 5using System.Text.Json.Serialization;
 6
 7namespace Azure.DigitalTwins.Core.Serialization
 8{
 9    /// <summary>
 10    /// An optional, helper class for deserializing a digital twin.
 11    /// The $metadata class on a <see cref="BasicDigitalTwin"/> and <see cref="ModelProperties"/>.
 12    /// </summary>
 13    /// <remarks>
 14    /// For more samples, see <see href="https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/digitaltwins/Azure.D
 15    /// </remarks>
 16    public class DigitalTwinMetadata
 17    {
 18        /// <summary>
 19        /// The Id of the model that the digital twin or component is modeled by.
 20        /// </summary>
 21        [JsonPropertyName("$model")]
 022        public string ModelId { get; set; }
 23
 24        /// <summary>
 25        /// Model-defined writable properties' request state.
 26        /// </summary>
 27        /// <remarks>For your convenience, the value of each dictionary object can be turned into an instance of <see cr
 28        [JsonExtensionData]
 029        public IDictionary<string, object> WriteableProperties { get; } = new Dictionary<string, object>();
 30    }
 31}