< Summary

Class:Azure.Security.KeyVault.Keys.CreateKeyOptions
Assembly:Azure.Security.KeyVault.Keys
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Keys\src\CreateKeyOptions.cs
Covered lines:7
Uncovered lines:0
Coverable lines:7
Total lines:47
Line coverage:100% (7 of 7)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
get_KeyOperations()-100%100%
get_NotBefore()-100%100%
get_ExpiresOn()-100%100%
get_Enabled()-100%100%
get_Tags()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Keys\src\CreateKeyOptions.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using System.Collections.Generic;
 6
 7namespace Azure.Security.KeyVault.Keys
 8{
 9    /// <summary>
 10    /// The key-specific properties needed to create a key using the <see cref="KeyClient"/>.
 11    /// </summary>
 12    public class CreateKeyOptions
 13    {
 14        /// <summary>
 15        /// Initializes a new instance of the <see cref="CreateKeyOptions"/> class.
 16        /// </summary>
 15617        public CreateKeyOptions()
 18        {
 15619        }
 20
 21        /// <summary>
 22        /// Gets a list of <see cref="KeyOperation"/> values the key should support.
 23        /// </summary>
 50024        public IList<KeyOperation> KeyOperations { get; } = new List<KeyOperation>();
 25
 26        /// <summary>
 27        /// Gets or sets a <see cref="DateTimeOffset"/> indicating when the key will be valid.
 28        /// </summary>
 16429        public DateTimeOffset? NotBefore { get; set; }
 30
 31        /// <summary>
 32        /// Gets or sets a <see cref="DateTimeOffset"/> indicating when the key will expire.
 33        /// </summary>
 16434        public DateTimeOffset? ExpiresOn { get; set; }
 35
 36        /// <summary>
 37        /// Gets or sets a value indicating whether the key will be enabled. If null, the service default is used.
 38        /// </summary>
 16439        public bool? Enabled { get; set; }
 40
 41        /// <summary>
 42        /// Gets a dictionary of tags with specific metadata about the key. Although this collection cannot be set, it c
 43        ///  or initialized with a <see href="https://docs.microsoft.com/dotnet/csharp/programming-guide/classes-and-str
 44        /// </summary>
 50445        public IDictionary<string, string> Tags { get; } = new Dictionary<string, string>();
 46    }
 47}