Skip to content

Commit f664536

Browse files
nvborisenkodiemol
andauthored
[dotnet] Return Task instead of wait it in generated CDP method invocations (#12672)
Return Task instead of wait it in generated CDP method invocations Co-authored-by: Diego Molina <[email protected]>
1 parent be6d288 commit f664536

File tree

1 file changed

+2
-2
lines changed
  • third_party/dotnet/devtools/src/generator/Templates

1 file changed

+2
-2
lines changed

third_party/dotnet/devtools/src/generator/Templates/domain.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ namespace {{rootNamespace}}.{{domain.Name}}
4646
/// <summary>
4747
/// {{xml-code-comment Description 2}}
4848
/// </summary>
49-
public async Task<{{dehumanize Name}}CommandResponse> {{dehumanize Name}}({{dehumanize Name}}CommandSettings command{{#if NoParameters}} = null{{/if}}, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
49+
public Task<{{dehumanize Name}}CommandResponse> {{dehumanize Name}}({{dehumanize Name}}CommandSettings command{{#if NoParameters}} = null{{/if}}, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
5050
{
51-
return await m_session.SendCommand<{{dehumanize Name}}CommandSettings, {{dehumanize Name}}CommandResponse>(command{{#if NoParameters}} ?? new {{dehumanize Name}}CommandSettings(){{/if}}, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived);
51+
return m_session.SendCommand<{{dehumanize Name}}CommandSettings, {{dehumanize Name}}CommandResponse>(command{{#if NoParameters}} ?? new {{dehumanize Name}}CommandSettings(){{/if}}, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived);
5252
}
5353
{{/each}}
5454

0 commit comments

Comments
 (0)