From 9a62c9dfe07ac22d868672cbfd09297cbb507aaf Mon Sep 17 00:00:00 2001
From: pshao25 <97225342+pshao25@users.noreply.github.com>
Date: Mon, 24 Jul 2023 10:30:54 +0800
Subject: [PATCH 1/4] Handle ambiguity
---
.../Output/OperationMethodChainBuilder.cs | 24 +-
.../src/Generated/AccessibilityClient.cs | 8 +-
.../Generated/Docs/AccessibilityClient.xml | 8 +-
.../Samples/Samples_AccessibilityClient.cs | 8 +-
.../src/Generated/AccessibilityClient.cs | 8 +-
.../Generated/Docs/AccessibilityClient.xml | 8 +-
.../Samples/Samples_AccessibilityClient.cs | 8 +-
.../src/Generated/AccessibilityClient.cs | 8 +-
.../Generated/Docs/AccessibilityClient.xml | 8 +-
.../Samples/Samples_AccessibilityClient.cs | 8 +-
.../Docs/MatchConditionCollapseClient.xml | 24 +-
.../src/Generated/Docs/NonCollapseClient.xml | 48 +++-
.../Docs/RequestConditionCollapseClient.xml | 24 +-
.../Generated/MatchConditionCollapseClient.cs | 4 +-
.../src/Generated/NonCollapseClient.cs | 8 +-
.../RequestConditionCollapseClient.cs | 4 +-
.../Samples_MatchConditionCollapseClient.cs | 8 +-
.../Samples/Samples_NonCollapseClient.cs | 16 +-
.../Samples_RequestConditionCollapseClient.cs | 8 +-
.../src/Generated/ConvenienceInCadlClient.cs | 96 +++-----
.../Docs/ConvenienceInCadlClient.xml | 40 ++--
.../Samples_ConvenienceInCadlClient.cs | 24 +-
.../Docs/ParametersLowlevelClient.xml | 32 +--
.../src/Generated/ParametersLowlevelClient.cs | 12 +-
.../Samples_ParametersLowlevelClient.cs | 24 +-
.../Generated/FirstTemplateRestClient.cs | 4 +-
.../src/Generated/Docs/StringClient.xml | 8 +-
.../body-string/src/Generated/StringClient.cs | 4 +-
.../Generated/Samples/Samples_StringClient.cs | 8 +-
.../src/Generated/Docs/LRORetrysClient.xml | 32 +--
.../lro/src/Generated/Docs/LROsClient.xml | 216 +++++++++---------
.../Generated/Docs/LROsCustomHeaderClient.xml | 32 +--
.../lro/src/Generated/Docs/LrosaDsClient.xml | 144 ++++++------
.../lro/src/Generated/LRORetrysClient.cs | 16 +-
.../lro/src/Generated/LROsClient.cs | 108 ++++-----
.../src/Generated/LROsCustomHeaderClient.cs | 16 +-
.../lro/src/Generated/LrosaDsClient.cs | 72 +++---
.../Samples/Samples_LRORetrysClient.cs | 32 +--
.../Generated/Samples/Samples_LROsClient.cs | 216 +++++++++---------
.../Samples/Samples_LROsCustomHeaderClient.cs | 32 +--
.../Samples/Samples_LrosaDsClient.cs | 144 ++++++------
.../src/Generated/Docs/MediaTypesClient.xml | 16 +-
.../src/Generated/MediaTypesClient.cs | 12 +-
.../Samples/Samples_MediaTypesClient.cs | 24 +-
44 files changed, 818 insertions(+), 786 deletions(-)
diff --git a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs
index 4eb6fc54220..ded71234e56 100644
--- a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs
+++ b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs
@@ -118,7 +118,14 @@ private bool IsConvenienceMethodMeaningful()
private bool HasAmbiguityBetweenProtocolAndConvenience()
{
- return _orderedParameters.Where(parameter => parameter.Convenience != KnownParameters.CancellationTokenParameter).All(parameter => IsParameterTypeHasValueOverlap(parameter.Convenience, parameter.Protocol));
+ var userDefinedParameters = _orderedParameters.Where(parameter => parameter.Convenience != KnownParameters.CancellationTokenParameter);
+ int protocolRequired = userDefinedParameters.Select(p => p.Protocol).WhereNotNull().Where(p => !p.IsOptionalInSignature).Count();
+ int convenienceRequired = userDefinedParameters.Select(p => p.Convenience).WhereNotNull().Where(p => !p.IsOptionalInSignature).Count();
+ if (protocolRequired != convenienceRequired)
+ {
+ return false;
+ }
+ return userDefinedParameters.Where(p => p.Protocol != null && !p.Protocol.IsOptionalInSignature).All(parameter => IsParameterTypeSame(parameter.Convenience, parameter.Protocol));
}
private bool ShouldRequestContextOptional()
@@ -150,21 +157,6 @@ private bool IsParameterTypeSame(Parameter? first, Parameter? second)
return object.Equals(first?.Type, second?.Type);
}
- private bool IsParameterTypeHasValueOverlap(Parameter? first, Parameter? second)
- {
- if (IsParameterTypeSame(first, second))
- {
- return true;
- }
-
- if (first != null && second != null && first.Type.IsNullable && second.Type.IsNullable)
- {
- return true;
- }
-
- return false;
- }
-
private ReturnTypeChain BuildReturnTypes()
{
var operationBodyTypes = Operation.Responses.Where(r => !r.IsErrorResponse).Select(r => r.BodyType).Distinct().ToArray();
diff --git a/test/TestProjects/Accessibility-LowLevel-NoAuth/src/Generated/AccessibilityClient.cs b/test/TestProjects/Accessibility-LowLevel-NoAuth/src/Generated/AccessibilityClient.cs
index 4acd05b8378..591efccd083 100644
--- a/test/TestProjects/Accessibility-LowLevel-NoAuth/src/Generated/AccessibilityClient.cs
+++ b/test/TestProjects/Accessibility-LowLevel-NoAuth/src/Generated/AccessibilityClient.cs
@@ -60,7 +60,7 @@ public AccessibilityClient(Uri endpoint, AccessibilityClientOptions options)
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual async Task OperationAsync(RequestContent content, RequestContext context)
+ public virtual async Task OperationAsync(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("AccessibilityClient.Operation");
scope.Start();
@@ -91,7 +91,7 @@ public virtual async Task OperationAsync(RequestContent content, Reque
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual Response Operation(RequestContent content, RequestContext context)
+ public virtual Response Operation(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("AccessibilityClient.Operation");
scope.Start();
@@ -122,7 +122,7 @@ public virtual Response Operation(RequestContent content, RequestContext context
/// Service returned a non-success status code.
/// The response returned from the service.
///
- internal virtual async Task OperationInternalAsync(RequestContent content, RequestContext context)
+ internal virtual async Task OperationInternalAsync(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("AccessibilityClient.OperationInternal");
scope.Start();
@@ -153,7 +153,7 @@ internal virtual async Task OperationInternalAsync(RequestContent cont
/// Service returned a non-success status code.
/// The response returned from the service.
///
- internal virtual Response OperationInternal(RequestContent content, RequestContext context)
+ internal virtual Response OperationInternal(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("AccessibilityClient.OperationInternal");
scope.Start();
diff --git a/test/TestProjects/Accessibility-LowLevel-NoAuth/src/Generated/Docs/AccessibilityClient.xml b/test/TestProjects/Accessibility-LowLevel-NoAuth/src/Generated/Docs/AccessibilityClient.xml
index df7752b2e50..eda969abdec 100644
--- a/test/TestProjects/Accessibility-LowLevel-NoAuth/src/Generated/Docs/AccessibilityClient.xml
+++ b/test/TestProjects/Accessibility-LowLevel-NoAuth/src/Generated/Docs/AccessibilityClient.xml
@@ -3,26 +3,26 @@
-This sample shows how to call OperationAsync with required parameters and request content.
+This sample shows how to call OperationAsync with required request content.
";
-Response response = await client.OperationAsync(RequestContent.Create(data), new RequestContext());
+Response response = await client.OperationAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
]]>
-This sample shows how to call Operation with required parameters and request content.
+This sample shows how to call Operation with required request content.
";
-Response response = client.Operation(RequestContent.Create(data), new RequestContext());
+Response response = client.Operation(RequestContent.Create(data));
Console.WriteLine(response.Status);
]]>
diff --git a/test/TestProjects/Accessibility-LowLevel-NoAuth/tests/Generated/Samples/Samples_AccessibilityClient.cs b/test/TestProjects/Accessibility-LowLevel-NoAuth/tests/Generated/Samples/Samples_AccessibilityClient.cs
index ea360eb0ddc..e4db01b1f11 100644
--- a/test/TestProjects/Accessibility-LowLevel-NoAuth/tests/Generated/Samples/Samples_AccessibilityClient.cs
+++ b/test/TestProjects/Accessibility-LowLevel-NoAuth/tests/Generated/Samples/Samples_AccessibilityClient.cs
@@ -27,7 +27,7 @@ public void Example_Operation()
var data = "";
- Response response = client.Operation(RequestContent.Create(data), new RequestContext());
+ Response response = client.Operation(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -39,7 +39,7 @@ public void Example_Operation_AllParameters()
var data = "";
- Response response = client.Operation(RequestContent.Create(data), new RequestContext());
+ Response response = client.Operation(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -51,7 +51,7 @@ public async Task Example_Operation_Async()
var data = "";
- Response response = await client.OperationAsync(RequestContent.Create(data), new RequestContext());
+ Response response = await client.OperationAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -63,7 +63,7 @@ public async Task Example_Operation_AllParameters_Async()
var data = "";
- Response response = await client.OperationAsync(RequestContent.Create(data), new RequestContext());
+ Response response = await client.OperationAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
}
diff --git a/test/TestProjects/Accessibility-LowLevel-TokenAuth/src/Generated/AccessibilityClient.cs b/test/TestProjects/Accessibility-LowLevel-TokenAuth/src/Generated/AccessibilityClient.cs
index 414707e4d11..d8510552e58 100644
--- a/test/TestProjects/Accessibility-LowLevel-TokenAuth/src/Generated/AccessibilityClient.cs
+++ b/test/TestProjects/Accessibility-LowLevel-TokenAuth/src/Generated/AccessibilityClient.cs
@@ -72,7 +72,7 @@ public AccessibilityClient(TokenCredential credential, Uri endpoint, Accessibili
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual async Task OperationAsync(RequestContent content, RequestContext context)
+ public virtual async Task OperationAsync(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("AccessibilityClient.Operation");
scope.Start();
@@ -103,7 +103,7 @@ public virtual async Task OperationAsync(RequestContent content, Reque
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual Response Operation(RequestContent content, RequestContext context)
+ public virtual Response Operation(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("AccessibilityClient.Operation");
scope.Start();
@@ -134,7 +134,7 @@ public virtual Response Operation(RequestContent content, RequestContext context
/// Service returned a non-success status code.
/// The response returned from the service.
///
- internal virtual async Task OperationInternalAsync(RequestContent content, RequestContext context)
+ internal virtual async Task OperationInternalAsync(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("AccessibilityClient.OperationInternal");
scope.Start();
@@ -165,7 +165,7 @@ internal virtual async Task OperationInternalAsync(RequestContent cont
/// Service returned a non-success status code.
/// The response returned from the service.
///
- internal virtual Response OperationInternal(RequestContent content, RequestContext context)
+ internal virtual Response OperationInternal(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("AccessibilityClient.OperationInternal");
scope.Start();
diff --git a/test/TestProjects/Accessibility-LowLevel-TokenAuth/src/Generated/Docs/AccessibilityClient.xml b/test/TestProjects/Accessibility-LowLevel-TokenAuth/src/Generated/Docs/AccessibilityClient.xml
index cbd4d79b4dc..6c0bff7f08b 100644
--- a/test/TestProjects/Accessibility-LowLevel-TokenAuth/src/Generated/Docs/AccessibilityClient.xml
+++ b/test/TestProjects/Accessibility-LowLevel-TokenAuth/src/Generated/Docs/AccessibilityClient.xml
@@ -3,28 +3,28 @@
-This sample shows how to call OperationAsync with required parameters and request content.
+This sample shows how to call OperationAsync with required request content.
";
-Response response = await client.OperationAsync(RequestContent.Create(data), new RequestContext());
+Response response = await client.OperationAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
]]>
-This sample shows how to call Operation with required parameters and request content.
+This sample shows how to call Operation with required request content.
";
-Response response = client.Operation(RequestContent.Create(data), new RequestContext());
+Response response = client.Operation(RequestContent.Create(data));
Console.WriteLine(response.Status);
]]>
diff --git a/test/TestProjects/Accessibility-LowLevel-TokenAuth/tests/Generated/Samples/Samples_AccessibilityClient.cs b/test/TestProjects/Accessibility-LowLevel-TokenAuth/tests/Generated/Samples/Samples_AccessibilityClient.cs
index e6cade9e1eb..6dd2a750215 100644
--- a/test/TestProjects/Accessibility-LowLevel-TokenAuth/tests/Generated/Samples/Samples_AccessibilityClient.cs
+++ b/test/TestProjects/Accessibility-LowLevel-TokenAuth/tests/Generated/Samples/Samples_AccessibilityClient.cs
@@ -28,7 +28,7 @@ public void Example_Operation()
var data = "";
- Response response = client.Operation(RequestContent.Create(data), new RequestContext());
+ Response response = client.Operation(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -41,7 +41,7 @@ public void Example_Operation_AllParameters()
var data = "";
- Response response = client.Operation(RequestContent.Create(data), new RequestContext());
+ Response response = client.Operation(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -54,7 +54,7 @@ public async Task Example_Operation_Async()
var data = "";
- Response response = await client.OperationAsync(RequestContent.Create(data), new RequestContext());
+ Response response = await client.OperationAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -67,7 +67,7 @@ public async Task Example_Operation_AllParameters_Async()
var data = "";
- Response response = await client.OperationAsync(RequestContent.Create(data), new RequestContext());
+ Response response = await client.OperationAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
}
diff --git a/test/TestProjects/Accessibility-LowLevel/src/Generated/AccessibilityClient.cs b/test/TestProjects/Accessibility-LowLevel/src/Generated/AccessibilityClient.cs
index d11df3702b5..9da436f2904 100644
--- a/test/TestProjects/Accessibility-LowLevel/src/Generated/AccessibilityClient.cs
+++ b/test/TestProjects/Accessibility-LowLevel/src/Generated/AccessibilityClient.cs
@@ -72,7 +72,7 @@ public AccessibilityClient(AzureKeyCredential credential, Uri endpoint, Accessib
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual async Task OperationAsync(RequestContent content, RequestContext context)
+ public virtual async Task OperationAsync(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("AccessibilityClient.Operation");
scope.Start();
@@ -103,7 +103,7 @@ public virtual async Task OperationAsync(RequestContent content, Reque
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual Response Operation(RequestContent content, RequestContext context)
+ public virtual Response Operation(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("AccessibilityClient.Operation");
scope.Start();
@@ -134,7 +134,7 @@ public virtual Response Operation(RequestContent content, RequestContext context
/// Service returned a non-success status code.
/// The response returned from the service.
///
- internal virtual async Task OperationInternalAsync(RequestContent content, RequestContext context)
+ internal virtual async Task OperationInternalAsync(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("AccessibilityClient.OperationInternal");
scope.Start();
@@ -165,7 +165,7 @@ internal virtual async Task OperationInternalAsync(RequestContent cont
/// Service returned a non-success status code.
/// The response returned from the service.
///
- internal virtual Response OperationInternal(RequestContent content, RequestContext context)
+ internal virtual Response OperationInternal(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("AccessibilityClient.OperationInternal");
scope.Start();
diff --git a/test/TestProjects/Accessibility-LowLevel/src/Generated/Docs/AccessibilityClient.xml b/test/TestProjects/Accessibility-LowLevel/src/Generated/Docs/AccessibilityClient.xml
index 616ac92853f..164728de8b1 100644
--- a/test/TestProjects/Accessibility-LowLevel/src/Generated/Docs/AccessibilityClient.xml
+++ b/test/TestProjects/Accessibility-LowLevel/src/Generated/Docs/AccessibilityClient.xml
@@ -3,28 +3,28 @@
-This sample shows how to call OperationAsync with required parameters and request content.
+This sample shows how to call OperationAsync with required request content.
");
var client = new AccessibilityClient(credential);
var data = "";
-Response response = await client.OperationAsync(RequestContent.Create(data), new RequestContext());
+Response response = await client.OperationAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
]]>
-This sample shows how to call Operation with required parameters and request content.
+This sample shows how to call Operation with required request content.
");
var client = new AccessibilityClient(credential);
var data = "";
-Response response = client.Operation(RequestContent.Create(data), new RequestContext());
+Response response = client.Operation(RequestContent.Create(data));
Console.WriteLine(response.Status);
]]>
diff --git a/test/TestProjects/Accessibility-LowLevel/tests/Generated/Samples/Samples_AccessibilityClient.cs b/test/TestProjects/Accessibility-LowLevel/tests/Generated/Samples/Samples_AccessibilityClient.cs
index 4397579e085..83c3cca78f8 100644
--- a/test/TestProjects/Accessibility-LowLevel/tests/Generated/Samples/Samples_AccessibilityClient.cs
+++ b/test/TestProjects/Accessibility-LowLevel/tests/Generated/Samples/Samples_AccessibilityClient.cs
@@ -28,7 +28,7 @@ public void Example_Operation()
var data = "";
- Response response = client.Operation(RequestContent.Create(data), new RequestContext());
+ Response response = client.Operation(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -41,7 +41,7 @@ public void Example_Operation_AllParameters()
var data = "";
- Response response = client.Operation(RequestContent.Create(data), new RequestContext());
+ Response response = client.Operation(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -54,7 +54,7 @@ public async Task Example_Operation_Async()
var data = "";
- Response response = await client.OperationAsync(RequestContent.Create(data), new RequestContext());
+ Response response = await client.OperationAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -67,7 +67,7 @@ public async Task Example_Operation_AllParameters_Async()
var data = "";
- Response response = await client.OperationAsync(RequestContent.Create(data), new RequestContext());
+ Response response = await client.OperationAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
}
diff --git a/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/Docs/MatchConditionCollapseClient.xml b/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/Docs/MatchConditionCollapseClient.xml
index 334a473e29d..4ca67f9ca0b 100644
--- a/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/Docs/MatchConditionCollapseClient.xml
+++ b/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/Docs/MatchConditionCollapseClient.xml
@@ -50,7 +50,17 @@ var client = new MatchConditionCollapseClient(credential);
var data = "";
-Response response = await client.CollapsePutAsync(RequestContent.Create(data), new MatchConditions { IfMatch = new ETag("") }, new RequestContext());
+Response response = await client.CollapsePutAsync(RequestContent.Create(data));
+Console.WriteLine(response.Status);
+]]>
+This sample shows how to call CollapsePutAsync with all parameters and request content.
+");
+var client = new MatchConditionCollapseClient(credential);
+
+var data = "";
+
+Response response = await client.CollapsePutAsync(RequestContent.Create(data), new MatchConditions { IfMatch = new ETag("") });
Console.WriteLine(response.Status);
]]>
@@ -64,7 +74,17 @@ var client = new MatchConditionCollapseClient(credential);
var data = "";
-Response response = client.CollapsePut(RequestContent.Create(data), new MatchConditions { IfMatch = new ETag("") }, new RequestContext());
+Response response = client.CollapsePut(RequestContent.Create(data));
+Console.WriteLine(response.Status);
+]]>
+This sample shows how to call CollapsePut with all parameters and request content.
+");
+var client = new MatchConditionCollapseClient(credential);
+
+var data = "";
+
+Response response = client.CollapsePut(RequestContent.Create(data), new MatchConditions { IfMatch = new ETag("") });
Console.WriteLine(response.Status);
]]>
diff --git a/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/Docs/NonCollapseClient.xml b/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/Docs/NonCollapseClient.xml
index beb88f0d582..a5e9841cf49 100644
--- a/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/Docs/NonCollapseClient.xml
+++ b/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/Docs/NonCollapseClient.xml
@@ -10,7 +10,17 @@ var client = new NonCollapseClient(credential);
var data = "";
-Response response = await client.IfMatchPutAsync(RequestContent.Create(data), null, new RequestContext());
+Response response = await client.IfMatchPutAsync(RequestContent.Create(data));
+Console.WriteLine(response.Status);
+]]>
+This sample shows how to call IfMatchPutAsync with all parameters and request content.
+");
+var client = new NonCollapseClient(credential);
+
+var data = "";
+
+Response response = await client.IfMatchPutAsync(RequestContent.Create(data), null);
Console.WriteLine(response.Status);
]]>
@@ -24,7 +34,17 @@ var client = new NonCollapseClient(credential);
var data = "";
-Response response = client.IfMatchPut(RequestContent.Create(data), null, new RequestContext());
+Response response = client.IfMatchPut(RequestContent.Create(data));
+Console.WriteLine(response.Status);
+]]>
+This sample shows how to call IfMatchPut with all parameters and request content.
+");
+var client = new NonCollapseClient(credential);
+
+var data = "";
+
+Response response = client.IfMatchPut(RequestContent.Create(data), null);
Console.WriteLine(response.Status);
]]>
@@ -38,7 +58,17 @@ var client = new NonCollapseClient(credential);
var data = "";
-Response response = await client.IfNoneMatchPutAsync(RequestContent.Create(data), null, new RequestContext());
+Response response = await client.IfNoneMatchPutAsync(RequestContent.Create(data));
+Console.WriteLine(response.Status);
+]]>
+This sample shows how to call IfNoneMatchPutAsync with all parameters and request content.
+");
+var client = new NonCollapseClient(credential);
+
+var data = "";
+
+Response response = await client.IfNoneMatchPutAsync(RequestContent.Create(data), null);
Console.WriteLine(response.Status);
]]>
@@ -52,7 +82,17 @@ var client = new NonCollapseClient(credential);
var data = "";
-Response response = client.IfNoneMatchPut(RequestContent.Create(data), null, new RequestContext());
+Response response = client.IfNoneMatchPut(RequestContent.Create(data));
+Console.WriteLine(response.Status);
+]]>
+This sample shows how to call IfNoneMatchPut with all parameters and request content.
+");
+var client = new NonCollapseClient(credential);
+
+var data = "";
+
+Response response = client.IfNoneMatchPut(RequestContent.Create(data), null);
Console.WriteLine(response.Status);
]]>
diff --git a/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/Docs/RequestConditionCollapseClient.xml b/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/Docs/RequestConditionCollapseClient.xml
index 1f5961aa69e..6dd0bff02a0 100644
--- a/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/Docs/RequestConditionCollapseClient.xml
+++ b/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/Docs/RequestConditionCollapseClient.xml
@@ -10,7 +10,17 @@ var client = new RequestConditionCollapseClient(credential);
var data = "";
-Response response = await client.CollapsePutAsync(RequestContent.Create(data), null, new RequestContext());
+Response response = await client.CollapsePutAsync(RequestContent.Create(data));
+Console.WriteLine(response.Status);
+]]>
+This sample shows how to call CollapsePutAsync with all parameters and request content.
+");
+var client = new RequestConditionCollapseClient(credential);
+
+var data = "";
+
+Response response = await client.CollapsePutAsync(RequestContent.Create(data), null);
Console.WriteLine(response.Status);
]]>
@@ -24,7 +34,17 @@ var client = new RequestConditionCollapseClient(credential);
var data = "";
-Response response = client.CollapsePut(RequestContent.Create(data), null, new RequestContext());
+Response response = client.CollapsePut(RequestContent.Create(data));
+Console.WriteLine(response.Status);
+]]>
+This sample shows how to call CollapsePut with all parameters and request content.
+");
+var client = new RequestConditionCollapseClient(credential);
+
+var data = "";
+
+Response response = client.CollapsePut(RequestContent.Create(data), null);
Console.WriteLine(response.Status);
]]>
diff --git a/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/MatchConditionCollapseClient.cs b/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/MatchConditionCollapseClient.cs
index 01b64b35203..e31d08cbc43 100644
--- a/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/MatchConditionCollapseClient.cs
+++ b/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/MatchConditionCollapseClient.cs
@@ -137,7 +137,7 @@ public virtual Response CollapseGetWithHead(string otherHeader = null, MatchCond
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual async Task CollapsePutAsync(RequestContent content, MatchConditions matchConditions, RequestContext context)
+ public virtual async Task CollapsePutAsync(RequestContent content, MatchConditions matchConditions = null, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("MatchConditionCollapseClient.CollapsePut");
scope.Start();
@@ -169,7 +169,7 @@ public virtual async Task CollapsePutAsync(RequestContent content, Mat
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual Response CollapsePut(RequestContent content, MatchConditions matchConditions, RequestContext context)
+ public virtual Response CollapsePut(RequestContent content, MatchConditions matchConditions = null, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("MatchConditionCollapseClient.CollapsePut");
scope.Start();
diff --git a/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/NonCollapseClient.cs b/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/NonCollapseClient.cs
index 0725db57683..f082757096d 100644
--- a/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/NonCollapseClient.cs
+++ b/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/NonCollapseClient.cs
@@ -73,7 +73,7 @@ public NonCollapseClient(AzureKeyCredential credential, Uri endpoint, CollapseRe
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual async Task IfMatchPutAsync(RequestContent content, ETag? ifMatch, RequestContext context)
+ public virtual async Task IfMatchPutAsync(RequestContent content, ETag? ifMatch = null, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("NonCollapseClient.IfMatchPut");
scope.Start();
@@ -105,7 +105,7 @@ public virtual async Task IfMatchPutAsync(RequestContent content, ETag
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual Response IfMatchPut(RequestContent content, ETag? ifMatch, RequestContext context)
+ public virtual Response IfMatchPut(RequestContent content, ETag? ifMatch = null, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("NonCollapseClient.IfMatchPut");
scope.Start();
@@ -137,7 +137,7 @@ public virtual Response IfMatchPut(RequestContent content, ETag? ifMatch, Reques
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual async Task IfNoneMatchPutAsync(RequestContent content, ETag? ifNoneMatch, RequestContext context)
+ public virtual async Task IfNoneMatchPutAsync(RequestContent content, ETag? ifNoneMatch = null, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("NonCollapseClient.IfNoneMatchPut");
scope.Start();
@@ -169,7 +169,7 @@ public virtual async Task IfNoneMatchPutAsync(RequestContent content,
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual Response IfNoneMatchPut(RequestContent content, ETag? ifNoneMatch, RequestContext context)
+ public virtual Response IfNoneMatchPut(RequestContent content, ETag? ifNoneMatch = null, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("NonCollapseClient.IfNoneMatchPut");
scope.Start();
diff --git a/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/RequestConditionCollapseClient.cs b/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/RequestConditionCollapseClient.cs
index 29ddcb2c172..be69eabb3bb 100644
--- a/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/RequestConditionCollapseClient.cs
+++ b/test/TestProjects/CollapseRequestCondition-LowLevel/src/Generated/RequestConditionCollapseClient.cs
@@ -73,7 +73,7 @@ public RequestConditionCollapseClient(AzureKeyCredential credential, Uri endpoin
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual async Task CollapsePutAsync(RequestContent content, RequestConditions requestConditions, RequestContext context)
+ public virtual async Task CollapsePutAsync(RequestContent content, RequestConditions requestConditions = null, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("RequestConditionCollapseClient.CollapsePut");
scope.Start();
@@ -105,7 +105,7 @@ public virtual async Task CollapsePutAsync(RequestContent content, Req
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual Response CollapsePut(RequestContent content, RequestConditions requestConditions, RequestContext context)
+ public virtual Response CollapsePut(RequestContent content, RequestConditions requestConditions = null, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("RequestConditionCollapseClient.CollapsePut");
scope.Start();
diff --git a/test/TestProjects/CollapseRequestCondition-LowLevel/tests/Generated/Samples/Samples_MatchConditionCollapseClient.cs b/test/TestProjects/CollapseRequestCondition-LowLevel/tests/Generated/Samples/Samples_MatchConditionCollapseClient.cs
index c3045f4f9ba..98b76f686d0 100644
--- a/test/TestProjects/CollapseRequestCondition-LowLevel/tests/Generated/Samples/Samples_MatchConditionCollapseClient.cs
+++ b/test/TestProjects/CollapseRequestCondition-LowLevel/tests/Generated/Samples/Samples_MatchConditionCollapseClient.cs
@@ -72,7 +72,7 @@ public void Example_CollapsePut()
var data = "";
- Response response = client.CollapsePut(RequestContent.Create(data), new MatchConditions { IfMatch = new ETag("") }, new RequestContext());
+ Response response = client.CollapsePut(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -85,7 +85,7 @@ public void Example_CollapsePut_AllParameters()
var data = "";
- Response response = client.CollapsePut(RequestContent.Create(data), new MatchConditions { IfMatch = new ETag("") }, new RequestContext());
+ Response response = client.CollapsePut(RequestContent.Create(data), new MatchConditions { IfMatch = new ETag("") });
Console.WriteLine(response.Status);
}
@@ -98,7 +98,7 @@ public async Task Example_CollapsePut_Async()
var data = "";
- Response response = await client.CollapsePutAsync(RequestContent.Create(data), new MatchConditions { IfMatch = new ETag("") }, new RequestContext());
+ Response response = await client.CollapsePutAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -111,7 +111,7 @@ public async Task Example_CollapsePut_AllParameters_Async()
var data = "";
- Response response = await client.CollapsePutAsync(RequestContent.Create(data), new MatchConditions { IfMatch = new ETag("") }, new RequestContext());
+ Response response = await client.CollapsePutAsync(RequestContent.Create(data), new MatchConditions { IfMatch = new ETag("") });
Console.WriteLine(response.Status);
}
diff --git a/test/TestProjects/CollapseRequestCondition-LowLevel/tests/Generated/Samples/Samples_NonCollapseClient.cs b/test/TestProjects/CollapseRequestCondition-LowLevel/tests/Generated/Samples/Samples_NonCollapseClient.cs
index 938ed3a2f03..17b7437678b 100644
--- a/test/TestProjects/CollapseRequestCondition-LowLevel/tests/Generated/Samples/Samples_NonCollapseClient.cs
+++ b/test/TestProjects/CollapseRequestCondition-LowLevel/tests/Generated/Samples/Samples_NonCollapseClient.cs
@@ -28,7 +28,7 @@ public void Example_IfMatchPut()
var data = "";
- Response response = client.IfMatchPut(RequestContent.Create(data), null, new RequestContext());
+ Response response = client.IfMatchPut(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -41,7 +41,7 @@ public void Example_IfMatchPut_AllParameters()
var data = "";
- Response response = client.IfMatchPut(RequestContent.Create(data), null, new RequestContext());
+ Response response = client.IfMatchPut(RequestContent.Create(data), null);
Console.WriteLine(response.Status);
}
@@ -54,7 +54,7 @@ public async Task Example_IfMatchPut_Async()
var data = "";
- Response response = await client.IfMatchPutAsync(RequestContent.Create(data), null, new RequestContext());
+ Response response = await client.IfMatchPutAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -67,7 +67,7 @@ public async Task Example_IfMatchPut_AllParameters_Async()
var data = "";
- Response response = await client.IfMatchPutAsync(RequestContent.Create(data), null, new RequestContext());
+ Response response = await client.IfMatchPutAsync(RequestContent.Create(data), null);
Console.WriteLine(response.Status);
}
@@ -80,7 +80,7 @@ public void Example_IfNoneMatchPut()
var data = "";
- Response response = client.IfNoneMatchPut(RequestContent.Create(data), null, new RequestContext());
+ Response response = client.IfNoneMatchPut(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -93,7 +93,7 @@ public void Example_IfNoneMatchPut_AllParameters()
var data = "";
- Response response = client.IfNoneMatchPut(RequestContent.Create(data), null, new RequestContext());
+ Response response = client.IfNoneMatchPut(RequestContent.Create(data), null);
Console.WriteLine(response.Status);
}
@@ -106,7 +106,7 @@ public async Task Example_IfNoneMatchPut_Async()
var data = "";
- Response response = await client.IfNoneMatchPutAsync(RequestContent.Create(data), null, new RequestContext());
+ Response response = await client.IfNoneMatchPutAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -119,7 +119,7 @@ public async Task Example_IfNoneMatchPut_AllParameters_Async()
var data = "";
- Response response = await client.IfNoneMatchPutAsync(RequestContent.Create(data), null, new RequestContext());
+ Response response = await client.IfNoneMatchPutAsync(RequestContent.Create(data), null);
Console.WriteLine(response.Status);
}
}
diff --git a/test/TestProjects/CollapseRequestCondition-LowLevel/tests/Generated/Samples/Samples_RequestConditionCollapseClient.cs b/test/TestProjects/CollapseRequestCondition-LowLevel/tests/Generated/Samples/Samples_RequestConditionCollapseClient.cs
index ef234613af6..f0d51525bd6 100644
--- a/test/TestProjects/CollapseRequestCondition-LowLevel/tests/Generated/Samples/Samples_RequestConditionCollapseClient.cs
+++ b/test/TestProjects/CollapseRequestCondition-LowLevel/tests/Generated/Samples/Samples_RequestConditionCollapseClient.cs
@@ -28,7 +28,7 @@ public void Example_CollapsePut()
var data = "";
- Response response = client.CollapsePut(RequestContent.Create(data), null, new RequestContext());
+ Response response = client.CollapsePut(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -41,7 +41,7 @@ public void Example_CollapsePut_AllParameters()
var data = "";
- Response response = client.CollapsePut(RequestContent.Create(data), null, new RequestContext());
+ Response response = client.CollapsePut(RequestContent.Create(data), null);
Console.WriteLine(response.Status);
}
@@ -54,7 +54,7 @@ public async Task Example_CollapsePut_Async()
var data = "";
- Response response = await client.CollapsePutAsync(RequestContent.Create(data), null, new RequestContext());
+ Response response = await client.CollapsePutAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -67,7 +67,7 @@ public async Task Example_CollapsePut_AllParameters_Async()
var data = "";
- Response response = await client.CollapsePutAsync(RequestContent.Create(data), null, new RequestContext());
+ Response response = await client.CollapsePutAsync(RequestContent.Create(data), null);
Console.WriteLine(response.Status);
}
diff --git a/test/TestProjects/ConvenienceUpdate-TypeSpec/src/Generated/ConvenienceInCadlClient.cs b/test/TestProjects/ConvenienceUpdate-TypeSpec/src/Generated/ConvenienceInCadlClient.cs
index 66804c79af5..5031cecf264 100644
--- a/test/TestProjects/ConvenienceUpdate-TypeSpec/src/Generated/ConvenienceInCadlClient.cs
+++ b/test/TestProjects/ConvenienceUpdate-TypeSpec/src/Generated/ConvenienceInCadlClient.cs
@@ -387,7 +387,7 @@ public virtual Response NoConvenienceRequiredBody(RequestContent content, Reques
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual async Task NoConvenienceOptionalBodyAsync(RequestContent content, RequestContext context)
+ public virtual async Task NoConvenienceOptionalBodyAsync(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("ConvenienceInCadlClient.NoConvenienceOptionalBody");
scope.Start();
@@ -418,7 +418,7 @@ public virtual async Task NoConvenienceOptionalBodyAsync(RequestConten
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual Response NoConvenienceOptionalBody(RequestContent content, RequestContext context)
+ public virtual Response NoConvenienceOptionalBody(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("ConvenienceInCadlClient.NoConvenienceOptionalBody");
scope.Start();
@@ -1095,43 +1095,23 @@ public virtual Response ProtocolRequiredQuery(int required, RequestContext conte
/// Initial operation only has protocol method with optional model parameter. In the updated version, we add the convenience method.
/// The Model to use.
/// The cancellation token to use.
- ///
- public virtual async Task ProtocolOptionalModelValueAsync(Model optional = null, CancellationToken cancellationToken = default)
+ ///
+ public virtual async Task ProtocolOptionalModelAsync(Model optional = null, CancellationToken cancellationToken = default)
{
- using var scope = ClientDiagnostics.CreateScope("ConvenienceInCadlClient.ProtocolOptionalModelValue");
- scope.Start();
- try
- {
- RequestContext context = FromCancellationToken(cancellationToken);
- Response response = await ProtocolOptionalModelAsync(optional?.ToRequestContent(), context).ConfigureAwait(false);
- return response;
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await ProtocolOptionalModelAsync(optional?.ToRequestContent(), context).ConfigureAwait(false);
+ return response;
}
/// Initial operation only has protocol method with optional model parameter. In the updated version, we add the convenience method.
/// The Model to use.
/// The cancellation token to use.
- ///
- public virtual Response ProtocolOptionalModelValue(Model optional = null, CancellationToken cancellationToken = default)
+ ///
+ public virtual Response ProtocolOptionalModel(Model optional = null, CancellationToken cancellationToken = default)
{
- using var scope = ClientDiagnostics.CreateScope("ConvenienceInCadlClient.ProtocolOptionalModelValue");
- scope.Start();
- try
- {
- RequestContext context = FromCancellationToken(cancellationToken);
- Response response = ProtocolOptionalModel(optional?.ToRequestContent(), context);
- return response;
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = ProtocolOptionalModel(optional?.ToRequestContent(), context);
+ return response;
}
///
@@ -1144,7 +1124,7 @@ public virtual Response ProtocolOptionalModelValue(Model optional = null, Cancel
///
/// -
///
- /// Please try the simpler convenience overload with strongly typed models first.
+ /// Please try the simpler convenience overload with strongly typed models first.
///
///
///
@@ -1180,7 +1160,7 @@ public virtual async Task ProtocolOptionalModelAsync(RequestContent co
///
/// -
///
- /// Please try the simpler convenience overload with strongly typed models first.
+ /// Please try the simpler convenience overload with strongly typed models first.
///
///
///
@@ -1731,43 +1711,23 @@ public virtual Response ConvenienceRequiredQueryWithRequired(int required, Reque
/// Operation has protocol method with optional body parameter and optional RequestContext and convenience method.
/// The Model to use.
/// The cancellation token to use.
- ///
- public virtual async Task ConvenienceOptionalModelWithOptionalValueAsync(Model optional = null, CancellationToken cancellationToken = default)
+ ///
+ public virtual async Task ConvenienceOptionalModelWithOptionalAsync(Model optional = null, CancellationToken cancellationToken = default)
{
- using var scope = ClientDiagnostics.CreateScope("ConvenienceInCadlClient.ConvenienceOptionalModelWithOptionalValue");
- scope.Start();
- try
- {
- RequestContext context = FromCancellationToken(cancellationToken);
- Response response = await ConvenienceOptionalModelWithOptionalAsync(optional?.ToRequestContent(), context).ConfigureAwait(false);
- return response;
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await ConvenienceOptionalModelWithOptionalAsync(optional?.ToRequestContent(), context).ConfigureAwait(false);
+ return response;
}
/// Operation has protocol method with optional body parameter and optional RequestContext and convenience method.
/// The Model to use.
/// The cancellation token to use.
- ///
- public virtual Response ConvenienceOptionalModelWithOptionalValue(Model optional = null, CancellationToken cancellationToken = default)
+ ///
+ public virtual Response ConvenienceOptionalModelWithOptional(Model optional = null, CancellationToken cancellationToken = default)
{
- using var scope = ClientDiagnostics.CreateScope("ConvenienceInCadlClient.ConvenienceOptionalModelWithOptionalValue");
- scope.Start();
- try
- {
- RequestContext context = FromCancellationToken(cancellationToken);
- Response response = ConvenienceOptionalModelWithOptional(optional?.ToRequestContent(), context);
- return response;
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = ConvenienceOptionalModelWithOptional(optional?.ToRequestContent(), context);
+ return response;
}
///
@@ -1780,7 +1740,7 @@ public virtual Response ConvenienceOptionalModelWithOptionalValue(Model optional
///
/// -
///
- /// Please try the simpler convenience overload with strongly typed models first.
+ /// Please try the simpler convenience overload with strongly typed models first.
///
///
///
@@ -1816,7 +1776,7 @@ public virtual async Task ConvenienceOptionalModelWithOptionalAsync(Re
///
/// -
///
- /// Please try the simpler convenience overload with strongly typed models first.
+ /// Please try the simpler convenience overload with strongly typed models first.
///
///
///
@@ -1990,7 +1950,7 @@ public virtual Response ConvenienceOptionalModelWithRequired(Model optional = nu
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual async Task ConvenienceOptionalModelWithRequiredAsync(RequestContent content, RequestContext context)
+ public virtual async Task ConvenienceOptionalModelWithRequiredAsync(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("ConvenienceInCadlClient.ConvenienceOptionalModelWithRequired");
scope.Start();
@@ -2026,7 +1986,7 @@ public virtual async Task ConvenienceOptionalModelWithRequiredAsync(Re
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual Response ConvenienceOptionalModelWithRequired(RequestContent content, RequestContext context)
+ public virtual Response ConvenienceOptionalModelWithRequired(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("ConvenienceInCadlClient.ConvenienceOptionalModelWithRequired");
scope.Start();
diff --git a/test/TestProjects/ConvenienceUpdate-TypeSpec/src/Generated/Docs/ConvenienceInCadlClient.xml b/test/TestProjects/ConvenienceUpdate-TypeSpec/src/Generated/Docs/ConvenienceInCadlClient.xml
index 7194851ef85..c97fd051e66 100644
--- a/test/TestProjects/ConvenienceUpdate-TypeSpec/src/Generated/Docs/ConvenienceInCadlClient.xml
+++ b/test/TestProjects/ConvenienceUpdate-TypeSpec/src/Generated/Docs/ConvenienceInCadlClient.xml
@@ -179,7 +179,7 @@ Console.WriteLine(response.Status);
-This sample shows how to call NoConvenienceOptionalBodyAsync with required parameters and request content.
+This sample shows how to call NoConvenienceOptionalBodyAsync with required request content.
",
};
-Response response = await client.NoConvenienceOptionalBodyAsync(RequestContent.Create(data), new RequestContext());
+Response response = await client.NoConvenienceOptionalBodyAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
]]>
-This sample shows how to call NoConvenienceOptionalBody with required parameters and request content.
+This sample shows how to call NoConvenienceOptionalBody with required request content.
",
};
-Response response = client.NoConvenienceOptionalBody(RequestContent.Create(data), new RequestContext());
+Response response = client.NoConvenienceOptionalBody(RequestContent.Create(data));
Console.WriteLine(response.Status);
]]>
@@ -499,25 +499,25 @@ Console.WriteLine(result.GetProperty("id").ToString());
]]>
-
+
-This sample shows how to call ProtocolOptionalModelValueAsync with required parameters.
+This sample shows how to call ProtocolOptionalModelAsync with required parameters.
");
-var result = await client.ProtocolOptionalModelValueAsync(optional);
+var result = await client.ProtocolOptionalModelAsync(optional);
]]>
-
+
-This sample shows how to call ProtocolOptionalModelValue with required parameters.
+This sample shows how to call ProtocolOptionalModel with required parameters.
");
-var result = client.ProtocolOptionalModelValue(optional);
+var result = client.ProtocolOptionalModel(optional);
]]>
@@ -805,25 +805,25 @@ Console.WriteLine(result.GetProperty("id").ToString());
]]>
-
+
-This sample shows how to call ConvenienceOptionalModelWithOptionalValueAsync with required parameters.
+This sample shows how to call ConvenienceOptionalModelWithOptionalAsync with required parameters.
");
-var result = await client.ConvenienceOptionalModelWithOptionalValueAsync(optional);
+var result = await client.ConvenienceOptionalModelWithOptionalAsync(optional);
]]>
-
+
-This sample shows how to call ConvenienceOptionalModelWithOptionalValue with required parameters.
+This sample shows how to call ConvenienceOptionalModelWithOptional with required parameters.
");
-var result = client.ConvenienceOptionalModelWithOptionalValue(optional);
+var result = client.ConvenienceOptionalModelWithOptional(optional);
]]>
@@ -933,7 +933,7 @@ var result = client.ConvenienceOptionalModelWithRequired(optional);
-This sample shows how to call ConvenienceOptionalModelWithRequiredAsync with required parameters and request content.
+This sample shows how to call ConvenienceOptionalModelWithRequiredAsync with required request content.
",
};
-Response response = await client.ConvenienceOptionalModelWithRequiredAsync(RequestContent.Create(data), new RequestContext());
+Response response = await client.ConvenienceOptionalModelWithRequiredAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
]]>
-This sample shows how to call ConvenienceOptionalModelWithRequired with required parameters and request content.
+This sample shows how to call ConvenienceOptionalModelWithRequired with required request content.
",
};
-Response response = client.ConvenienceOptionalModelWithRequired(RequestContent.Create(data), new RequestContext());
+Response response = client.ConvenienceOptionalModelWithRequired(RequestContent.Create(data));
Console.WriteLine(response.Status);
]]>
diff --git a/test/TestProjects/ConvenienceUpdate-TypeSpec/tests/Generated/Samples/Samples_ConvenienceInCadlClient.cs b/test/TestProjects/ConvenienceUpdate-TypeSpec/tests/Generated/Samples/Samples_ConvenienceInCadlClient.cs
index 15dadf10d3d..9cc1bc902a2 100644
--- a/test/TestProjects/ConvenienceUpdate-TypeSpec/tests/Generated/Samples/Samples_ConvenienceInCadlClient.cs
+++ b/test/TestProjects/ConvenienceUpdate-TypeSpec/tests/Generated/Samples/Samples_ConvenienceInCadlClient.cs
@@ -266,7 +266,7 @@ public void Example_NoConvenienceOptionalBody()
id = "",
};
- Response response = client.NoConvenienceOptionalBody(RequestContent.Create(data), new RequestContext());
+ Response response = client.NoConvenienceOptionalBody(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -281,7 +281,7 @@ public void Example_NoConvenienceOptionalBody_AllParameters()
id = "",
};
- Response response = client.NoConvenienceOptionalBody(RequestContent.Create(data), new RequestContext());
+ Response response = client.NoConvenienceOptionalBody(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -296,7 +296,7 @@ public async Task Example_NoConvenienceOptionalBody_Async()
id = "",
};
- Response response = await client.NoConvenienceOptionalBodyAsync(RequestContent.Create(data), new RequestContext());
+ Response response = await client.NoConvenienceOptionalBodyAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -311,7 +311,7 @@ public async Task Example_NoConvenienceOptionalBody_AllParameters_Async()
id = "",
};
- Response response = await client.NoConvenienceOptionalBodyAsync(RequestContent.Create(data), new RequestContext());
+ Response response = await client.NoConvenienceOptionalBodyAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -742,12 +742,12 @@ public async Task Example_ProtocolOptionalModel_AllParameters_Async()
[Test]
[Ignore("Only validating compilation of examples")]
- public async Task Example_ProtocolOptionalModelValue_Convenience_Async()
+ public async Task Example_ProtocolOptionalModel_Convenience_Async()
{
var client = new ConvenienceInCadlClient();
var optional = new Model("");
- var result = await client.ProtocolOptionalModelValueAsync(optional);
+ var result = await client.ProtocolOptionalModelAsync(optional);
}
[Test]
@@ -1110,12 +1110,12 @@ public async Task Example_ConvenienceOptionalModelWithOptional_AllParameters_Asy
[Test]
[Ignore("Only validating compilation of examples")]
- public async Task Example_ConvenienceOptionalModelWithOptionalValue_Convenience_Async()
+ public async Task Example_ConvenienceOptionalModelWithOptional_Convenience_Async()
{
var client = new ConvenienceInCadlClient();
var optional = new Model("");
- var result = await client.ConvenienceOptionalModelWithOptionalValueAsync(optional);
+ var result = await client.ConvenienceOptionalModelWithOptionalAsync(optional);
}
[Test]
@@ -1199,7 +1199,7 @@ public void Example_ConvenienceOptionalModelWithRequired()
id = "",
};
- Response response = client.ConvenienceOptionalModelWithRequired(RequestContent.Create(data), new RequestContext());
+ Response response = client.ConvenienceOptionalModelWithRequired(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -1214,7 +1214,7 @@ public void Example_ConvenienceOptionalModelWithRequired_AllParameters()
id = "",
};
- Response response = client.ConvenienceOptionalModelWithRequired(RequestContent.Create(data), new RequestContext());
+ Response response = client.ConvenienceOptionalModelWithRequired(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -1229,7 +1229,7 @@ public async Task Example_ConvenienceOptionalModelWithRequired_Async()
id = "",
};
- Response response = await client.ConvenienceOptionalModelWithRequiredAsync(RequestContent.Create(data), new RequestContext());
+ Response response = await client.ConvenienceOptionalModelWithRequiredAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -1244,7 +1244,7 @@ public async Task Example_ConvenienceOptionalModelWithRequired_AllParameters_Asy
id = "",
};
- Response response = await client.ConvenienceOptionalModelWithRequiredAsync(RequestContent.Create(data), new RequestContext());
+ Response response = await client.ConvenienceOptionalModelWithRequiredAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
diff --git a/test/TestProjects/Parameters-LowLevel/src/Generated/Docs/ParametersLowlevelClient.xml b/test/TestProjects/Parameters-LowLevel/src/Generated/Docs/ParametersLowlevelClient.xml
index 1b8a5919f69..4e6e643036d 100644
--- a/test/TestProjects/Parameters-LowLevel/src/Generated/Docs/ParametersLowlevelClient.xml
+++ b/test/TestProjects/Parameters-LowLevel/src/Generated/Docs/ParametersLowlevelClient.xml
@@ -31,19 +31,19 @@ Console.WriteLine(result.ToString());
-This sample shows how to call RequestBodyResponseBodyAsync with required parameters and parse the result.
+This sample shows how to call RequestBodyResponseBodyAsync and parse the result.
");
var client = new ParametersLowlevelClient(credential);
var data = new {};
-Response response = await client.RequestBodyResponseBodyAsync(RequestContent.Create(data), new RequestContext());
+Response response = await client.RequestBodyResponseBodyAsync(RequestContent.Create(data));
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
]]>
-This sample shows how to call RequestBodyResponseBodyAsync with all parameters and request content, and how to parse the result.
+This sample shows how to call RequestBodyResponseBodyAsync with all request content, and how to parse the result.
");
var client = new ParametersLowlevelClient(credential);
@@ -53,7 +53,7 @@ var data = new {
Status = "",
};
-Response response = await client.RequestBodyResponseBodyAsync(RequestContent.Create(data), new RequestContext());
+Response response = await client.RequestBodyResponseBodyAsync(RequestContent.Create(data));
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("Code").ToString());
@@ -63,19 +63,19 @@ Console.WriteLine(result.GetProperty("Status").ToString());
-This sample shows how to call RequestBodyResponseBody with required parameters and parse the result.
+This sample shows how to call RequestBodyResponseBody and parse the result.
");
var client = new ParametersLowlevelClient(credential);
var data = new {};
-Response response = client.RequestBodyResponseBody(RequestContent.Create(data), new RequestContext());
+Response response = client.RequestBodyResponseBody(RequestContent.Create(data));
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
]]>
-This sample shows how to call RequestBodyResponseBody with all parameters and request content, and how to parse the result.
+This sample shows how to call RequestBodyResponseBody with all request content, and how to parse the result.
");
var client = new ParametersLowlevelClient(credential);
@@ -85,7 +85,7 @@ var data = new {
Status = "",
};
-Response response = client.RequestBodyResponseBody(RequestContent.Create(data), new RequestContext());
+Response response = client.RequestBodyResponseBody(RequestContent.Create(data));
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("Code").ToString());
@@ -147,28 +147,28 @@ Console.WriteLine(response.Status);
-This sample shows how to call RequestBodyNoResponseBodyAsync with required parameters and request content.
+This sample shows how to call RequestBodyNoResponseBodyAsync with required request content.
");
var client = new ParametersLowlevelClient(credential);
var data = "";
-Response response = await client.RequestBodyNoResponseBodyAsync(RequestContent.Create(data), new RequestContext());
+Response response = await client.RequestBodyNoResponseBodyAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
]]>
-This sample shows how to call RequestBodyNoResponseBody with required parameters and request content.
+This sample shows how to call RequestBodyNoResponseBody with required request content.
");
var client = new ParametersLowlevelClient(credential);
var data = "";
-Response response = client.RequestBodyNoResponseBody(RequestContent.Create(data), new RequestContext());
+Response response = client.RequestBodyNoResponseBody(RequestContent.Create(data));
Console.WriteLine(response.Status);
]]>
@@ -230,7 +230,7 @@ var client = new ParametersLowlevelClient(credential);
var data = new {};
-Response response = await client.OptionalPathBodyParametersWithMixedSequenceAsync(1234, "", 1234, 1234, RequestContent.Create(data), 1234, new RequestContext());
+Response response = await client.OptionalPathBodyParametersWithMixedSequenceAsync(1234, "", 1234, 1234, RequestContent.Create(data));
Console.WriteLine(response.Status);
]]>
This sample shows how to call OptionalPathBodyParametersWithMixedSequenceAsync with all parameters and request content.
@@ -243,7 +243,7 @@ var data = new {
Status = "",
};
-Response response = await client.OptionalPathBodyParametersWithMixedSequenceAsync(1234, "", 1234, 1234, RequestContent.Create(data), 1234, new RequestContext());
+Response response = await client.OptionalPathBodyParametersWithMixedSequenceAsync(1234, "", 1234, 1234, RequestContent.Create(data), 1234);
Console.WriteLine(response.Status);
]]>
@@ -257,7 +257,7 @@ var client = new ParametersLowlevelClient(credential);
var data = new {};
-Response response = client.OptionalPathBodyParametersWithMixedSequence(1234, "", 1234, 1234, RequestContent.Create(data), 1234, new RequestContext());
+Response response = client.OptionalPathBodyParametersWithMixedSequence(1234, "", 1234, 1234, RequestContent.Create(data));
Console.WriteLine(response.Status);
]]>
This sample shows how to call OptionalPathBodyParametersWithMixedSequence with all parameters and request content.
@@ -270,7 +270,7 @@ var data = new {
Status = "",
};
-Response response = client.OptionalPathBodyParametersWithMixedSequence(1234, "", 1234, 1234, RequestContent.Create(data), 1234, new RequestContext());
+Response response = client.OptionalPathBodyParametersWithMixedSequence(1234, "", 1234, 1234, RequestContent.Create(data), 1234);
Console.WriteLine(response.Status);
]]>
diff --git a/test/TestProjects/Parameters-LowLevel/src/Generated/ParametersLowlevelClient.cs b/test/TestProjects/Parameters-LowLevel/src/Generated/ParametersLowlevelClient.cs
index 3503e5e2649..39dabd25127 100644
--- a/test/TestProjects/Parameters-LowLevel/src/Generated/ParametersLowlevelClient.cs
+++ b/test/TestProjects/Parameters-LowLevel/src/Generated/ParametersLowlevelClient.cs
@@ -140,7 +140,7 @@ public virtual Response NoRequestBodyResponseBody(int id, int skip, int? top, st
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual async Task RequestBodyResponseBodyAsync(RequestContent content, RequestContext context)
+ public virtual async Task RequestBodyResponseBodyAsync(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("ParametersLowlevelClient.RequestBodyResponseBody");
scope.Start();
@@ -171,7 +171,7 @@ public virtual async Task RequestBodyResponseBodyAsync(RequestContent
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual Response RequestBodyResponseBody(RequestContent content, RequestContext context)
+ public virtual Response RequestBodyResponseBody(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("ParametersLowlevelClient.RequestBodyResponseBody");
scope.Start();
@@ -330,7 +330,7 @@ public virtual Response NoRequestBodyNoResponseBody(RequestContext context = nul
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual async Task RequestBodyNoResponseBodyAsync(RequestContent content, RequestContext context)
+ public virtual async Task RequestBodyNoResponseBodyAsync(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("ParametersLowlevelClient.RequestBodyNoResponseBody");
scope.Start();
@@ -361,7 +361,7 @@ public virtual async Task RequestBodyNoResponseBodyAsync(RequestConten
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual Response RequestBodyNoResponseBody(RequestContent content, RequestContext context)
+ public virtual Response RequestBodyNoResponseBody(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("ParametersLowlevelClient.RequestBodyNoResponseBody");
scope.Start();
@@ -547,7 +547,7 @@ public virtual Response OptionalPathParametersWithMixedSequence(int id, string n
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual async Task OptionalPathBodyParametersWithMixedSequenceAsync(int id, string name, int skip, int max, RequestContent content, int? top, RequestContext context)
+ public virtual async Task OptionalPathBodyParametersWithMixedSequenceAsync(int id, string name, int skip, int max, RequestContent content, int? top = null, RequestContext context = null)
{
Argument.AssertNotNullOrEmpty(name, nameof(name));
@@ -587,7 +587,7 @@ public virtual async Task OptionalPathBodyParametersWithMixedSequenceA
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual Response OptionalPathBodyParametersWithMixedSequence(int id, string name, int skip, int max, RequestContent content, int? top, RequestContext context)
+ public virtual Response OptionalPathBodyParametersWithMixedSequence(int id, string name, int skip, int max, RequestContent content, int? top = null, RequestContext context = null)
{
Argument.AssertNotNullOrEmpty(name, nameof(name));
diff --git a/test/TestProjects/Parameters-LowLevel/tests/Generated/Samples/Samples_ParametersLowlevelClient.cs b/test/TestProjects/Parameters-LowLevel/tests/Generated/Samples/Samples_ParametersLowlevelClient.cs
index 1940d517414..21c7c1d15c6 100644
--- a/test/TestProjects/Parameters-LowLevel/tests/Generated/Samples/Samples_ParametersLowlevelClient.cs
+++ b/test/TestProjects/Parameters-LowLevel/tests/Generated/Samples/Samples_ParametersLowlevelClient.cs
@@ -80,7 +80,7 @@ public void Example_RequestBodyResponseBody()
var data = new { };
- Response response = client.RequestBodyResponseBody(RequestContent.Create(data), new RequestContext());
+ Response response = client.RequestBodyResponseBody(RequestContent.Create(data));
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
@@ -99,7 +99,7 @@ public void Example_RequestBodyResponseBody_AllParameters()
Status = "",
};
- Response response = client.RequestBodyResponseBody(RequestContent.Create(data), new RequestContext());
+ Response response = client.RequestBodyResponseBody(RequestContent.Create(data));
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("Code").ToString());
@@ -115,7 +115,7 @@ public async Task Example_RequestBodyResponseBody_Async()
var data = new { };
- Response response = await client.RequestBodyResponseBodyAsync(RequestContent.Create(data), new RequestContext());
+ Response response = await client.RequestBodyResponseBodyAsync(RequestContent.Create(data));
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
@@ -134,7 +134,7 @@ public async Task Example_RequestBodyResponseBody_AllParameters_Async()
Status = "",
};
- Response response = await client.RequestBodyResponseBodyAsync(RequestContent.Create(data), new RequestContext());
+ Response response = await client.RequestBodyResponseBodyAsync(RequestContent.Create(data));
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("Code").ToString());
@@ -246,7 +246,7 @@ public void Example_RequestBodyNoResponseBody()
var data = "";
- Response response = client.RequestBodyNoResponseBody(RequestContent.Create(data), new RequestContext());
+ Response response = client.RequestBodyNoResponseBody(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -259,7 +259,7 @@ public void Example_RequestBodyNoResponseBody_AllParameters()
var data = "";
- Response response = client.RequestBodyNoResponseBody(RequestContent.Create(data), new RequestContext());
+ Response response = client.RequestBodyNoResponseBody(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -272,7 +272,7 @@ public async Task Example_RequestBodyNoResponseBody_Async()
var data = "";
- Response response = await client.RequestBodyNoResponseBodyAsync(RequestContent.Create(data), new RequestContext());
+ Response response = await client.RequestBodyNoResponseBodyAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -285,7 +285,7 @@ public async Task Example_RequestBodyNoResponseBody_AllParameters_Async()
var data = "";
- Response response = await client.RequestBodyNoResponseBodyAsync(RequestContent.Create(data), new RequestContext());
+ Response response = await client.RequestBodyNoResponseBodyAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -386,7 +386,7 @@ public void Example_OptionalPathBodyParametersWithMixedSequence()
var data = new { };
- Response response = client.OptionalPathBodyParametersWithMixedSequence(1234, "", 1234, 1234, RequestContent.Create(data), 1234, new RequestContext());
+ Response response = client.OptionalPathBodyParametersWithMixedSequence(1234, "", 1234, 1234, RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -403,7 +403,7 @@ public void Example_OptionalPathBodyParametersWithMixedSequence_AllParameters()
Status = "",
};
- Response response = client.OptionalPathBodyParametersWithMixedSequence(1234, "", 1234, 1234, RequestContent.Create(data), 1234, new RequestContext());
+ Response response = client.OptionalPathBodyParametersWithMixedSequence(1234, "", 1234, 1234, RequestContent.Create(data), 1234);
Console.WriteLine(response.Status);
}
@@ -416,7 +416,7 @@ public async Task Example_OptionalPathBodyParametersWithMixedSequence_Async()
var data = new { };
- Response response = await client.OptionalPathBodyParametersWithMixedSequenceAsync(1234, "", 1234, 1234, RequestContent.Create(data), 1234, new RequestContext());
+ Response response = await client.OptionalPathBodyParametersWithMixedSequenceAsync(1234, "", 1234, 1234, RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -433,7 +433,7 @@ public async Task Example_OptionalPathBodyParametersWithMixedSequence_AllParamet
Status = "",
};
- Response response = await client.OptionalPathBodyParametersWithMixedSequenceAsync(1234, "", 1234, 1234, RequestContent.Create(data), 1234, new RequestContext());
+ Response response = await client.OptionalPathBodyParametersWithMixedSequenceAsync(1234, "", 1234, 1234, RequestContent.Create(data), 1234);
Console.WriteLine(response.Status);
}
}
diff --git a/test/TestProjects/ProtocolMethodsInRestClient/Generated/FirstTemplateRestClient.cs b/test/TestProjects/ProtocolMethodsInRestClient/Generated/FirstTemplateRestClient.cs
index dbafaad1e26..600f1ba67d4 100644
--- a/test/TestProjects/ProtocolMethodsInRestClient/Generated/FirstTemplateRestClient.cs
+++ b/test/TestProjects/ProtocolMethodsInRestClient/Generated/FirstTemplateRestClient.cs
@@ -127,7 +127,7 @@ internal HttpMessage CreateCreateRequest(RequestContent content, RequestContext
/// The request context, which can override default behaviors of the client pipeline on a per-call basis.
/// Service returned a non-success status code.
/// The response returned from the service.
- public virtual async Task CreateAsync(RequestContent content, RequestContext context)
+ public virtual async Task CreateAsync(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("FirstTemplateClient.Create");
scope.Start();
@@ -157,7 +157,7 @@ public virtual async Task CreateAsync(RequestContent content, RequestC
/// The request context, which can override default behaviors of the client pipeline on a per-call basis.
/// Service returned a non-success status code.
/// The response returned from the service.
- public virtual Response Create(RequestContent content, RequestContext context)
+ public virtual Response Create(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("FirstTemplateClient.Create");
scope.Start();
diff --git a/test/TestServerProjectsLowLevel/body-string/src/Generated/Docs/StringClient.xml b/test/TestServerProjectsLowLevel/body-string/src/Generated/Docs/StringClient.xml
index 925b4e081c0..61d7aa5b018 100644
--- a/test/TestServerProjectsLowLevel/body-string/src/Generated/Docs/StringClient.xml
+++ b/test/TestServerProjectsLowLevel/body-string/src/Generated/Docs/StringClient.xml
@@ -31,28 +31,28 @@ Console.WriteLine(result.ToString());
-This sample shows how to call PutNullAsync with required parameters and request content.
+This sample shows how to call PutNullAsync with required request content.
");
var client = new StringClient(credential);
var data = "";
-Response response = await client.PutNullAsync(RequestContent.Create(data), new RequestContext());
+Response response = await client.PutNullAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
]]>
-This sample shows how to call PutNull with required parameters and request content.
+This sample shows how to call PutNull with required request content.
");
var client = new StringClient(credential);
var data = "";
-Response response = client.PutNull(RequestContent.Create(data), new RequestContext());
+Response response = client.PutNull(RequestContent.Create(data));
Console.WriteLine(response.Status);
]]>
diff --git a/test/TestServerProjectsLowLevel/body-string/src/Generated/StringClient.cs b/test/TestServerProjectsLowLevel/body-string/src/Generated/StringClient.cs
index 38778ac5800..cec3881cbae 100644
--- a/test/TestServerProjectsLowLevel/body-string/src/Generated/StringClient.cs
+++ b/test/TestServerProjectsLowLevel/body-string/src/Generated/StringClient.cs
@@ -132,7 +132,7 @@ public virtual Response GetNull(RequestContext context)
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual async Task PutNullAsync(RequestContent content, RequestContext context)
+ public virtual async Task PutNullAsync(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("StringClient.PutNull");
scope.Start();
@@ -163,7 +163,7 @@ public virtual async Task PutNullAsync(RequestContent content, Request
/// Service returned a non-success status code.
/// The response returned from the service.
///
- public virtual Response PutNull(RequestContent content, RequestContext context)
+ public virtual Response PutNull(RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("StringClient.PutNull");
scope.Start();
diff --git a/test/TestServerProjectsLowLevel/body-string/tests/Generated/Samples/Samples_StringClient.cs b/test/TestServerProjectsLowLevel/body-string/tests/Generated/Samples/Samples_StringClient.cs
index f80bd7e93c2..eb22dc66913 100644
--- a/test/TestServerProjectsLowLevel/body-string/tests/Generated/Samples/Samples_StringClient.cs
+++ b/test/TestServerProjectsLowLevel/body-string/tests/Generated/Samples/Samples_StringClient.cs
@@ -80,7 +80,7 @@ public void Example_PutNull()
var data = "";
- Response response = client.PutNull(RequestContent.Create(data), new RequestContext());
+ Response response = client.PutNull(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -93,7 +93,7 @@ public void Example_PutNull_AllParameters()
var data = "";
- Response response = client.PutNull(RequestContent.Create(data), new RequestContext());
+ Response response = client.PutNull(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -106,7 +106,7 @@ public async Task Example_PutNull_Async()
var data = "";
- Response response = await client.PutNullAsync(RequestContent.Create(data), new RequestContext());
+ Response response = await client.PutNullAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
@@ -119,7 +119,7 @@ public async Task Example_PutNull_AllParameters_Async()
var data = "";
- Response response = await client.PutNullAsync(RequestContent.Create(data), new RequestContext());
+ Response response = await client.PutNullAsync(RequestContent.Create(data));
Console.WriteLine(response.Status);
}
diff --git a/test/TestServerProjectsLowLevel/lro/src/Generated/Docs/LRORetrysClient.xml b/test/TestServerProjectsLowLevel/lro/src/Generated/Docs/LRORetrysClient.xml
index 99f12eb8e11..8380452499a 100644
--- a/test/TestServerProjectsLowLevel/lro/src/Generated/Docs/LRORetrysClient.xml
+++ b/test/TestServerProjectsLowLevel/lro/src/Generated/Docs/LRORetrysClient.xml
@@ -10,7 +10,7 @@ var client = new LRORetrysClient(credential);
var data = new {};
-var operation = await client.Put201CreatingSucceeded200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put201CreatingSucceeded200Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -31,7 +31,7 @@ var data = new {
location = "",
};
-var operation = await client.Put201CreatingSucceeded200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put201CreatingSucceeded200Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -54,7 +54,7 @@ var client = new LRORetrysClient(credential);
var data = new {};
-var operation = client.Put201CreatingSucceeded200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put201CreatingSucceeded200(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -75,7 +75,7 @@ var data = new {
location = "",
};
-var operation = client.Put201CreatingSucceeded200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put201CreatingSucceeded200(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -98,7 +98,7 @@ var client = new LRORetrysClient(credential);
var data = new {};
-var operation = await client.PutAsyncRelativeRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRelativeRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -119,7 +119,7 @@ var data = new {
location = "",
};
-var operation = await client.PutAsyncRelativeRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRelativeRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -142,7 +142,7 @@ var client = new LRORetrysClient(credential);
var data = new {};
-var operation = client.PutAsyncRelativeRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRelativeRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -163,7 +163,7 @@ var data = new {
location = "",
};
-var operation = client.PutAsyncRelativeRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRelativeRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -280,7 +280,7 @@ var client = new LRORetrysClient(credential);
var data = new {};
-var operation = await client.Post202Retry200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Post202Retry200Async(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -299,7 +299,7 @@ var data = new {
location = "",
};
-var operation = await client.Post202Retry200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Post202Retry200Async(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -314,7 +314,7 @@ var client = new LRORetrysClient(credential);
var data = new {};
-var operation = client.Post202Retry200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Post202Retry200(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -333,7 +333,7 @@ var data = new {
location = "",
};
-var operation = client.Post202Retry200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Post202Retry200(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -348,7 +348,7 @@ var client = new LRORetrysClient(credential);
var data = new {};
-var operation = await client.PostAsyncRelativeRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRelativeRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -367,7 +367,7 @@ var data = new {
location = "",
};
-var operation = await client.PostAsyncRelativeRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRelativeRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -382,7 +382,7 @@ var client = new LRORetrysClient(credential);
var data = new {};
-var operation = client.PostAsyncRelativeRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRelativeRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -401,7 +401,7 @@ var data = new {
location = "",
};
-var operation = client.PostAsyncRelativeRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRelativeRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
diff --git a/test/TestServerProjectsLowLevel/lro/src/Generated/Docs/LROsClient.xml b/test/TestServerProjectsLowLevel/lro/src/Generated/Docs/LROsClient.xml
index 5b7d95c0d79..1af869fa2c5 100644
--- a/test/TestServerProjectsLowLevel/lro/src/Generated/Docs/LROsClient.xml
+++ b/test/TestServerProjectsLowLevel/lro/src/Generated/Docs/LROsClient.xml
@@ -10,7 +10,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.Put200SucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put200SucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -31,7 +31,7 @@ var data = new {
location = "",
};
-var operation = await client.Put200SucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put200SucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -54,7 +54,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.Put200Succeeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put200Succeeded(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -75,7 +75,7 @@ var data = new {
location = "",
};
-var operation = client.Put200Succeeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put200Succeeded(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -98,7 +98,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.Patch200SucceededIgnoreHeadersAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Patch200SucceededIgnoreHeadersAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -119,7 +119,7 @@ var data = new {
location = "",
};
-var operation = await client.Patch200SucceededIgnoreHeadersAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Patch200SucceededIgnoreHeadersAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -142,7 +142,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.Patch200SucceededIgnoreHeaders(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Patch200SucceededIgnoreHeaders(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -163,7 +163,7 @@ var data = new {
location = "",
};
-var operation = client.Patch200SucceededIgnoreHeaders(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Patch200SucceededIgnoreHeaders(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -186,7 +186,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.Patch201RetryWithAsyncHeaderAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Patch201RetryWithAsyncHeaderAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -207,7 +207,7 @@ var data = new {
location = "",
};
-var operation = await client.Patch201RetryWithAsyncHeaderAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Patch201RetryWithAsyncHeaderAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -230,7 +230,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.Patch201RetryWithAsyncHeader(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Patch201RetryWithAsyncHeader(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -251,7 +251,7 @@ var data = new {
location = "",
};
-var operation = client.Patch201RetryWithAsyncHeader(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Patch201RetryWithAsyncHeader(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -274,7 +274,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.Patch202RetryWithAsyncAndLocationHeaderAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Patch202RetryWithAsyncAndLocationHeaderAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -295,7 +295,7 @@ var data = new {
location = "",
};
-var operation = await client.Patch202RetryWithAsyncAndLocationHeaderAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Patch202RetryWithAsyncAndLocationHeaderAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -318,7 +318,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.Patch202RetryWithAsyncAndLocationHeader(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Patch202RetryWithAsyncAndLocationHeader(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -339,7 +339,7 @@ var data = new {
location = "",
};
-var operation = client.Patch202RetryWithAsyncAndLocationHeader(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Patch202RetryWithAsyncAndLocationHeader(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -362,7 +362,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.Put201SucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put201SucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -383,7 +383,7 @@ var data = new {
location = "",
};
-var operation = await client.Put201SucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put201SucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -406,7 +406,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.Put201Succeeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put201Succeeded(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -427,7 +427,7 @@ var data = new {
location = "",
};
-var operation = client.Put201Succeeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put201Succeeded(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -492,7 +492,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.Put200SucceededNoStateAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put200SucceededNoStateAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -513,7 +513,7 @@ var data = new {
location = "",
};
-var operation = await client.Put200SucceededNoStateAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put200SucceededNoStateAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -536,7 +536,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.Put200SucceededNoState(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put200SucceededNoState(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -557,7 +557,7 @@ var data = new {
location = "",
};
-var operation = client.Put200SucceededNoState(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put200SucceededNoState(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -580,7 +580,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.Put202Retry200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put202Retry200Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -601,7 +601,7 @@ var data = new {
location = "",
};
-var operation = await client.Put202Retry200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put202Retry200Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -624,7 +624,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.Put202Retry200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put202Retry200(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -645,7 +645,7 @@ var data = new {
location = "",
};
-var operation = client.Put202Retry200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put202Retry200(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -668,7 +668,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.Put201CreatingSucceeded200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put201CreatingSucceeded200Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -689,7 +689,7 @@ var data = new {
location = "",
};
-var operation = await client.Put201CreatingSucceeded200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put201CreatingSucceeded200Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -712,7 +712,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.Put201CreatingSucceeded200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put201CreatingSucceeded200(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -733,7 +733,7 @@ var data = new {
location = "",
};
-var operation = client.Put201CreatingSucceeded200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put201CreatingSucceeded200(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -756,7 +756,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.Put200UpdatingSucceeded204Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put200UpdatingSucceeded204Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -777,7 +777,7 @@ var data = new {
location = "",
};
-var operation = await client.Put200UpdatingSucceeded204Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put200UpdatingSucceeded204Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -800,7 +800,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.Put200UpdatingSucceeded204(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put200UpdatingSucceeded204(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -821,7 +821,7 @@ var data = new {
location = "",
};
-var operation = client.Put200UpdatingSucceeded204(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put200UpdatingSucceeded204(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -844,7 +844,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.Put201CreatingFailed200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put201CreatingFailed200Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -865,7 +865,7 @@ var data = new {
location = "",
};
-var operation = await client.Put201CreatingFailed200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put201CreatingFailed200Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -888,7 +888,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.Put201CreatingFailed200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put201CreatingFailed200(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -909,7 +909,7 @@ var data = new {
location = "",
};
-var operation = client.Put201CreatingFailed200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put201CreatingFailed200(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -932,7 +932,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.Put200Acceptedcanceled200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put200Acceptedcanceled200Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -953,7 +953,7 @@ var data = new {
location = "",
};
-var operation = await client.Put200Acceptedcanceled200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put200Acceptedcanceled200Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -976,7 +976,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.Put200Acceptedcanceled200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put200Acceptedcanceled200(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -997,7 +997,7 @@ var data = new {
location = "",
};
-var operation = client.Put200Acceptedcanceled200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put200Acceptedcanceled200(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1020,7 +1020,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.PutNoHeaderInRetryAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutNoHeaderInRetryAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1041,7 +1041,7 @@ var data = new {
location = "",
};
-var operation = await client.PutNoHeaderInRetryAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutNoHeaderInRetryAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1064,7 +1064,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.PutNoHeaderInRetry(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutNoHeaderInRetry(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1085,7 +1085,7 @@ var data = new {
location = "",
};
-var operation = client.PutNoHeaderInRetry(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutNoHeaderInRetry(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1108,7 +1108,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.PutAsyncRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1129,7 +1129,7 @@ var data = new {
location = "",
};
-var operation = await client.PutAsyncRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1152,7 +1152,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.PutAsyncRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1173,7 +1173,7 @@ var data = new {
location = "",
};
-var operation = client.PutAsyncRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1196,7 +1196,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.PutAsyncNoRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncNoRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1217,7 +1217,7 @@ var data = new {
location = "",
};
-var operation = await client.PutAsyncNoRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncNoRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1240,7 +1240,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.PutAsyncNoRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncNoRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1261,7 +1261,7 @@ var data = new {
location = "",
};
-var operation = client.PutAsyncNoRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncNoRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1284,7 +1284,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.PutAsyncRetryFailedAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRetryFailedAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1305,7 +1305,7 @@ var data = new {
location = "",
};
-var operation = await client.PutAsyncRetryFailedAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRetryFailedAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1328,7 +1328,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.PutAsyncRetryFailed(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRetryFailed(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1349,7 +1349,7 @@ var data = new {
location = "",
};
-var operation = client.PutAsyncRetryFailed(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRetryFailed(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1372,7 +1372,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.PutAsyncNoRetrycanceledAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncNoRetrycanceledAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1393,7 +1393,7 @@ var data = new {
location = "",
};
-var operation = await client.PutAsyncNoRetrycanceledAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncNoRetrycanceledAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1416,7 +1416,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.PutAsyncNoRetrycanceled(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncNoRetrycanceled(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1437,7 +1437,7 @@ var data = new {
location = "",
};
-var operation = client.PutAsyncNoRetrycanceled(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncNoRetrycanceled(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1460,7 +1460,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.PutAsyncNoHeaderInRetryAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncNoHeaderInRetryAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1481,7 +1481,7 @@ var data = new {
location = "",
};
-var operation = await client.PutAsyncNoHeaderInRetryAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncNoHeaderInRetryAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1504,7 +1504,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.PutAsyncNoHeaderInRetry(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncNoHeaderInRetry(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1525,7 +1525,7 @@ var data = new {
location = "",
};
-var operation = client.PutAsyncNoHeaderInRetry(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncNoHeaderInRetry(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1548,7 +1548,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.PutNonResourceAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutNonResourceAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1564,7 +1564,7 @@ var data = new {
id = "",
};
-var operation = await client.PutNonResourceAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutNonResourceAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1582,7 +1582,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.PutNonResource(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutNonResource(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1598,7 +1598,7 @@ var data = new {
id = "",
};
-var operation = client.PutNonResource(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutNonResource(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1616,7 +1616,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.PutAsyncNonResourceAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncNonResourceAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1632,7 +1632,7 @@ var data = new {
id = "",
};
-var operation = await client.PutAsyncNonResourceAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncNonResourceAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1650,7 +1650,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.PutAsyncNonResource(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncNonResource(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1666,7 +1666,7 @@ var data = new {
id = "",
};
-var operation = client.PutAsyncNonResource(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncNonResource(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1684,7 +1684,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.PutSubResourceAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutSubResourceAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1701,7 +1701,7 @@ var data = new {
},
};
-var operation = await client.PutSubResourceAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutSubResourceAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1720,7 +1720,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.PutSubResource(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutSubResource(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1737,7 +1737,7 @@ var data = new {
},
};
-var operation = client.PutSubResource(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutSubResource(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1756,7 +1756,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.PutAsyncSubResourceAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncSubResourceAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1773,7 +1773,7 @@ var data = new {
},
};
-var operation = await client.PutAsyncSubResourceAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncSubResourceAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1792,7 +1792,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.PutAsyncSubResource(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncSubResource(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1809,7 +1809,7 @@ var data = new {
},
};
-var operation = client.PutAsyncSubResource(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncSubResource(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -2252,7 +2252,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.Post202Retry200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Post202Retry200Async(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -2271,7 +2271,7 @@ var data = new {
location = "",
};
-var operation = await client.Post202Retry200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Post202Retry200Async(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -2286,7 +2286,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.Post202Retry200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Post202Retry200(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -2305,7 +2305,7 @@ var data = new {
location = "",
};
-var operation = client.Post202Retry200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Post202Retry200(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -2320,7 +2320,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.Post202NoRetry204Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Post202NoRetry204Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -2341,7 +2341,7 @@ var data = new {
location = "",
};
-var operation = await client.Post202NoRetry204Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Post202NoRetry204Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -2364,7 +2364,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.Post202NoRetry204(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Post202NoRetry204(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -2385,7 +2385,7 @@ var data = new {
location = "",
};
-var operation = client.Post202NoRetry204(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Post202NoRetry204(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -2534,7 +2534,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.PostAsyncRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -2555,7 +2555,7 @@ var data = new {
location = "",
};
-var operation = await client.PostAsyncRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -2578,7 +2578,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.PostAsyncRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -2599,7 +2599,7 @@ var data = new {
location = "",
};
-var operation = client.PostAsyncRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -2622,7 +2622,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.PostAsyncNoRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncNoRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -2643,7 +2643,7 @@ var data = new {
location = "",
};
-var operation = await client.PostAsyncNoRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncNoRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -2666,7 +2666,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.PostAsyncNoRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncNoRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -2687,7 +2687,7 @@ var data = new {
location = "",
};
-var operation = client.PostAsyncNoRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncNoRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -2710,7 +2710,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.PostAsyncRetryFailedAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRetryFailedAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -2729,7 +2729,7 @@ var data = new {
location = "",
};
-var operation = await client.PostAsyncRetryFailedAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRetryFailedAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -2744,7 +2744,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.PostAsyncRetryFailed(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRetryFailed(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -2763,7 +2763,7 @@ var data = new {
location = "",
};
-var operation = client.PostAsyncRetryFailed(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRetryFailed(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -2778,7 +2778,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = await client.PostAsyncRetrycanceledAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRetrycanceledAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -2797,7 +2797,7 @@ var data = new {
location = "",
};
-var operation = await client.PostAsyncRetrycanceledAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRetrycanceledAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -2812,7 +2812,7 @@ var client = new LROsClient(credential);
var data = new {};
-var operation = client.PostAsyncRetrycanceled(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRetrycanceled(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -2831,7 +2831,7 @@ var data = new {
location = "",
};
-var operation = client.PostAsyncRetrycanceled(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRetrycanceled(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
diff --git a/test/TestServerProjectsLowLevel/lro/src/Generated/Docs/LROsCustomHeaderClient.xml b/test/TestServerProjectsLowLevel/lro/src/Generated/Docs/LROsCustomHeaderClient.xml
index 086b644fe3f..e49b78958d1 100644
--- a/test/TestServerProjectsLowLevel/lro/src/Generated/Docs/LROsCustomHeaderClient.xml
+++ b/test/TestServerProjectsLowLevel/lro/src/Generated/Docs/LROsCustomHeaderClient.xml
@@ -10,7 +10,7 @@ var client = new LROsCustomHeaderClient(credential);
var data = new {};
-var operation = await client.PutAsyncRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -31,7 +31,7 @@ var data = new {
location = "",
};
-var operation = await client.PutAsyncRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -54,7 +54,7 @@ var client = new LROsCustomHeaderClient(credential);
var data = new {};
-var operation = client.PutAsyncRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -75,7 +75,7 @@ var data = new {
location = "",
};
-var operation = client.PutAsyncRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -98,7 +98,7 @@ var client = new LROsCustomHeaderClient(credential);
var data = new {};
-var operation = await client.Put201CreatingSucceeded200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put201CreatingSucceeded200Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -119,7 +119,7 @@ var data = new {
location = "",
};
-var operation = await client.Put201CreatingSucceeded200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put201CreatingSucceeded200Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -142,7 +142,7 @@ var client = new LROsCustomHeaderClient(credential);
var data = new {};
-var operation = client.Put201CreatingSucceeded200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put201CreatingSucceeded200(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -163,7 +163,7 @@ var data = new {
location = "",
};
-var operation = client.Put201CreatingSucceeded200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put201CreatingSucceeded200(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -186,7 +186,7 @@ var client = new LROsCustomHeaderClient(credential);
var data = new {};
-var operation = await client.Post202Retry200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Post202Retry200Async(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -205,7 +205,7 @@ var data = new {
location = "",
};
-var operation = await client.Post202Retry200Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Post202Retry200Async(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -220,7 +220,7 @@ var client = new LROsCustomHeaderClient(credential);
var data = new {};
-var operation = client.Post202Retry200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Post202Retry200(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -239,7 +239,7 @@ var data = new {
location = "",
};
-var operation = client.Post202Retry200(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Post202Retry200(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -254,7 +254,7 @@ var client = new LROsCustomHeaderClient(credential);
var data = new {};
-var operation = await client.PostAsyncRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -273,7 +273,7 @@ var data = new {
location = "",
};
-var operation = await client.PostAsyncRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRetrySucceededAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -288,7 +288,7 @@ var client = new LROsCustomHeaderClient(credential);
var data = new {};
-var operation = client.PostAsyncRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -307,7 +307,7 @@ var data = new {
location = "",
};
-var operation = client.PostAsyncRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRetrySucceeded(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
diff --git a/test/TestServerProjectsLowLevel/lro/src/Generated/Docs/LrosaDsClient.xml b/test/TestServerProjectsLowLevel/lro/src/Generated/Docs/LrosaDsClient.xml
index 30ed7df04f3..00b835a6003 100644
--- a/test/TestServerProjectsLowLevel/lro/src/Generated/Docs/LrosaDsClient.xml
+++ b/test/TestServerProjectsLowLevel/lro/src/Generated/Docs/LrosaDsClient.xml
@@ -10,7 +10,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.PutNonRetry400Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutNonRetry400Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -31,7 +31,7 @@ var data = new {
location = "",
};
-var operation = await client.PutNonRetry400Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutNonRetry400Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -54,7 +54,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.PutNonRetry400(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutNonRetry400(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -75,7 +75,7 @@ var data = new {
location = "",
};
-var operation = client.PutNonRetry400(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutNonRetry400(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -98,7 +98,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.PutNonRetry201Creating400Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutNonRetry201Creating400Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -119,7 +119,7 @@ var data = new {
location = "",
};
-var operation = await client.PutNonRetry201Creating400Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutNonRetry201Creating400Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -142,7 +142,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.PutNonRetry201Creating400(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutNonRetry201Creating400(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -163,7 +163,7 @@ var data = new {
location = "",
};
-var operation = client.PutNonRetry201Creating400(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutNonRetry201Creating400(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -186,7 +186,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.PutNonRetry201Creating400InvalidJsonAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutNonRetry201Creating400InvalidJsonAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -207,7 +207,7 @@ var data = new {
location = "",
};
-var operation = await client.PutNonRetry201Creating400InvalidJsonAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutNonRetry201Creating400InvalidJsonAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -230,7 +230,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.PutNonRetry201Creating400InvalidJson(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutNonRetry201Creating400InvalidJson(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -251,7 +251,7 @@ var data = new {
location = "",
};
-var operation = client.PutNonRetry201Creating400InvalidJson(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutNonRetry201Creating400InvalidJson(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -274,7 +274,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.PutAsyncRelativeRetry400Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRelativeRetry400Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -295,7 +295,7 @@ var data = new {
location = "",
};
-var operation = await client.PutAsyncRelativeRetry400Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRelativeRetry400Async(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -318,7 +318,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.PutAsyncRelativeRetry400(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRelativeRetry400(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -339,7 +339,7 @@ var data = new {
location = "",
};
-var operation = client.PutAsyncRelativeRetry400(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRelativeRetry400(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -440,7 +440,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.PostNonRetry400Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostNonRetry400Async(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -459,7 +459,7 @@ var data = new {
location = "",
};
-var operation = await client.PostNonRetry400Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostNonRetry400Async(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -474,7 +474,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.PostNonRetry400(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostNonRetry400(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -493,7 +493,7 @@ var data = new {
location = "",
};
-var operation = client.PostNonRetry400(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostNonRetry400(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -508,7 +508,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.Post202NonRetry400Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Post202NonRetry400Async(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -527,7 +527,7 @@ var data = new {
location = "",
};
-var operation = await client.Post202NonRetry400Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Post202NonRetry400Async(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -542,7 +542,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.Post202NonRetry400(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Post202NonRetry400(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -561,7 +561,7 @@ var data = new {
location = "",
};
-var operation = client.Post202NonRetry400(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Post202NonRetry400(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -576,7 +576,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.PostAsyncRelativeRetry400Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRelativeRetry400Async(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -595,7 +595,7 @@ var data = new {
location = "",
};
-var operation = await client.PostAsyncRelativeRetry400Async(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRelativeRetry400Async(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -610,7 +610,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.PostAsyncRelativeRetry400(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRelativeRetry400(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -629,7 +629,7 @@ var data = new {
location = "",
};
-var operation = client.PostAsyncRelativeRetry400(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRelativeRetry400(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -644,7 +644,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.PutError201NoProvisioningStatePayloadAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutError201NoProvisioningStatePayloadAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -665,7 +665,7 @@ var data = new {
location = "",
};
-var operation = await client.PutError201NoProvisioningStatePayloadAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutError201NoProvisioningStatePayloadAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -688,7 +688,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.PutError201NoProvisioningStatePayload(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutError201NoProvisioningStatePayload(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -709,7 +709,7 @@ var data = new {
location = "",
};
-var operation = client.PutError201NoProvisioningStatePayload(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutError201NoProvisioningStatePayload(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -732,7 +732,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.PutAsyncRelativeRetryNoStatusAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRelativeRetryNoStatusAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -753,7 +753,7 @@ var data = new {
location = "",
};
-var operation = await client.PutAsyncRelativeRetryNoStatusAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRelativeRetryNoStatusAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -776,7 +776,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.PutAsyncRelativeRetryNoStatus(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRelativeRetryNoStatus(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -797,7 +797,7 @@ var data = new {
location = "",
};
-var operation = client.PutAsyncRelativeRetryNoStatus(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRelativeRetryNoStatus(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -820,7 +820,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.PutAsyncRelativeRetryNoStatusPayloadAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRelativeRetryNoStatusPayloadAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -841,7 +841,7 @@ var data = new {
location = "",
};
-var operation = await client.PutAsyncRelativeRetryNoStatusPayloadAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRelativeRetryNoStatusPayloadAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -864,7 +864,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.PutAsyncRelativeRetryNoStatusPayload(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRelativeRetryNoStatusPayload(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -885,7 +885,7 @@ var data = new {
location = "",
};
-var operation = client.PutAsyncRelativeRetryNoStatusPayload(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRelativeRetryNoStatusPayload(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -960,7 +960,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.Post202NoLocationAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Post202NoLocationAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -979,7 +979,7 @@ var data = new {
location = "",
};
-var operation = await client.Post202NoLocationAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Post202NoLocationAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -994,7 +994,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.Post202NoLocation(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Post202NoLocation(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -1013,7 +1013,7 @@ var data = new {
location = "",
};
-var operation = client.Post202NoLocation(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Post202NoLocation(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -1028,7 +1028,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.PostAsyncRelativeRetryNoPayloadAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRelativeRetryNoPayloadAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -1047,7 +1047,7 @@ var data = new {
location = "",
};
-var operation = await client.PostAsyncRelativeRetryNoPayloadAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRelativeRetryNoPayloadAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -1062,7 +1062,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.PostAsyncRelativeRetryNoPayload(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRelativeRetryNoPayload(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -1081,7 +1081,7 @@ var data = new {
location = "",
};
-var operation = client.PostAsyncRelativeRetryNoPayload(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRelativeRetryNoPayload(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -1096,7 +1096,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.Put200InvalidJsonAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put200InvalidJsonAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1117,7 +1117,7 @@ var data = new {
location = "",
};
-var operation = await client.Put200InvalidJsonAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Put200InvalidJsonAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1140,7 +1140,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.Put200InvalidJson(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put200InvalidJson(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1161,7 +1161,7 @@ var data = new {
location = "",
};
-var operation = client.Put200InvalidJson(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Put200InvalidJson(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1184,7 +1184,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.PutAsyncRelativeRetryInvalidHeaderAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRelativeRetryInvalidHeaderAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1205,7 +1205,7 @@ var data = new {
location = "",
};
-var operation = await client.PutAsyncRelativeRetryInvalidHeaderAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRelativeRetryInvalidHeaderAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1228,7 +1228,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.PutAsyncRelativeRetryInvalidHeader(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRelativeRetryInvalidHeader(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1249,7 +1249,7 @@ var data = new {
location = "",
};
-var operation = client.PutAsyncRelativeRetryInvalidHeader(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRelativeRetryInvalidHeader(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1272,7 +1272,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.PutAsyncRelativeRetryInvalidJsonPollingAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRelativeRetryInvalidJsonPollingAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1293,7 +1293,7 @@ var data = new {
location = "",
};
-var operation = await client.PutAsyncRelativeRetryInvalidJsonPollingAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PutAsyncRelativeRetryInvalidJsonPollingAsync(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1316,7 +1316,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.PutAsyncRelativeRetryInvalidJsonPolling(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRelativeRetryInvalidJsonPolling(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1337,7 +1337,7 @@ var data = new {
location = "",
};
-var operation = client.PutAsyncRelativeRetryInvalidJsonPolling(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PutAsyncRelativeRetryInvalidJsonPolling(WaitUntil.Completed, RequestContent.Create(data));
BinaryData responseData = operation.Value;
JsonElement result = JsonDocument.Parse(responseData.ToStream()).RootElement;
@@ -1438,7 +1438,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.Post202RetryInvalidHeaderAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Post202RetryInvalidHeaderAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -1457,7 +1457,7 @@ var data = new {
location = "",
};
-var operation = await client.Post202RetryInvalidHeaderAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.Post202RetryInvalidHeaderAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -1472,7 +1472,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.Post202RetryInvalidHeader(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Post202RetryInvalidHeader(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -1491,7 +1491,7 @@ var data = new {
location = "",
};
-var operation = client.Post202RetryInvalidHeader(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.Post202RetryInvalidHeader(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -1506,7 +1506,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.PostAsyncRelativeRetryInvalidHeaderAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRelativeRetryInvalidHeaderAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -1525,7 +1525,7 @@ var data = new {
location = "",
};
-var operation = await client.PostAsyncRelativeRetryInvalidHeaderAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRelativeRetryInvalidHeaderAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -1540,7 +1540,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.PostAsyncRelativeRetryInvalidHeader(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRelativeRetryInvalidHeader(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -1559,7 +1559,7 @@ var data = new {
location = "",
};
-var operation = client.PostAsyncRelativeRetryInvalidHeader(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRelativeRetryInvalidHeader(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -1574,7 +1574,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = await client.PostAsyncRelativeRetryInvalidJsonPollingAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRelativeRetryInvalidJsonPollingAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -1593,7 +1593,7 @@ var data = new {
location = "",
};
-var operation = await client.PostAsyncRelativeRetryInvalidJsonPollingAsync(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = await client.PostAsyncRelativeRetryInvalidJsonPollingAsync(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -1608,7 +1608,7 @@ var client = new LrosaDsClient(credential);
var data = new {};
-var operation = client.PostAsyncRelativeRetryInvalidJsonPolling(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRelativeRetryInvalidJsonPolling(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
@@ -1627,7 +1627,7 @@ var data = new {
location = "",
};
-var operation = client.PostAsyncRelativeRetryInvalidJsonPolling(WaitUntil.Completed, RequestContent.Create(data), new RequestContext());
+var operation = client.PostAsyncRelativeRetryInvalidJsonPolling(WaitUntil.Completed, RequestContent.Create(data));
Console.WriteLine(operation.GetRawResponse().Status);
]]>
diff --git a/test/TestServerProjectsLowLevel/lro/src/Generated/LRORetrysClient.cs b/test/TestServerProjectsLowLevel/lro/src/Generated/LRORetrysClient.cs
index cd162b781b1..9268f39358e 100644
--- a/test/TestServerProjectsLowLevel/lro/src/Generated/LRORetrysClient.cs
+++ b/test/TestServerProjectsLowLevel/lro/src/Generated/LRORetrysClient.cs
@@ -73,7 +73,7 @@ public LRORetrysClient(AzureKeyCredential credential, Uri endpoint, AutoRestLong
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> Put201CreatingSucceeded200Async(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> Put201CreatingSucceeded200Async(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LRORetrysClient.Put201CreatingSucceeded200");
scope.Start();
@@ -105,7 +105,7 @@ public virtual async Task> Put201CreatingSucceeded200Async
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation Put201CreatingSucceeded200(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation Put201CreatingSucceeded200(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LRORetrysClient.Put201CreatingSucceeded200");
scope.Start();
@@ -137,7 +137,7 @@ public virtual Operation Put201CreatingSucceeded200(WaitUntil waitUn
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> PutAsyncRelativeRetrySucceededAsync(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> PutAsyncRelativeRetrySucceededAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LRORetrysClient.PutAsyncRelativeRetrySucceeded");
scope.Start();
@@ -169,7 +169,7 @@ public virtual async Task> PutAsyncRelativeRetrySucceededA
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation PutAsyncRelativeRetrySucceeded(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation PutAsyncRelativeRetrySucceeded(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LRORetrysClient.PutAsyncRelativeRetrySucceeded");
scope.Start();
@@ -387,7 +387,7 @@ public virtual Operation DeleteAsyncRelativeRetrySucceeded(WaitUntil waitUntil,
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task Post202Retry200Async(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task Post202Retry200Async(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LRORetrysClient.Post202Retry200");
scope.Start();
@@ -419,7 +419,7 @@ public virtual async Task Post202Retry200Async(WaitUntil waitUntil, R
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation Post202Retry200(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation Post202Retry200(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LRORetrysClient.Post202Retry200");
scope.Start();
@@ -451,7 +451,7 @@ public virtual Operation Post202Retry200(WaitUntil waitUntil, RequestContent con
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task PostAsyncRelativeRetrySucceededAsync(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task PostAsyncRelativeRetrySucceededAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LRORetrysClient.PostAsyncRelativeRetrySucceeded");
scope.Start();
@@ -483,7 +483,7 @@ public virtual async Task PostAsyncRelativeRetrySucceededAsync(WaitUn
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation PostAsyncRelativeRetrySucceeded(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation PostAsyncRelativeRetrySucceeded(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LRORetrysClient.PostAsyncRelativeRetrySucceeded");
scope.Start();
diff --git a/test/TestServerProjectsLowLevel/lro/src/Generated/LROsClient.cs b/test/TestServerProjectsLowLevel/lro/src/Generated/LROsClient.cs
index fead27ac220..4abb285d9a4 100644
--- a/test/TestServerProjectsLowLevel/lro/src/Generated/LROsClient.cs
+++ b/test/TestServerProjectsLowLevel/lro/src/Generated/LROsClient.cs
@@ -73,7 +73,7 @@ public LROsClient(AzureKeyCredential credential, Uri endpoint, AutoRestLongRunni
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> Put200SucceededAsync(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> Put200SucceededAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Put200Succeeded");
scope.Start();
@@ -105,7 +105,7 @@ public virtual async Task> Put200SucceededAsync(WaitUntil
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation Put200Succeeded(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation Put200Succeeded(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Put200Succeeded");
scope.Start();
@@ -137,7 +137,7 @@ public virtual Operation Put200Succeeded(WaitUntil waitUntil, Reques
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> Patch200SucceededIgnoreHeadersAsync(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> Patch200SucceededIgnoreHeadersAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Patch200SucceededIgnoreHeaders");
scope.Start();
@@ -169,7 +169,7 @@ public virtual async Task> Patch200SucceededIgnoreHeadersA
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation Patch200SucceededIgnoreHeaders(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation Patch200SucceededIgnoreHeaders(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Patch200SucceededIgnoreHeaders");
scope.Start();
@@ -201,7 +201,7 @@ public virtual Operation Patch200SucceededIgnoreHeaders(WaitUntil wa
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> Patch201RetryWithAsyncHeaderAsync(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> Patch201RetryWithAsyncHeaderAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Patch201RetryWithAsyncHeader");
scope.Start();
@@ -233,7 +233,7 @@ public virtual async Task> Patch201RetryWithAsyncHeaderAsy
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation Patch201RetryWithAsyncHeader(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation Patch201RetryWithAsyncHeader(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Patch201RetryWithAsyncHeader");
scope.Start();
@@ -265,7 +265,7 @@ public virtual Operation Patch201RetryWithAsyncHeader(WaitUntil wait
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> Patch202RetryWithAsyncAndLocationHeaderAsync(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> Patch202RetryWithAsyncAndLocationHeaderAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Patch202RetryWithAsyncAndLocationHeader");
scope.Start();
@@ -297,7 +297,7 @@ public virtual async Task> Patch202RetryWithAsyncAndLocati
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation Patch202RetryWithAsyncAndLocationHeader(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation Patch202RetryWithAsyncAndLocationHeader(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Patch202RetryWithAsyncAndLocationHeader");
scope.Start();
@@ -329,7 +329,7 @@ public virtual Operation Patch202RetryWithAsyncAndLocationHeader(Wai
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> Put201SucceededAsync(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> Put201SucceededAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Put201Succeeded");
scope.Start();
@@ -361,7 +361,7 @@ public virtual async Task> Put201SucceededAsync(WaitUntil
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation Put201Succeeded(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation Put201Succeeded(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Put201Succeeded");
scope.Start();
@@ -455,7 +455,7 @@ public virtual Operation Post202List(WaitUntil waitUntil, RequestCon
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> Put200SucceededNoStateAsync(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> Put200SucceededNoStateAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Put200SucceededNoState");
scope.Start();
@@ -487,7 +487,7 @@ public virtual async Task> Put200SucceededNoStateAsync(Wai
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation Put200SucceededNoState(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation Put200SucceededNoState(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Put200SucceededNoState");
scope.Start();
@@ -519,7 +519,7 @@ public virtual Operation Put200SucceededNoState(WaitUntil waitUntil,
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> Put202Retry200Async(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> Put202Retry200Async(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Put202Retry200");
scope.Start();
@@ -551,7 +551,7 @@ public virtual async Task> Put202Retry200Async(WaitUntil w
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation Put202Retry200(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation Put202Retry200(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Put202Retry200");
scope.Start();
@@ -583,7 +583,7 @@ public virtual Operation Put202Retry200(WaitUntil waitUntil, Request
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> Put201CreatingSucceeded200Async(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> Put201CreatingSucceeded200Async(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Put201CreatingSucceeded200");
scope.Start();
@@ -615,7 +615,7 @@ public virtual async Task> Put201CreatingSucceeded200Async
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation Put201CreatingSucceeded200(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation Put201CreatingSucceeded200(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Put201CreatingSucceeded200");
scope.Start();
@@ -647,7 +647,7 @@ public virtual Operation Put201CreatingSucceeded200(WaitUntil waitUn
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> Put200UpdatingSucceeded204Async(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> Put200UpdatingSucceeded204Async(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Put200UpdatingSucceeded204");
scope.Start();
@@ -679,7 +679,7 @@ public virtual async Task> Put200UpdatingSucceeded204Async
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation Put200UpdatingSucceeded204(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation Put200UpdatingSucceeded204(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Put200UpdatingSucceeded204");
scope.Start();
@@ -711,7 +711,7 @@ public virtual Operation Put200UpdatingSucceeded204(WaitUntil waitUn
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> Put201CreatingFailed200Async(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> Put201CreatingFailed200Async(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Put201CreatingFailed200");
scope.Start();
@@ -743,7 +743,7 @@ public virtual async Task> Put201CreatingFailed200Async(Wa
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation Put201CreatingFailed200(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation Put201CreatingFailed200(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Put201CreatingFailed200");
scope.Start();
@@ -775,7 +775,7 @@ public virtual Operation Put201CreatingFailed200(WaitUntil waitUntil
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> Put200Acceptedcanceled200Async(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> Put200Acceptedcanceled200Async(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Put200Acceptedcanceled200");
scope.Start();
@@ -807,7 +807,7 @@ public virtual async Task> Put200Acceptedcanceled200Async(
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation Put200Acceptedcanceled200(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation Put200Acceptedcanceled200(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.Put200Acceptedcanceled200");
scope.Start();
@@ -839,7 +839,7 @@ public virtual Operation Put200Acceptedcanceled200(WaitUntil waitUnt
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> PutNoHeaderInRetryAsync(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> PutNoHeaderInRetryAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.PutNoHeaderInRetry");
scope.Start();
@@ -871,7 +871,7 @@ public virtual async Task> PutNoHeaderInRetryAsync(WaitUnt
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation PutNoHeaderInRetry(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation PutNoHeaderInRetry(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.PutNoHeaderInRetry");
scope.Start();
@@ -903,7 +903,7 @@ public virtual Operation PutNoHeaderInRetry(WaitUntil waitUntil, Req
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> PutAsyncRetrySucceededAsync(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> PutAsyncRetrySucceededAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.PutAsyncRetrySucceeded");
scope.Start();
@@ -935,7 +935,7 @@ public virtual async Task> PutAsyncRetrySucceededAsync(Wai
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation PutAsyncRetrySucceeded(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation PutAsyncRetrySucceeded(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.PutAsyncRetrySucceeded");
scope.Start();
@@ -967,7 +967,7 @@ public virtual Operation PutAsyncRetrySucceeded(WaitUntil waitUntil,
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> PutAsyncNoRetrySucceededAsync(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> PutAsyncNoRetrySucceededAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.PutAsyncNoRetrySucceeded");
scope.Start();
@@ -999,7 +999,7 @@ public virtual async Task> PutAsyncNoRetrySucceededAsync(W
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation PutAsyncNoRetrySucceeded(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation PutAsyncNoRetrySucceeded(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.PutAsyncNoRetrySucceeded");
scope.Start();
@@ -1031,7 +1031,7 @@ public virtual Operation PutAsyncNoRetrySucceeded(WaitUntil waitUnti
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> PutAsyncRetryFailedAsync(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> PutAsyncRetryFailedAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.PutAsyncRetryFailed");
scope.Start();
@@ -1063,7 +1063,7 @@ public virtual async Task> PutAsyncRetryFailedAsync(WaitUn
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual Operation PutAsyncRetryFailed(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual Operation PutAsyncRetryFailed(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.PutAsyncRetryFailed");
scope.Start();
@@ -1095,7 +1095,7 @@ public virtual Operation PutAsyncRetryFailed(WaitUntil waitUntil, Re
/// Service returned a non-success status code.
/// The representing an asynchronous operation on the service.
///
- public virtual async Task> PutAsyncNoRetrycanceledAsync(WaitUntil waitUntil, RequestContent content, RequestContext context)
+ public virtual async Task> PutAsyncNoRetrycanceledAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null)
{
using var scope = ClientDiagnostics.CreateScope("LROsClient.PutAsyncNoRetrycanceled");
scope.Start();
@@ -1127,7 +1127,7 @@ public virtual async Task> PutAsyncNoRetrycanceledAsync(Wa
/// Service returned a non-success status code.
/// The