Skip to content
Snippets Groups Projects
Commit 8ea5f34f authored by Kevin Prudente's avatar Kevin Prudente Committed by GitHub
Browse files

Merge pull request #12 from quamotion/fixes/optional-arguments

Better support for optional arguments
parents 8d303307 8511c544
No related branches found
No related tags found
No related merge requests found
Showing
with 55 additions and 14 deletions
using System.Reflection;
using System;
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
......@@ -12,6 +13,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: CLSCompliant(true)]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
......
......@@ -21,18 +21,22 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility
/// <summary>
/// Gets or sets The accessible name for this <code>Node</code>.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public AXValue Name { get; set; }
/// <summary>
/// Gets or sets The accessible description for this <code>Node</code>.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public AXValue Description { get; set; }
/// <summary>
/// Gets or sets The value for this <code>Node</code>.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public AXValue Value { get; set; }
/// <summary>
/// Gets or sets Help.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public AXValue Help { get; set; }
/// <summary>
/// Gets or sets All other properties
......
......@@ -29,10 +29,12 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility
/// <summary>
/// Gets or sets Whether the value for this property is invalid.
/// </summary>
public bool Invalid { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public bool? Invalid { get; set; }
/// <summary>
/// Gets or sets Reason for the value being invalid, if it is.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string InvalidReason { get; set; }
}
}
......@@ -13,6 +13,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility
/// <summary>
/// Gets or sets The IDRef value provided, if any.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string Idref { get; set; }
/// <summary>
/// Gets or sets The BackendNodeId of the related node.
......
......@@ -17,18 +17,22 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility
/// <summary>
/// Gets or sets The computed value of this property.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public object Value { get; set; }
/// <summary>
/// Gets or sets The related node value, if any.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public AXRelatedNode RelatedNodeValue { get; set; }
/// <summary>
/// Gets or sets Multiple relted nodes, if applicable.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public AXRelatedNode[] RelatedNodeArrayValue { get; set; }
/// <summary>
/// Gets or sets The sources which contributed to the computation of this property.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public AXPropertySource[] Sources { get; set; }
}
}
......@@ -14,6 +14,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Accessibility
/// <summary>
/// Gets or sets The <code>Accessibility.AXNode</code> for this DOM node, if it exists.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public AXNode AccessibilityNode { get; set; }
}
}
......@@ -53,6 +53,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation
/// <summary>
/// Gets or sets <code>AnimationNode</code>'s keyframes.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public KeyframesRule KeyframesRule { get; set; }
/// <summary>
/// Gets or sets <code>AnimationNode</code>'s timing function.
......
using MasterDevs.ChromeDevTools;
using MasterDevs.ChromeDevTools;using Newtonsoft.Json;
namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation
{
......
using MasterDevs.ChromeDevTools;
using MasterDevs.ChromeDevTools;using Newtonsoft.Json;
namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation
{
......
......@@ -13,6 +13,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.Animation
/// <summary>
/// Gets or sets CSS keyframed animation's name.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string Name { get; set; }
/// <summary>
/// Gets or sets List of animation keyframes.
......
using MasterDevs.ChromeDevTools;
using MasterDevs.ChromeDevTools;using Newtonsoft.Json;
namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ApplicationCache
{
......
using MasterDevs.ChromeDevTools;
using MasterDevs.ChromeDevTools;using Newtonsoft.Json;
namespace MasterDevs.ChromeDevTools.Protocol.Chrome.ApplicationCache
{
......
......@@ -21,18 +21,22 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS
/// <summary>
/// Gets or sets URL of the document containing the media query description.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string SourceURL { get; set; }
/// <summary>
/// Gets or sets The associated rule (@media or @import) header range in the enclosing stylesheet (if available).
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public SourceRange Range { get; set; }
/// <summary>
/// Gets or sets Identifier of the stylesheet containing this object (if exists).
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string ParentStyleSheetId { get; set; }
/// <summary>
/// Gets or sets Array of media queries.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public MediaQuery[] MediaList { get; set; }
}
}
......@@ -21,26 +21,32 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS
/// <summary>
/// Gets or sets Whether the property has "!important" annotation (implies <code>false</code> if absent).
/// </summary>
public bool Important { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public bool? Important { get; set; }
/// <summary>
/// Gets or sets Whether the property is implicit (implies <code>false</code> if absent).
/// </summary>
public bool Implicit { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public bool? Implicit { get; set; }
/// <summary>
/// Gets or sets The full property text as specified in the style.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string Text { get; set; }
/// <summary>
/// Gets or sets Whether the property is understood by the browser (implies <code>true</code> if absent).
/// </summary>
public bool ParsedOk { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public bool? ParsedOk { get; set; }
/// <summary>
/// Gets or sets Whether the property is disabled by the user (present for source-based properties only).
/// </summary>
public bool Disabled { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public bool? Disabled { get; set; }
/// <summary>
/// Gets or sets The entire property range in the enclosing style declaration (if available).
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public SourceRange Range { get; set; }
}
}
......@@ -13,6 +13,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS
/// <summary>
/// Gets or sets The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string StyleSheetId { get; set; }
/// <summary>
/// Gets or sets Rule selector data.
......@@ -29,6 +30,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS
/// <summary>
/// Gets or sets Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public CSSMedia[] Media { get; set; }
}
}
......@@ -13,6 +13,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS
/// <summary>
/// Gets or sets The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string StyleSheetId { get; set; }
/// <summary>
/// Gets or sets CSS properties in the style.
......@@ -25,10 +26,12 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS
/// <summary>
/// Gets or sets Style declaration text (if available).
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string CssText { get; set; }
/// <summary>
/// Gets or sets Style declaration range in the enclosing stylesheet (if available).
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public SourceRange Range { get; set; }
}
}
......@@ -25,6 +25,7 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS
/// <summary>
/// Gets or sets URL of source map associated with the stylesheet (if any).
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string SourceMapURL { get; set; }
/// <summary>
/// Gets or sets Stylesheet origin.
......@@ -37,7 +38,8 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS
/// <summary>
/// Gets or sets The backend id for the owner node of the stylesheet.
/// </summary>
public long OwnerNode { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public long? OwnerNode { get; set; }
/// <summary>
/// Gets or sets Denotes whether the stylesheet is disabled.
/// </summary>
......@@ -45,7 +47,8 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS
/// <summary>
/// Gets or sets Whether the sourceURL field value comes from the sourceURL comment.
/// </summary>
public bool HasSourceURL { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public bool? HasSourceURL { get; set; }
/// <summary>
/// Gets or sets Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags.
/// </summary>
......
......@@ -14,10 +14,12 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS
/// <summary>
/// Gets or sets Inline style for the specified DOM node.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public CSSStyle InlineStyle { get; set; }
/// <summary>
/// Gets or sets Attribute-defined element style (e.g. resulting from "width=20 height=100%").
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public CSSStyle AttributesStyle { get; set; }
}
}
......@@ -18,10 +18,12 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS
/// <summary>
/// Gets or sets Whether to exclude pseudo styles (default: false).
/// </summary>
public bool ExcludePseudo { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public bool? ExcludePseudo { get; set; }
/// <summary>
/// Gets or sets Whether to exclude inherited styles (default: false).
/// </summary>
public bool ExcludeInherited { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public bool? ExcludeInherited { get; set; }
}
}
......@@ -14,14 +14,17 @@ namespace MasterDevs.ChromeDevTools.Protocol.Chrome.CSS
/// <summary>
/// Gets or sets CSS rules matching this node, from all applicable stylesheets.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public RuleMatch[] MatchedCSSRules { get; set; }
/// <summary>
/// Gets or sets Pseudo style matches for this node.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public PseudoIdMatches[] PseudoElements { get; set; }
/// <summary>
/// Gets or sets A chain of inherited styles (from the immediate node parent up to the DOM tree root).
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public InheritedStyleEntry[] Inherited { get; set; }
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment