@@ -90,11 +90,11 @@ public virtual Task<WebSocket> WebSocketNamespacedPodExecAsync(string name, stri
90
90
}
91
91
92
92
// Tracing
93
- bool _shouldTrace = ServiceClientTracing . IsEnabled ;
94
- string _invocationId = null ;
95
- if ( _shouldTrace )
93
+ bool shouldTrace = ServiceClientTracing . IsEnabled ;
94
+ string invocationId = null ;
95
+ if ( shouldTrace )
96
96
{
97
- _invocationId = ServiceClientTracing . NextInvocationId . ToString ( ) ;
97
+ invocationId = ServiceClientTracing . NextInvocationId . ToString ( ) ;
98
98
Dictionary < string , object > tracingParameters = new Dictionary < string , object > ( ) ;
99
99
tracingParameters . Add ( "command" , command ) ;
100
100
tracingParameters . Add ( "container" , container ) ;
@@ -106,7 +106,7 @@ public virtual Task<WebSocket> WebSocketNamespacedPodExecAsync(string name, stri
106
106
tracingParameters . Add ( "tty" , tty ) ;
107
107
tracingParameters . Add ( "webSocketSubProtol" , webSocketSubProtol ) ;
108
108
tracingParameters . Add ( "cancellationToken" , cancellationToken ) ;
109
- ServiceClientTracing . Enter ( _invocationId , this , nameof ( WebSocketNamespacedPodExecAsync ) ,
109
+ ServiceClientTracing . Enter ( invocationId , this , nameof ( WebSocketNamespacedPodExecAsync ) ,
110
110
tracingParameters ) ;
111
111
}
112
112
@@ -143,7 +143,7 @@ public virtual Task<WebSocket> WebSocketNamespacedPodExecAsync(string name, stri
143
143
uriBuilder . Query =
144
144
query . ToString ( 1 , query . Length - 1 ) ; // UriBuilder.Query doesn't like leading '?' chars, so trim it
145
145
146
- return this . StreamConnectAsync ( uriBuilder . Uri , _invocationId , webSocketSubProtol , customHeaders ,
146
+ return this . StreamConnectAsync ( uriBuilder . Uri , invocationId , webSocketSubProtol , customHeaders ,
147
147
cancellationToken ) ;
148
148
}
149
149
@@ -169,18 +169,18 @@ public Task<WebSocket> WebSocketNamespacedPodPortForwardAsync(string name, strin
169
169
}
170
170
171
171
// Tracing
172
- bool _shouldTrace = ServiceClientTracing . IsEnabled ;
173
- string _invocationId = null ;
174
- if ( _shouldTrace )
172
+ bool shouldTrace = ServiceClientTracing . IsEnabled ;
173
+ string invocationId = null ;
174
+ if ( shouldTrace )
175
175
{
176
- _invocationId = ServiceClientTracing . NextInvocationId . ToString ( ) ;
176
+ invocationId = ServiceClientTracing . NextInvocationId . ToString ( ) ;
177
177
Dictionary < string , object > tracingParameters = new Dictionary < string , object > ( ) ;
178
178
tracingParameters . Add ( "name" , name ) ;
179
179
tracingParameters . Add ( "@namespace" , @namespace ) ;
180
180
tracingParameters . Add ( "ports" , ports ) ;
181
181
tracingParameters . Add ( "webSocketSubProtocol" , webSocketSubProtocol ) ;
182
182
tracingParameters . Add ( "cancellationToken" , cancellationToken ) ;
183
- ServiceClientTracing . Enter ( _invocationId , this , nameof ( WebSocketNamespacedPodPortForwardAsync ) ,
183
+ ServiceClientTracing . Enter ( invocationId , this , nameof ( WebSocketNamespacedPodPortForwardAsync ) ,
184
184
tracingParameters ) ;
185
185
}
186
186
@@ -208,7 +208,7 @@ public Task<WebSocket> WebSocketNamespacedPodPortForwardAsync(string name, strin
208
208
209
209
uriBuilder . Query = q . ToString ( ) ;
210
210
211
- return StreamConnectAsync ( uriBuilder . Uri , _invocationId , webSocketSubProtocol , customHeaders ,
211
+ return StreamConnectAsync ( uriBuilder . Uri , invocationId , webSocketSubProtocol , customHeaders ,
212
212
cancellationToken ) ;
213
213
}
214
214
@@ -229,11 +229,11 @@ public Task<WebSocket> WebSocketNamespacedPodAttachAsync(string name, string @na
229
229
}
230
230
231
231
// Tracing
232
- bool _shouldTrace = ServiceClientTracing . IsEnabled ;
233
- string _invocationId = null ;
234
- if ( _shouldTrace )
232
+ bool shouldTrace = ServiceClientTracing . IsEnabled ;
233
+ string invocationId = null ;
234
+ if ( shouldTrace )
235
235
{
236
- _invocationId = ServiceClientTracing . NextInvocationId . ToString ( ) ;
236
+ invocationId = ServiceClientTracing . NextInvocationId . ToString ( ) ;
237
237
Dictionary < string , object > tracingParameters = new Dictionary < string , object > ( ) ;
238
238
tracingParameters . Add ( "container" , container ) ;
239
239
tracingParameters . Add ( "name" , name ) ;
@@ -244,7 +244,7 @@ public Task<WebSocket> WebSocketNamespacedPodAttachAsync(string name, string @na
244
244
tracingParameters . Add ( "tty" , tty ) ;
245
245
tracingParameters . Add ( "webSocketSubProtol" , webSocketSubProtol ) ;
246
246
tracingParameters . Add ( "cancellationToken" , cancellationToken ) ;
247
- ServiceClientTracing . Enter ( _invocationId , this , nameof ( WebSocketNamespacedPodAttachAsync ) ,
247
+ ServiceClientTracing . Enter ( invocationId , this , nameof ( WebSocketNamespacedPodAttachAsync ) ,
248
248
tracingParameters ) ;
249
249
}
250
250
@@ -268,25 +268,25 @@ public Task<WebSocket> WebSocketNamespacedPodAttachAsync(string name, string @na
268
268
uriBuilder . Query =
269
269
query . ToString ( 1 , query . Length - 1 ) ; // UriBuilder.Query doesn't like leading '?' chars, so trim it
270
270
271
- return StreamConnectAsync ( uriBuilder . Uri , _invocationId , webSocketSubProtol , customHeaders ,
271
+ return StreamConnectAsync ( uriBuilder . Uri , invocationId , webSocketSubProtol , customHeaders ,
272
272
cancellationToken ) ;
273
273
}
274
274
275
275
protected async Task < WebSocket > StreamConnectAsync ( Uri uri , string invocationId = null ,
276
276
string webSocketSubProtocol = null , Dictionary < string , List < string > > customHeaders = null ,
277
277
CancellationToken cancellationToken = default ( CancellationToken ) )
278
278
{
279
- bool _shouldTrace = ServiceClientTracing . IsEnabled ;
279
+ bool shouldTrace = ServiceClientTracing . IsEnabled ;
280
280
281
281
// Create WebSocket transport objects
282
282
WebSocketBuilder webSocketBuilder = this . CreateWebSocketBuilder ( ) ;
283
283
284
284
// Set Headers
285
285
if ( customHeaders != null )
286
286
{
287
- foreach ( var _header in customHeaders )
287
+ foreach ( var header in customHeaders )
288
288
{
289
- webSocketBuilder . SetRequestHeader ( _header . Key , string . Join ( " " , _header . Value ) ) ;
289
+ webSocketBuilder . SetRequestHeader ( header . Key , string . Join ( " " , header . Value ) ) ;
290
290
}
291
291
}
292
292
@@ -306,9 +306,9 @@ protected async Task<WebSocket> StreamConnectAsync(Uri uri, string invocationId
306
306
HttpRequestMessage message = new HttpRequestMessage ( ) ;
307
307
await this . Credentials . ProcessHttpRequestAsync ( message , cancellationToken ) . ConfigureAwait ( false ) ;
308
308
309
- foreach ( var _header in message . Headers )
309
+ foreach ( var header in message . Headers )
310
310
{
311
- webSocketBuilder . SetRequestHeader ( _header . Key , string . Join ( " " , _header . Value ) ) ;
311
+ webSocketBuilder . SetRequestHeader ( header . Key , string . Join ( " " , header . Value ) ) ;
312
312
}
313
313
}
314
314
@@ -392,7 +392,7 @@ wse.InnerException is WebSocketException &&
392
392
}
393
393
catch ( Exception ex )
394
394
{
395
- if ( _shouldTrace )
395
+ if ( shouldTrace )
396
396
{
397
397
ServiceClientTracing . Error ( invocationId , ex ) ;
398
398
}
@@ -401,7 +401,7 @@ wse.InnerException is WebSocketException &&
401
401
}
402
402
finally
403
403
{
404
- if ( _shouldTrace )
404
+ if ( shouldTrace )
405
405
{
406
406
ServiceClientTracing . Exit ( invocationId , null ) ;
407
407
}
0 commit comments