Skip to content

Commit aaeed0f

Browse files
authored
use global keyword (OpenAPITools#19257)
1 parent 2bc4a16 commit aaeed0f

File tree

986 files changed

+4649
-4649
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

986 files changed

+4649
-4649
lines changed

modules/openapi-generator/src/main/resources/csharp/ClientUtils.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ namespace {{packageName}}.Client
145145
/// <returns>Encoded string.</returns>
146146
public static string Base64Encode(string text)
147147
{
148-
return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text));
148+
return Convert.ToBase64String(global::System.Text.Encoding.UTF8.GetBytes(text));
149149
}
150150

151151
/// <summary>

modules/openapi-generator/src/main/resources/csharp/Configuration.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ namespace {{packageName}}.Client
122122
/// <summary>
123123
/// Initializes a new instance of the <see cref="Configuration" /> class
124124
/// </summary>
125-
[System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")]
125+
[global::System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")]
126126
public Configuration()
127127
{
128128
Proxy = null;
@@ -208,7 +208,7 @@ namespace {{packageName}}.Client
208208
/// <summary>
209209
/// Initializes a new instance of the <see cref="Configuration" /> class
210210
/// </summary>
211-
[System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")]
211+
[global::System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")]
212212
public Configuration(
213213
IDictionary<string, string> defaultHeaders,
214214
IDictionary<string, string> apiKey,

modules/openapi-generator/src/main/resources/csharp/HttpSigningConfiguration.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ namespace {{packageName}}.Client
498498
binkey = Convert.FromBase64String(pvkstr);
499499
return binkey;
500500
}
501-
catch (System.FormatException)
501+
catch (global::System.FormatException)
502502
{
503503
StringReader str = new StringReader(pvkstr);
504504
@@ -528,7 +528,7 @@ namespace {{packageName}}.Client
528528
{ //should have b64 encrypted RSA key now
529529
binkey = Convert.FromBase64String(encryptedstr);
530530
}
531-
catch (System.FormatException)
531+
catch (global::System.FormatException)
532532
{ //data is not in base64 format
533533
return null;
534534
}

modules/openapi-generator/src/main/resources/csharp/IAsynchronousClient.mustache

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace {{packageName}}.Client
2121
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
2222
/// <typeparam name="T">The return type.</typeparam>
2323
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
24-
Task<ApiResponse<T>> GetAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
24+
Task<ApiResponse<T>> GetAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));
2525
2626
/// <summary>
2727
/// Executes a non-blocking call to some <paramref name="path"/> using the POST http verb.
@@ -32,7 +32,7 @@ namespace {{packageName}}.Client
3232
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
3333
/// <typeparam name="T">The return type.</typeparam>
3434
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
35-
Task<ApiResponse<T>> PostAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
35+
Task<ApiResponse<T>> PostAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));
3636
3737
/// <summary>
3838
/// Executes a non-blocking call to some <paramref name="path"/> using the PUT http verb.
@@ -43,7 +43,7 @@ namespace {{packageName}}.Client
4343
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
4444
/// <typeparam name="T">The return type.</typeparam>
4545
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
46-
Task<ApiResponse<T>> PutAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
46+
Task<ApiResponse<T>> PutAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));
4747
4848
/// <summary>
4949
/// Executes a non-blocking call to some <paramref name="path"/> using the DELETE http verb.
@@ -54,7 +54,7 @@ namespace {{packageName}}.Client
5454
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
5555
/// <typeparam name="T">The return type.</typeparam>
5656
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
57-
Task<ApiResponse<T>> DeleteAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
57+
Task<ApiResponse<T>> DeleteAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));
5858
5959
/// <summary>
6060
/// Executes a non-blocking call to some <paramref name="path"/> using the HEAD http verb.
@@ -65,7 +65,7 @@ namespace {{packageName}}.Client
6565
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
6666
/// <typeparam name="T">The return type.</typeparam>
6767
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
68-
Task<ApiResponse<T>> HeadAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
68+
Task<ApiResponse<T>> HeadAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));
6969
7070
/// <summary>
7171
/// Executes a non-blocking call to some <paramref name="path"/> using the OPTIONS http verb.
@@ -76,7 +76,7 @@ namespace {{packageName}}.Client
7676
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
7777
/// <typeparam name="T">The return type.</typeparam>
7878
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
79-
Task<ApiResponse<T>> OptionsAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
79+
Task<ApiResponse<T>> OptionsAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));
8080
8181
/// <summary>
8282
/// Executes a non-blocking call to some <paramref name="path"/> using the PATCH http verb.
@@ -87,6 +87,6 @@ namespace {{packageName}}.Client
8787
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
8888
/// <typeparam name="T">The return type.</typeparam>
8989
/// <returns>A task eventually representing the response data, decorated with <see cref="ApiResponse{T}"/></returns>
90-
Task<ApiResponse<T>> PatchAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
90+
Task<ApiResponse<T>> PatchAsync<T>(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));
9191
}
9292
}

