Beispiel #1
0
        internal static MediaGraphOutputSelector DeserializeMediaGraphOutputSelector(JsonElement element)
        {
            Optional <MediaGraphOutputSelectorProperty> property  = default;
            Optional <MediaGraphOutputSelectorOperator> @operator = default;
            Optional <string> value = default;

            foreach (var property0 in element.EnumerateObject())
            {
                if (property0.NameEquals("property"))
                {
                    if (property0.Value.ValueKind == JsonValueKind.Null)
                    {
                        property0.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    property = new MediaGraphOutputSelectorProperty(property0.Value.GetString());
                    continue;
                }
                if (property0.NameEquals("operator"))
                {
                    if (property0.Value.ValueKind == JsonValueKind.Null)
                    {
                        property0.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    @operator = new MediaGraphOutputSelectorOperator(property0.Value.GetString());
                    continue;
                }
                if (property0.NameEquals("value"))
                {
                    value = property0.Value.GetString();
                    continue;
                }
            }
            return(new MediaGraphOutputSelector(Optional.ToNullable(property), Optional.ToNullable(@operator), value.Value));
        }
 public static string ToSerialString(this MediaGraphOutputSelectorOperator value) => value switch
 {