"Fossies" - the Fresh Open Source Software Archive

Member "selenium-selenium-4.8.1/third_party/dotnet/devtools/src/generator/ProtocolDefinition/CommandDefinition.cs" (17 Feb 2023, 1178 Bytes) of package /linux/www/selenium-selenium-4.8.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C# source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    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 }