internal static EncryptionServices DeserializeEncryptionServices(JsonElement element)
        {
            Optional <EncryptionService> blob  = default;
            Optional <EncryptionService> file  = default;
            Optional <EncryptionService> table = default;
            Optional <EncryptionService> queue = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("blob"))
                {
                    blob = EncryptionService.DeserializeEncryptionService(property.Value);
                    continue;
                }
                if (property.NameEquals("file"))
                {
                    file = EncryptionService.DeserializeEncryptionService(property.Value);
                    continue;
                }
                if (property.NameEquals("table"))
                {
                    table = EncryptionService.DeserializeEncryptionService(property.Value);
                    continue;
                }
                if (property.NameEquals("queue"))
                {
                    queue = EncryptionService.DeserializeEncryptionService(property.Value);
                    continue;
                }
            }
            return(new EncryptionServices(blob.Value, file.Value, table.Value, queue.Value));
        }
コード例 #2
0
        internal static EncryptionServices DeserializeEncryptionServices(JsonElement element)
        {
            EncryptionService blob  = default;
            EncryptionService file  = default;
            EncryptionService table = default;
            EncryptionService queue = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("blob"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    blob = EncryptionService.DeserializeEncryptionService(property.Value);
                    continue;
                }
                if (property.NameEquals("file"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    file = EncryptionService.DeserializeEncryptionService(property.Value);
                    continue;
                }
                if (property.NameEquals("table"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    table = EncryptionService.DeserializeEncryptionService(property.Value);
                    continue;
                }
                if (property.NameEquals("queue"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    queue = EncryptionService.DeserializeEncryptionService(property.Value);
                    continue;
                }
            }
            return(new EncryptionServices(blob, file, table, queue));
        }