コード例 #1
0
        public EncryptionProperty(EncryptionStatus status, KeyVaultProperties keyVaultProperties)
        {
            if (keyVaultProperties == null)
            {
                throw new ArgumentNullException(nameof(keyVaultProperties));
            }

            Status             = status;
            KeyVaultProperties = keyVaultProperties;
        }
コード例 #2
0
        internal static EncryptionProperty DeserializeEncryptionProperty(JsonElement element)
        {
            EncryptionStatus   status             = default;
            KeyVaultProperties keyVaultProperties = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("status"))
                {
                    status = new EncryptionStatus(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("keyVaultProperties"))
                {
                    keyVaultProperties = KeyVaultProperties.DeserializeKeyVaultProperties(property.Value);
                    continue;
                }
            }
            return(new EncryptionProperty(status, keyVaultProperties));
        }