コード例 #1
0
        internal static IReadOnlyList <AttestationSigner> FromJsonWebKeySet(JsonWebKeySet keys)
        {
            List <AttestationSigner> returnedCertificates = new List <AttestationSigner>();

            foreach (var key in keys.Keys)
            {
                returnedCertificates.Add(FromJsonWebKey(key));
            }
            return(returnedCertificates.ToArray());
        }
        internal static PolicyCertificatesResult DeserializePolicyCertificatesResult(JsonElement element)
        {
            Optional <JsonWebKeySet> xMsPolicyCertificates = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("x-ms-policy-certificates"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    xMsPolicyCertificates = JsonWebKeySet.DeserializeJsonWebKeySet(property.Value);
                    continue;
                }
            }
            return(new PolicyCertificatesResult(xMsPolicyCertificates.Value));
        }