modules/openapi-generator/src/main/resources/csharp/api.mustache

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ namespace {{packageName}}.{{apiPackage}}
8282
{{#isDeprecated}}
8383
[Obsolete]
8484
{{/isDeprecated}}
85-
{{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
85+
{{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));
8686

8787
/// <summary>
8888
/// {{summary}}
@@ -100,7 +100,7 @@ namespace {{packageName}}.{{apiPackage}}
100100
{{#isDeprecated}}
101101
[Obsolete]
102102
{{/isDeprecated}}
103-
System.Threading.Tasks.Task<ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
103+
System.Threading.Tasks.Task<ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken));
104104
{{/operation}}
105105
#endregion Asynchronous Operations
106106
}
@@ -512,7 +512,7 @@ namespace {{packageName}}.{{apiPackage}}
512512
{{#isDeprecated}}
513513
[Obsolete]
514514
{{/isDeprecated}}
515-
{{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
515+
{{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
516516
{
517517
{{#returnType}}{{packageName}}.Client.ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}operationIndex, cancellationToken).ConfigureAwait(false);
518518
return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}operationIndex, cancellationToken).ConfigureAwait(false);{{/returnType}}
@@ -531,7 +531,7 @@ namespace {{packageName}}.{{apiPackage}}
531531
{{#isDeprecated}}
532532
[Obsolete]
533533
{{/isDeprecated}}
534-
public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
534+
public async System.Threading.Tasks.Task<{{packageName}}.Client.ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}>> {{operationId}}WithHttpInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
535535
{
536536
{{#allParams}}
537537
{{#required}}

modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ApiKeyToken.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace {{packageName}}.{{clientPackage}}
3737
/// Places the token in the header.
3838
/// </summary>
3939
/// <param name="request"></param>
40-
public virtual void UseInHeader(System.Net.Http.HttpRequestMessage request)
40+
public virtual void UseInHeader(global::System.Net.Http.HttpRequestMessage request)
4141
{
4242
request.Headers.Add(ClientUtils.ApiKeyHeaderToString(Header), _raw);
4343
}
@@ -48,7 +48,7 @@ namespace {{packageName}}.{{clientPackage}}
4848
/// <param name="request"></param>
4949
/// <param name="uriBuilder"></param>
5050
/// <param name="parseQueryString"></param>
51-
public virtual void UseInQuery(System.Net.Http.HttpRequestMessage request, UriBuilder uriBuilder, System.Collections.Specialized.NameValueCollection parseQueryString)
51+
public virtual void UseInQuery(global::System.Net.Http.HttpRequestMessage request, UriBuilder uriBuilder, System.Collections.Specialized.NameValueCollection parseQueryString)
5252
{
5353
parseQueryString[ClientUtils.ApiKeyHeaderToString(Header)] = Uri.EscapeDataString(_raw).ToString(){{nrt!}};
5454
}

modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ApiResponse`1.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ namespace {{packageName}}.{{clientPackage}}
129129
/// <param name="path"></param>
130130
/// <param name="requestedAt"></param>
131131
/// <param name="jsonSerializerOptions"></param>
132-
public ApiResponse(System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions)
132+
public ApiResponse(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions)
133133
{
134134
StatusCode = httpResponseMessage.StatusCode;
135135
Headers = httpResponseMessage.Headers;
@@ -143,7 +143,7 @@ namespace {{packageName}}.{{clientPackage}}
143143
OnCreated(httpRequestMessage, httpResponseMessage);
144144
}
145145

146-
partial void OnCreated(System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage);
146+
partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage);
147147
}
148148
{{#x-http-statuses-with-return}}
149149

modules/openapi-generator/src/main/resources/csharp/libraries/generichost/BasicToken.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace {{packageName}}.{{clientPackage}}
3838
/// </summary>
3939
/// <param name="request"></param>
4040
/// <param name="headerName"></param>
41-
public virtual void UseInHeader(System.Net.Http.HttpRequestMessage request, string headerName)
41+
public virtual void UseInHeader(global::System.Net.Http.HttpRequestMessage request, string headerName)
4242
{
4343
request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", {{packageName}}.Client.ClientUtils.Base64Encode(_username + ":" + _password));
4444
}

modules/openapi-generator/src/main/resources/csharp/libraries/generichost/BearerToken.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace {{packageName}}.{{clientPackage}}
3333
/// </summary>
3434
/// <param name="request"></param>
3535
/// <param name="headerName"></param>
36-
public virtual void UseInHeader(System.Net.Http.HttpRequestMessage request, string headerName)
36+
public virtual void UseInHeader(global::System.Net.Http.HttpRequestMessage request, string headerName)
3737
{
3838
request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _raw);
3939
}

modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ClientUtils.mustache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ using System.Runtime.CompilerServices;
103103
/// <param name="options"></param>
104104
/// <param name="result"></param>
105105
/// <returns></returns>
106-
public static bool TryDeserialize<T>(string json, JsonSerializerOptions options, {{#net60OrLater}}[System.Diagnostics.CodeAnalysis.NotNullWhen(true)] {{/net60OrLater}}out T{{#nrt}}{{#net60OrLater}}?{{/net60OrLater}}{{/nrt}} result)
106+
public static bool TryDeserialize<T>(string json, JsonSerializerOptions options, {{#net60OrLater}}[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] {{/net60OrLater}}out T{{#nrt}}{{#net60OrLater}}?{{/net60OrLater}}{{/nrt}} result)
107107
{
108108
try
109109
{
@@ -125,7 +125,7 @@ using System.Runtime.CompilerServices;
125125
/// <param name="options"></param>
126126
/// <param name="result"></param>
127127
/// <returns></returns>
128-
public static bool TryDeserialize<T>(ref Utf8JsonReader reader, JsonSerializerOptions options, {{#net60OrLater}}[System.Diagnostics.CodeAnalysis.NotNullWhen(true)] {{/net60OrLater}}out T{{#nrt}}{{#net60OrLater}}?{{/net60OrLater}}{{/nrt}} result)
128+
public static bool TryDeserialize<T>(ref Utf8JsonReader reader, JsonSerializerOptions options, {{#net60OrLater}}[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] {{/net60OrLater}}out T{{#nrt}}{{#net60OrLater}}?{{/net60OrLater}}{{/nrt}} result)
129129
{
130130
try
131131
{
@@ -258,7 +258,7 @@ using System.Runtime.CompilerServices;
258258
/// <returns>Encoded string.</returns>
259259
public static string Base64Encode(string text)
260260
{
261-
return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text));
261+
return Convert.ToBase64String(global::System.Text.Encoding.UTF8.GetBytes(text));
262262
}
263263

264264
/// <summary>

0 commit comments

Comments
 (0)