forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommand.hbs
57 lines (51 loc) · 1.72 KB
/
command.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// <auto-generated />
namespace {{rootNamespace}}.{{domain.Name}}
{
using System.Text.Json.Serialization;
/// <summary>
/// {{xml-code-comment command.Description 1}}
/// </summary>
public sealed class {{className}}CommandSettings : ICommand
{
private const string DevToolsRemoteInterface_CommandName = "{{domain.Name}}.{{command.Name}}";
/// <summary>
/// Gets the name of the command.
/// </summary>
[JsonIgnore]
public string CommandName => DevToolsRemoteInterface_CommandName;
{{#each command.Parameters}}
{{#if Description}}
/// <summary>
/// {{xml-code-comment Description 2}}
/// </summary>
{{else}}
/// <summary>
/// Gets or sets the {{Name}}
/// </summary>
{{/if}}
[JsonPropertyName("{{Name}}")]
{{#if Optional}}[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]{{/if}}
public {{typemap ../context}} {{dehumanize Name}} { get; set; }
{{/each}}
}
/// <summary>
/// Response for {{xml-code-comment command.Description 1}}
/// </summary>
public sealed class {{className}}CommandResponse : ICommandResponse<{{className}}CommandSettings>
{
{{#each command.Returns}}
{{#if Description}}
/// <summary>
/// {{xml-code-comment Description 2}}
///</summary>
{{else}}
/// <summary>
/// Gets or sets the {{Name}}
/// </summary>
{{/if}}
[JsonPropertyName("{{Name}}")]
{{#if Optional}}[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]{{/if}}
public {{typemap ../context}} {{dehumanize Name}} { get; set; }
{{/each}}
}
}