1 namespace OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition 2 { 3 using Newtonsoft.Json; 4 using System.Collections.Generic; 5 using System.Collections.ObjectModel; 6 7 public sealed class CommandDefinition : ProtocolDefinitionItem 8 { 9 public CommandDefinition() 10 { 11 Handlers = new HashSet<string>(); 12 13 Parameters = new Collection<TypeDefinition>(); 14 Returns = new Collection<TypeDefinition>(); 15 } 16 17 [JsonProperty(PropertyName = "handlers")] 18 public ICollection<string> Handlers 19 { 20 get; 21 set; 22 } 23 24 [JsonProperty(PropertyName = "parameters")] 25 public ICollection<TypeDefinition> Parameters 26 { 27 get; 28 set; 29 } 30 31 [JsonProperty(PropertyName = "returns")] 32 public ICollection<TypeDefinition> Returns 33 { 34 get; 35 set; 36 } 37 38 [JsonProperty(PropertyName = "redirect")] 39 public string Redirect 40 { 41 get; 42 set; 43 } 44 45 [JsonIgnore] 46 public bool NoParameters => Parameters == null || Parameters.Count == 0; 47 } 48 }