internal static MediaGraphInstanceSetRequest DeserializeMediaGraphInstanceSetRequest(JsonElement element)
        {
            MediaGraphInstance instance   = default;
            string             methodName = default;
            Optional <string>  apiVersion = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("instance"))
                {
                    instance = MediaGraphInstance.DeserializeMediaGraphInstance(property.Value);
                    continue;
                }
                if (property.NameEquals("methodName"))
                {
                    methodName = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("@apiVersion"))
                {
                    apiVersion = property.Value.GetString();
                    continue;
                }
            }
            return(new MediaGraphInstanceSetRequest(methodName, apiVersion.Value, instance));
        }
Beispiel #2
0
        public MediaGraphInstanceSetRequest(MediaGraphInstance instance)
        {
            if (instance == null)
            {
                throw new ArgumentNullException(nameof(instance));
            }

            Instance   = instance;
            MethodName = "GraphInstanceSet";
        }
Beispiel #3
0
 internal MediaGraphInstanceSetRequest(string methodName, string apiVersion, MediaGraphInstance instance) : base(methodName, apiVersion)
 {
     Instance   = instance;
     MethodName = methodName ?? "GraphInstanceSet";
 }