From 79c6319e859e18c10a373bde9dfb811bc476cca8 Mon Sep 17 00:00:00 2001 From: Georgios Diamantopoulos <georgiosd@gmail.com> Date: Wed, 15 Mar 2017 21:24:56 +0200 Subject: [PATCH] add missing members from domain objects --- source/ProtocolGenerator/Command.cs | 6 +++++- source/ProtocolGenerator/Domain.cs | 6 ++++++ source/ProtocolGenerator/Event.cs | 4 ++++ source/ProtocolGenerator/Property.cs | 3 +++ source/ProtocolGenerator/Type.cs | 4 ++++ 5 files changed, 22 insertions(+), 1 deletion(-) diff --git a/source/ProtocolGenerator/Command.cs b/source/ProtocolGenerator/Command.cs index 1bc90d0..59199f9 100644 --- a/source/ProtocolGenerator/Command.cs +++ b/source/ProtocolGenerator/Command.cs @@ -3,6 +3,7 @@ using System.Collections.ObjectModel; using System.Text; using System.Linq; using System; +using Newtonsoft.Json; namespace MasterDevs.ChromeDevTools.ProtocolGenerator { @@ -54,6 +55,9 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator set; } + [JsonProperty("experimental")] + public bool IsExperimental { get; set; } + public override bool Equals(object obj) { var other = obj as Command; @@ -81,7 +85,7 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator { hash = hash * 23 + this.Error.GetHashCode(); } - + hash = hash * 23 + this.Parameters.GetCollectionHashCode(); return hash; } diff --git a/source/ProtocolGenerator/Domain.cs b/source/ProtocolGenerator/Domain.cs index a707947..9bce533 100644 --- a/source/ProtocolGenerator/Domain.cs +++ b/source/ProtocolGenerator/Domain.cs @@ -2,6 +2,7 @@ using System; using System.Collections.ObjectModel; using System.Linq; +using Newtonsoft.Json.Linq; namespace MasterDevs.ChromeDevTools.ProtocolGenerator { @@ -51,6 +52,11 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator set; } + [JsonProperty("experimental")] + public bool IsExperimental { get; set; } + + public string[] Dependencies { get; set; } + public Command GetCommand(string name) { return this.Commands.SingleOrDefault(c => string.Equals(c.Name, name, StringComparison.OrdinalIgnoreCase)); diff --git a/source/ProtocolGenerator/Event.cs b/source/ProtocolGenerator/Event.cs index 2456dc9..fe6e146 100644 --- a/source/ProtocolGenerator/Event.cs +++ b/source/ProtocolGenerator/Event.cs @@ -1,4 +1,5 @@ using System.Collections.ObjectModel; +using Newtonsoft.Json; namespace MasterDevs.ChromeDevTools.ProtocolGenerator { @@ -27,5 +28,8 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator get; set; } + + [JsonProperty("experimental")] + public bool IsExperimental { get; set; } } } diff --git a/source/ProtocolGenerator/Property.cs b/source/ProtocolGenerator/Property.cs index 9002cad..2e461db 100644 --- a/source/ProtocolGenerator/Property.cs +++ b/source/ProtocolGenerator/Property.cs @@ -16,5 +16,8 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator get; set; } + + [JsonProperty("deprecated")] + public bool IsDeprecated { get; set; } } } diff --git a/source/ProtocolGenerator/Type.cs b/source/ProtocolGenerator/Type.cs index 7d8f8cf..1fbeff9 100644 --- a/source/ProtocolGenerator/Type.cs +++ b/source/ProtocolGenerator/Type.cs @@ -87,6 +87,10 @@ namespace MasterDevs.ChromeDevTools.ProtocolGenerator } } } + + [JsonProperty("experimental")] + public bool IsExperimental { get; set; } + public override bool Equals(object obj) { var other = obj as Type; -- GitLab