< Summary

Class:Azure.Analytics.Synapse.Artifacts.Models.SecureString
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SecureString.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SecureString.Serialization.cs
Covered lines:0
Uncovered lines:27
Coverable lines:27
Total lines:86
Line coverage:0% (0 of 27)
Covered branches:0
Total branches:10
Branch coverage:0% (0 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Value()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%100%
DeserializeSecureString(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SecureString.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;
 9
 10namespace Azure.Analytics.Synapse.Artifacts.Models
 11{
 12    /// <summary> Azure Synapse secure string definition. The string value will be masked with asterisks &apos;*&apos; d
 13    public partial class SecureString : SecretBase
 14    {
 15        /// <summary> Initializes a new instance of SecureString. </summary>
 16        /// <param name="value"> Value of secure string. </param>
 17        /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception>
 018        public SecureString(string value)
 19        {
 020            if (value == null)
 21            {
 022                throw new ArgumentNullException(nameof(value));
 23            }
 24
 025            Value = value;
 026            Type = "SecureString";
 027        }
 28
 29        /// <summary> Initializes a new instance of SecureString. </summary>
 30        /// <param name="type"> Type of the secret. </param>
 31        /// <param name="value"> Value of secure string. </param>
 032        internal SecureString(string type, string value) : base(type)
 33        {
 034            Value = value;
 035            Type = type ?? "SecureString";
 036        }
 37
 38        /// <summary> Value of secure string. </summary>
 039        public string Value { get; set; }
 40    }
 41}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SecureString.Serialization.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.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.Analytics.Synapse.Artifacts.Models
 12{
 13    public partial class SecureString : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("value");
 019            writer.WriteStringValue(Value);
 020            writer.WritePropertyName("type");
 021            writer.WriteStringValue(Type);
 022            writer.WriteEndObject();
 023        }
 24
 25        internal static SecureString DeserializeSecureString(JsonElement element)
 26        {
 027            string value = default;
 028            string type = default;
 029            foreach (var property in element.EnumerateObject())
 30            {
 031                if (property.NameEquals("value"))
 32                {
 033                    value = property.Value.GetString();
 034                    continue;
 35                }
 036                if (property.NameEquals("type"))
 37                {
 038                    type = property.Value.GetString();
 39                    continue;
 40                }
 41            }
 042            return new SecureString(type, value);
 43        }
 44    }
 45}