diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Providers/ScmMethodProviderCollection.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Providers/ScmMethodProviderCollection.cs index 5386c7e070..9d15700917 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Providers/ScmMethodProviderCollection.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Providers/ScmMethodProviderCollection.cs @@ -75,7 +75,7 @@ private ScmMethodProvider BuildConvenienceMethod(MethodProvider protocolMethod, methodModifier, GetResponseType(Operation.Responses, true, isAsync, out var responseBodyType), null, - isAsync ? [.. ConvenienceMethodParameters, ScmKnownParameters.CancellationToken] : ConvenienceMethodParameters); + [.. ConvenienceMethodParameters, ScmKnownParameters.CancellationToken]); MethodBodyStatement[] methodBody; @@ -84,7 +84,7 @@ private ScmMethodProvider BuildConvenienceMethod(MethodProvider protocolMethod, methodBody = [ .. GetStackVariablesForProtocolParamConversion(ConvenienceMethodParameters, out var declarations), - Return(This.Invoke(protocolMethod.Signature, [.. GetProtocolMethodArguments(ConvenienceMethodParameters, declarations, isAsync)], isAsync)) + Return(This.Invoke(protocolMethod.Signature, [.. GetProtocolMethodArguments(ConvenienceMethodParameters, declarations)], isAsync)) ]; } else @@ -92,7 +92,7 @@ .. GetStackVariablesForProtocolParamConversion(ConvenienceMethodParameters, out methodBody = [ .. GetStackVariablesForProtocolParamConversion(ConvenienceMethodParameters, out var paramDeclarations), - Declare("result", This.Invoke(protocolMethod.Signature, [.. GetProtocolMethodArguments(ConvenienceMethodParameters, paramDeclarations, isAsync)], isAsync).ToApi(), out ClientResponseApi result), + Declare("result", This.Invoke(protocolMethod.Signature, [.. GetProtocolMethodArguments(ConvenienceMethodParameters, paramDeclarations)], isAsync).ToApi(), out ClientResponseApi result), .. GetStackVariablesForReturnValueConversion(result, responseBodyType, isAsync, out var resultDeclarations), Return(result.FromValue(GetResultConversion(result, result.GetRawResponse(), responseBodyType, resultDeclarations), result.GetRawResponse())), ]; @@ -314,8 +314,7 @@ private ValueExpression GetResultConversion(ClientResponseApi result, HttpRespon private IReadOnlyList GetProtocolMethodArguments( IReadOnlyList convenienceMethodParameters, - Dictionary declarations, - bool isAsync) + Dictionary declarations) { List conversions = new List(); bool addedSpreadSource = false; @@ -362,12 +361,10 @@ private IReadOnlyList GetProtocolMethodArguments( conversions.Add(param); } } + // RequestOptions argument + conversions.Add(IHttpRequestOptionsApiSnippets.FromCancellationToken(ScmKnownParameters.CancellationToken)); - conversions.Add( - isAsync - ? IHttpRequestOptionsApiSnippets.FromCancellationToken(ScmKnownParameters.CancellationToken) - : ScmKnownParameters.RequestOptions.PositionalReference(Null)); return conversions; } diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/ClientProviderCustomizationTests.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/ClientProviderCustomizationTests.cs index b8783a6c1f..c4200d86cd 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/ClientProviderCustomizationTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/ClientProviderCustomizationTests.cs @@ -102,7 +102,7 @@ public async Task CanAddMethodSameName() var helloAgainMethod = clientProviderMethods.FirstOrDefault(m => m.Signature.Name == "HelloAgain" && m.Signature.Parameters.Count > 0 && m.Signature.Parameters[0].Name == "p1"); Assert.IsNotNull(helloAgainMethod); - Assert.AreEqual(1, helloAgainMethod!.Signature.Parameters.Count); + Assert.AreEqual(2, helloAgainMethod!.Signature.Parameters.Count); // The custom code view should contain the method var customCodeView = clientProvider.CustomCodeView; @@ -187,7 +187,7 @@ public async Task CanReplaceStructMethod(bool isStructCustomized) Assert.AreEqual("HelloAgain", customMethods[0].Signature.Name); var customMethodParams = customMethods[0].Signature.Parameters; - Assert.AreEqual(1, customMethodParams.Count); + Assert.AreEqual(2, customMethodParams.Count); Assert.AreEqual("p1", customMethodParams[0].Name); Assert.AreEqual("MyStruct", customMethodParams[0].Type.Name); Assert.AreEqual(isStructCustomized ? "Sample.TestClient" : string.Empty, customMethodParams[0].Type.Namespace); diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/ClientProviderTests.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/ClientProviderTests.cs index cd6d805f74..86c646ea64 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/ClientProviderTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/ClientProviderTests.cs @@ -422,7 +422,7 @@ public void ValidateClientWithSpread(InputClient inputClient) var convenienceMethods = methods.Where(m => m.Signature.Parameters.Any(p => p.Type.Equals(typeof(string)))).ToList(); Assert.AreEqual(2, convenienceMethods.Count); - Assert.AreEqual(1, convenienceMethods[0].Signature.Parameters.Count); + Assert.AreEqual(2, convenienceMethods[0].Signature.Parameters.Count); Assert.AreEqual(new CSharpType(typeof(string)), convenienceMethods[0].Signature.Parameters[0].Type); Assert.AreEqual("p1", convenienceMethods[0].Signature.Parameters[0].Name); diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderCustomizationTests/CanReplaceStructMethod(False)/CanReplaceStructMethod.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderCustomizationTests/CanReplaceStructMethod(False)/CanReplaceStructMethod.cs index 7920183098..ba2608531f 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderCustomizationTests/CanReplaceStructMethod(False)/CanReplaceStructMethod.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderCustomizationTests/CanReplaceStructMethod(False)/CanReplaceStructMethod.cs @@ -11,7 +11,7 @@ namespace Sample /// public partial class TestClient { - public virtual ClientResult HelloAgain(MyStruct? p1) + public virtual ClientResult HelloAgain(MyStruct? p1, CancellationToken cancellationToken = default) { } diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderCustomizationTests/CanReplaceStructMethod(True)/CanReplaceStructMethod.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderCustomizationTests/CanReplaceStructMethod(True)/CanReplaceStructMethod.cs index cc6387df2e..14e7bfbf1e 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderCustomizationTests/CanReplaceStructMethod(True)/CanReplaceStructMethod.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderCustomizationTests/CanReplaceStructMethod(True)/CanReplaceStructMethod.cs @@ -11,7 +11,7 @@ namespace Sample /// public partial class TestClient { - public virtual ClientResult HelloAgain(MyStruct? p1) + public virtual ClientResult HelloAgain(MyStruct? p1, CancellationToken cancellationToken = default) { } diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/ValidateQueryParamWriterDiff(False).cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/ValidateQueryParamWriterDiff(False).cs index 70d38a0816..594dd3d162 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/ValidateQueryParamWriterDiff(False).cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ClientProviders/TestData/ClientProviderTests/ValidateQueryParamWriterDiff(False).cs @@ -3,6 +3,8 @@ #nullable disable using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading; using Sample.Models; namespace Sample @@ -10,9 +12,9 @@ namespace Sample /// public partial class TestClient { - public virtual global::System.ClientModel.ClientResult Operation(global::Sample.Models.InputEnum queryParam) + public virtual global::System.ClientModel.ClientResult Operation(global::Sample.Models.InputEnum queryParam, global::System.Threading.CancellationToken cancellationToken = default) { - return this.Operation(queryParam.ToString(), options: null); + return this.Operation(queryParam.ToString(), cancellationToken.CanBeCanceled ? new global::System.ClientModel.Primitives.RequestOptions { CancellationToken = cancellationToken } : null); } } } diff --git a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ScmMethodProviderCollectionTests.cs b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ScmMethodProviderCollectionTests.cs index 1a120915a2..70d83bd896 100644 --- a/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ScmMethodProviderCollectionTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/test/Providers/ScmMethodProviderCollectionTests.cs @@ -57,14 +57,15 @@ public void TestDefaultCSharpMethodCollection(InputOperation inputOperation) if (spreadInputParameter != null) { var spreadModelProperties = _spreadModel.Properties; - Assert.AreEqual(spreadModelProperties.Count + 1, convenienceMethodParams.Count); + // model properties + 2 (parameter and cancellation token) + Assert.AreEqual(spreadModelProperties.Count + 2, convenienceMethodParams.Count); Assert.AreEqual("p1", convenienceMethodParams[0].Name); Assert.AreEqual(spreadModelProperties[0].Name, convenienceMethodParams[1].Name); } } [TestCaseSource(nameof(DefaultCSharpMethodCollectionTestCases))] - public void AsyncMethodsHaveOptionalCancellationToken(InputOperation inputOperation) + public void ConvenienceMethodsHaveOptionalCancellationToken(InputOperation inputOperation) { var inputClient = InputFactory.Client("TestClient", operations: [inputOperation]); @@ -87,6 +88,19 @@ public void AsyncMethodsHaveOptionalCancellationToken(InputOperation inputOperat Assert.IsTrue(lastParameter.Type.Equals(typeof(CancellationToken))); Assert.IsFalse(lastParameter.Type.IsNullable); Assert.AreEqual(Snippet.Default, lastParameter.DefaultValue); + + var syncConvenienceMethod = methodCollection.FirstOrDefault(m + => !m.Signature.Parameters.Any(p => p.Name == "content") + && m.Signature.Name == inputOperation.Name.ToCleanName()); + Assert.IsNotNull(syncConvenienceMethod); + + var syncConvenienceMethodParameters = syncConvenienceMethod!.Signature.Parameters; + Assert.IsNotNull(syncConvenienceMethodParameters); + + lastParameter = syncConvenienceMethodParameters.Last(); + Assert.IsTrue(lastParameter.Type.Equals(typeof(CancellationToken))); + Assert.IsFalse(lastParameter.Type.IsNullable); + Assert.AreEqual(Snippet.Default, lastParameter.DefaultValue); } public static IEnumerable DefaultCSharpMethodCollectionTestCases diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Parameters/Spread/SpreadTests.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Parameters/Spread/SpreadTests.cs index 10b0f72bb6..011fb1f231 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Parameters/Spread/SpreadTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch.Tests/Http/Parameters/Spread/SpreadTests.cs @@ -154,10 +154,9 @@ private static void ValidateConvenienceMethodParameters(MethodInfo method, IEnum { if (IsProtocolMethod(method)) return; - if (method.Name.EndsWith("Async")) - { - expected = expected.Append((typeof(CancellationToken), "cancellationToken", false)); - } + + expected = expected.Append((typeof(CancellationToken), "cancellationToken", false)); + var parameters = method.GetParameters().Where(p => !p.ParameterType.Equals(typeof(RequestOptions))); var parameterTypes = parameters.Select(p => p.ParameterType); var parameterNames = parameters.Select(p => p.Name); diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/authentication/api-key/src/Generated/ApiKeyClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/authentication/api-key/src/Generated/ApiKeyClient.cs index b603bd7c8e..1734147bbe 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/authentication/api-key/src/Generated/ApiKeyClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/authentication/api-key/src/Generated/ApiKeyClient.cs @@ -24,7 +24,7 @@ public partial class ApiKeyClient public virtual Task ValidAsync(RequestOptions options) => throw null; - public virtual ClientResult Valid() => throw null; + public virtual ClientResult Valid(CancellationToken cancellationToken = default) => throw null; public virtual Task ValidAsync(CancellationToken cancellationToken = default) => throw null; @@ -32,7 +32,7 @@ public partial class ApiKeyClient public virtual Task InvalidAsync(RequestOptions options) => throw null; - public virtual ClientResult Invalid() => throw null; + public virtual ClientResult Invalid(CancellationToken cancellationToken = default) => throw null; public virtual Task InvalidAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/authentication/http/custom/src/Generated/CustomClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/authentication/http/custom/src/Generated/CustomClient.cs index 68ff6b795d..18db40d8e7 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/authentication/http/custom/src/Generated/CustomClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/authentication/http/custom/src/Generated/CustomClient.cs @@ -24,7 +24,7 @@ public partial class CustomClient public virtual Task ValidAsync(RequestOptions options) => throw null; - public virtual ClientResult Valid() => throw null; + public virtual ClientResult Valid(CancellationToken cancellationToken = default) => throw null; public virtual Task ValidAsync(CancellationToken cancellationToken = default) => throw null; @@ -32,7 +32,7 @@ public partial class CustomClient public virtual Task InvalidAsync(RequestOptions options) => throw null; - public virtual ClientResult Invalid() => throw null; + public virtual ClientResult Invalid(CancellationToken cancellationToken = default) => throw null; public virtual Task InvalidAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/authentication/oauth2/src/Generated/OAuth2Client.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/authentication/oauth2/src/Generated/OAuth2Client.cs index ebeacd6ad6..6e31c0b88e 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/authentication/oauth2/src/Generated/OAuth2Client.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/authentication/oauth2/src/Generated/OAuth2Client.cs @@ -22,7 +22,7 @@ public partial class OAuth2Client public virtual Task ValidAsync(RequestOptions options) => throw null; - public virtual ClientResult Valid() => throw null; + public virtual ClientResult Valid(CancellationToken cancellationToken = default) => throw null; public virtual Task ValidAsync(CancellationToken cancellationToken = default) => throw null; @@ -30,7 +30,7 @@ public partial class OAuth2Client public virtual Task InvalidAsync(RequestOptions options) => throw null; - public virtual ClientResult Invalid() => throw null; + public virtual ClientResult Invalid(CancellationToken cancellationToken = default) => throw null; public virtual Task InvalidAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/authentication/union/src/Generated/UnionClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/authentication/union/src/Generated/UnionClient.cs index ca3b150f0c..d1eba3a52a 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/authentication/union/src/Generated/UnionClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/authentication/union/src/Generated/UnionClient.cs @@ -24,7 +24,7 @@ public partial class UnionClient public virtual Task ValidKeyAsync(RequestOptions options) => throw null; - public virtual ClientResult ValidKey() => throw null; + public virtual ClientResult ValidKey(CancellationToken cancellationToken = default) => throw null; public virtual Task ValidKeyAsync(CancellationToken cancellationToken = default) => throw null; @@ -32,7 +32,7 @@ public partial class UnionClient public virtual Task ValidTokenAsync(RequestOptions options) => throw null; - public virtual ClientResult ValidToken() => throw null; + public virtual ClientResult ValidToken(CancellationToken cancellationToken = default) => throw null; public virtual Task ValidTokenAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/naming/src/Generated/ClientModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/naming/src/Generated/ClientModel.cs index de71ca5c8b..b5d5c4f04d 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/naming/src/Generated/ClientModel.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/naming/src/Generated/ClientModel.cs @@ -20,7 +20,7 @@ public partial class ClientModel public virtual Task ClientAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Client(Models.ClientModel body) => throw null; + public virtual ClientResult Client(Models.ClientModel body, CancellationToken cancellationToken = default) => throw null; public virtual Task ClientAsync(Models.ClientModel body, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class ClientModel public virtual Task LanguageAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Language(CSModel body) => throw null; + public virtual ClientResult Language(CSModel body, CancellationToken cancellationToken = default) => throw null; public virtual Task LanguageAsync(CSModel body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/naming/src/Generated/NamingClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/naming/src/Generated/NamingClient.cs index 3e00899ec9..aa6429d1eb 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/naming/src/Generated/NamingClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/naming/src/Generated/NamingClient.cs @@ -23,7 +23,7 @@ public partial class NamingClient public virtual Task ClientNameAsync(RequestOptions options) => throw null; - public virtual ClientResult ClientName() => throw null; + public virtual ClientResult ClientName(CancellationToken cancellationToken = default) => throw null; public virtual Task ClientNameAsync(CancellationToken cancellationToken = default) => throw null; @@ -31,7 +31,7 @@ public partial class NamingClient public virtual Task ParameterAsync(string clientName, RequestOptions options) => throw null; - public virtual ClientResult Parameter(string clientName) => throw null; + public virtual ClientResult Parameter(string clientName, CancellationToken cancellationToken = default) => throw null; public virtual Task ParameterAsync(string clientName, CancellationToken cancellationToken = default) => throw null; @@ -39,7 +39,7 @@ public partial class NamingClient public virtual Task ClientAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Client(ClientNameModel body) => throw null; + public virtual ClientResult Client(ClientNameModel body, CancellationToken cancellationToken = default) => throw null; public virtual Task ClientAsync(ClientNameModel body, CancellationToken cancellationToken = default) => throw null; @@ -47,7 +47,7 @@ public partial class NamingClient public virtual Task LanguageAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Language(LanguageClientNameModel body) => throw null; + public virtual ClientResult Language(LanguageClientNameModel body, CancellationToken cancellationToken = default) => throw null; public virtual Task LanguageAsync(LanguageClientNameModel body, CancellationToken cancellationToken = default) => throw null; @@ -55,7 +55,7 @@ public partial class NamingClient public virtual Task CompatibleWithEncodedNameAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult CompatibleWithEncodedName(ClientNameAndJsonEncodedNameModel body) => throw null; + public virtual ClientResult CompatibleWithEncodedName(ClientNameAndJsonEncodedNameModel body, CancellationToken cancellationToken = default) => throw null; public virtual Task CompatibleWithEncodedNameAsync(ClientNameAndJsonEncodedNameModel body, CancellationToken cancellationToken = default) => throw null; @@ -63,7 +63,7 @@ public partial class NamingClient public virtual Task RequestAsync(string clientName, RequestOptions options) => throw null; - public virtual ClientResult Request(string clientName) => throw null; + public virtual ClientResult Request(string clientName, CancellationToken cancellationToken = default) => throw null; public virtual Task RequestAsync(string clientName, CancellationToken cancellationToken = default) => throw null; @@ -71,7 +71,7 @@ public partial class NamingClient public virtual Task ResponseAsync(RequestOptions options) => throw null; - public virtual ClientResult Response() => throw null; + public virtual ClientResult Response(CancellationToken cancellationToken = default) => throw null; public virtual Task ResponseAsync(CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/naming/src/Generated/UnionEnum.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/naming/src/Generated/UnionEnum.cs index 06753f95bd..b0e48fa29e 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/naming/src/Generated/UnionEnum.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/naming/src/Generated/UnionEnum.cs @@ -20,7 +20,7 @@ public partial class UnionEnum public virtual Task UnionEnumNameAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult UnionEnumName(ClientExtensibleEnum body) => throw null; + public virtual ClientResult UnionEnumName(ClientExtensibleEnum body, CancellationToken cancellationToken = default) => throw null; public virtual Task UnionEnumNameAsync(ClientExtensibleEnum body, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class UnionEnum public virtual Task UnionEnumMemberNameAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult UnionEnumMemberName(ExtensibleEnum body) => throw null; + public virtual ClientResult UnionEnumMemberName(ExtensibleEnum body, CancellationToken cancellationToken = default) => throw null; public virtual Task UnionEnumMemberNameAsync(ExtensibleEnum body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/FirstClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/FirstClient.cs index 6969e06121..bb66571824 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/FirstClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/FirstClient.cs @@ -25,7 +25,7 @@ public partial class FirstClient public virtual Task OneAsync(RequestOptions options) => throw null; - public virtual ClientResult One() => throw null; + public virtual ClientResult One(CancellationToken cancellationToken = default) => throw null; public virtual Task OneAsync(CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/Group3.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/Group3.cs index 36260ac202..56cf60ebb2 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/Group3.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/Group3.cs @@ -19,7 +19,7 @@ public partial class Group3 public virtual Task TwoAsync(RequestOptions options) => throw null; - public virtual ClientResult Two() => throw null; + public virtual ClientResult Two(CancellationToken cancellationToken = default) => throw null; public virtual Task TwoAsync(CancellationToken cancellationToken = default) => throw null; @@ -27,7 +27,7 @@ public partial class Group3 public virtual Task ThreeAsync(RequestOptions options) => throw null; - public virtual ClientResult Three() => throw null; + public virtual ClientResult Three(CancellationToken cancellationToken = default) => throw null; public virtual Task ThreeAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/Group4.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/Group4.cs index e57c04c261..a1a8d231b0 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/Group4.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/Group4.cs @@ -19,7 +19,7 @@ public partial class Group4 public virtual Task FourAsync(RequestOptions options) => throw null; - public virtual ClientResult Four() => throw null; + public virtual ClientResult Four(CancellationToken cancellationToken = default) => throw null; public virtual Task FourAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/Group5.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/Group5.cs index 21587c65c4..e4a9b20594 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/Group5.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/Group5.cs @@ -19,7 +19,7 @@ public partial class Group5 public virtual Task SixAsync(RequestOptions options) => throw null; - public virtual ClientResult Six() => throw null; + public virtual ClientResult Six(CancellationToken cancellationToken = default) => throw null; public virtual Task SixAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/SubNamespaceSecondClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/SubNamespaceSecondClient.cs index f3ef48278c..4277bf3274 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/SubNamespaceSecondClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/client-operation-group/src/Generated/SubNamespaceSecondClient.cs @@ -25,7 +25,7 @@ public partial class SubNamespaceSecondClient public virtual Task FiveAsync(RequestOptions options) => throw null; - public virtual ClientResult Five() => throw null; + public virtual ClientResult Five(CancellationToken cancellationToken = default) => throw null; public virtual Task FiveAsync(CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/Bar.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/Bar.cs index dc4b8c410a..3d7e5e78a3 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/Bar.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/Bar.cs @@ -19,7 +19,7 @@ public partial class Bar public virtual Task FiveAsync(RequestOptions options) => throw null; - public virtual ClientResult Five() => throw null; + public virtual ClientResult Five(CancellationToken cancellationToken = default) => throw null; public virtual Task FiveAsync(CancellationToken cancellationToken = default) => throw null; @@ -27,7 +27,7 @@ public partial class Bar public virtual Task SixAsync(RequestOptions options) => throw null; - public virtual ClientResult Six() => throw null; + public virtual ClientResult Six(CancellationToken cancellationToken = default) => throw null; public virtual Task SixAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/BazFoo.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/BazFoo.cs index 7c3abeee3c..5fb13b8acf 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/BazFoo.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/BazFoo.cs @@ -19,7 +19,7 @@ public partial class BazFoo public virtual Task SevenAsync(RequestOptions options) => throw null; - public virtual ClientResult Seven() => throw null; + public virtual ClientResult Seven(CancellationToken cancellationToken = default) => throw null; public virtual Task SevenAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/Foo.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/Foo.cs index 4e0fad66c7..c3e9e97da5 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/Foo.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/Foo.cs @@ -19,7 +19,7 @@ public partial class Foo public virtual Task ThreeAsync(RequestOptions options) => throw null; - public virtual ClientResult Three() => throw null; + public virtual ClientResult Three(CancellationToken cancellationToken = default) => throw null; public virtual Task ThreeAsync(CancellationToken cancellationToken = default) => throw null; @@ -27,7 +27,7 @@ public partial class Foo public virtual Task FourAsync(RequestOptions options) => throw null; - public virtual ClientResult Four() => throw null; + public virtual ClientResult Four(CancellationToken cancellationToken = default) => throw null; public virtual Task FourAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/Qux.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/Qux.cs index 7c50892b9c..0f3f83ea36 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/Qux.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/Qux.cs @@ -19,7 +19,7 @@ public partial class Qux public virtual Task EightAsync(RequestOptions options) => throw null; - public virtual ClientResult Eight() => throw null; + public virtual ClientResult Eight(CancellationToken cancellationToken = default) => throw null; public virtual Task EightAsync(CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/QuxBar.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/QuxBar.cs index f4e4271cb0..90532bd46a 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/QuxBar.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/QuxBar.cs @@ -19,7 +19,7 @@ public partial class QuxBar public virtual Task NineAsync(RequestOptions options) => throw null; - public virtual ClientResult Nine() => throw null; + public virtual ClientResult Nine(CancellationToken cancellationToken = default) => throw null; public virtual Task NineAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/ServiceClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/ServiceClient.cs index a75b8c7085..fd72bc03a9 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/ServiceClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/default/src/Generated/ServiceClient.cs @@ -25,7 +25,7 @@ public partial class ServiceClient public virtual Task OneAsync(RequestOptions options) => throw null; - public virtual ClientResult One() => throw null; + public virtual ClientResult One(CancellationToken cancellationToken = default) => throw null; public virtual Task OneAsync(CancellationToken cancellationToken = default) => throw null; @@ -33,7 +33,7 @@ public partial class ServiceClient public virtual Task TwoAsync(RequestOptions options) => throw null; - public virtual ClientResult Two() => throw null; + public virtual ClientResult Two(CancellationToken cancellationToken = default) => throw null; public virtual Task TwoAsync(CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/multi-client/src/Generated/ClientAClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/multi-client/src/Generated/ClientAClient.cs index 727d769d32..d96274613e 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/multi-client/src/Generated/ClientAClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/multi-client/src/Generated/ClientAClient.cs @@ -25,7 +25,7 @@ public partial class ClientAClient public virtual Task RenamedOneAsync(RequestOptions options) => throw null; - public virtual ClientResult RenamedOne() => throw null; + public virtual ClientResult RenamedOne(CancellationToken cancellationToken = default) => throw null; public virtual Task RenamedOneAsync(CancellationToken cancellationToken = default) => throw null; @@ -33,7 +33,7 @@ public partial class ClientAClient public virtual Task RenamedThreeAsync(RequestOptions options) => throw null; - public virtual ClientResult RenamedThree() => throw null; + public virtual ClientResult RenamedThree(CancellationToken cancellationToken = default) => throw null; public virtual Task RenamedThreeAsync(CancellationToken cancellationToken = default) => throw null; @@ -41,7 +41,7 @@ public partial class ClientAClient public virtual Task RenamedFiveAsync(RequestOptions options) => throw null; - public virtual ClientResult RenamedFive() => throw null; + public virtual ClientResult RenamedFive(CancellationToken cancellationToken = default) => throw null; public virtual Task RenamedFiveAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/multi-client/src/Generated/ClientBClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/multi-client/src/Generated/ClientBClient.cs index 726536adb1..b55365360c 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/multi-client/src/Generated/ClientBClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/multi-client/src/Generated/ClientBClient.cs @@ -25,7 +25,7 @@ public partial class ClientBClient public virtual Task RenamedTwoAsync(RequestOptions options) => throw null; - public virtual ClientResult RenamedTwo() => throw null; + public virtual ClientResult RenamedTwo(CancellationToken cancellationToken = default) => throw null; public virtual Task RenamedTwoAsync(CancellationToken cancellationToken = default) => throw null; @@ -33,7 +33,7 @@ public partial class ClientBClient public virtual Task RenamedFourAsync(RequestOptions options) => throw null; - public virtual ClientResult RenamedFour() => throw null; + public virtual ClientResult RenamedFour(CancellationToken cancellationToken = default) => throw null; public virtual Task RenamedFourAsync(CancellationToken cancellationToken = default) => throw null; @@ -41,7 +41,7 @@ public partial class ClientBClient public virtual Task RenamedSixAsync(RequestOptions options) => throw null; - public virtual ClientResult RenamedSix() => throw null; + public virtual ClientResult RenamedSix(CancellationToken cancellationToken = default) => throw null; public virtual Task RenamedSixAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/renamed-operation/src/Generated/Group.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/renamed-operation/src/Generated/Group.cs index c7ef3037d1..8c95144242 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/renamed-operation/src/Generated/Group.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/renamed-operation/src/Generated/Group.cs @@ -19,7 +19,7 @@ public partial class Group public virtual Task RenamedTwoAsync(RequestOptions options) => throw null; - public virtual ClientResult RenamedTwo() => throw null; + public virtual ClientResult RenamedTwo(CancellationToken cancellationToken = default) => throw null; public virtual Task RenamedTwoAsync(CancellationToken cancellationToken = default) => throw null; @@ -27,7 +27,7 @@ public partial class Group public virtual Task RenamedFourAsync(RequestOptions options) => throw null; - public virtual ClientResult RenamedFour() => throw null; + public virtual ClientResult RenamedFour(CancellationToken cancellationToken = default) => throw null; public virtual Task RenamedFourAsync(CancellationToken cancellationToken = default) => throw null; @@ -35,7 +35,7 @@ public partial class Group public virtual Task RenamedSixAsync(RequestOptions options) => throw null; - public virtual ClientResult RenamedSix() => throw null; + public virtual ClientResult RenamedSix(CancellationToken cancellationToken = default) => throw null; public virtual Task RenamedSixAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/renamed-operation/src/Generated/RenamedOperationClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/renamed-operation/src/Generated/RenamedOperationClient.cs index 5b9805a22c..4d0ef0b436 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/renamed-operation/src/Generated/RenamedOperationClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/renamed-operation/src/Generated/RenamedOperationClient.cs @@ -25,7 +25,7 @@ public partial class RenamedOperationClient public virtual Task RenamedOneAsync(RequestOptions options) => throw null; - public virtual ClientResult RenamedOne() => throw null; + public virtual ClientResult RenamedOne(CancellationToken cancellationToken = default) => throw null; public virtual Task RenamedOneAsync(CancellationToken cancellationToken = default) => throw null; @@ -33,7 +33,7 @@ public partial class RenamedOperationClient public virtual Task RenamedThreeAsync(RequestOptions options) => throw null; - public virtual ClientResult RenamedThree() => throw null; + public virtual ClientResult RenamedThree(CancellationToken cancellationToken = default) => throw null; public virtual Task RenamedThreeAsync(CancellationToken cancellationToken = default) => throw null; @@ -41,7 +41,7 @@ public partial class RenamedOperationClient public virtual Task RenamedFiveAsync(RequestOptions options) => throw null; - public virtual ClientResult RenamedFive() => throw null; + public virtual ClientResult RenamedFive(CancellationToken cancellationToken = default) => throw null; public virtual Task RenamedFiveAsync(CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/two-operation-group/src/Generated/Group1.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/two-operation-group/src/Generated/Group1.cs index 23c3a6e4fc..bdb742006f 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/two-operation-group/src/Generated/Group1.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/two-operation-group/src/Generated/Group1.cs @@ -19,7 +19,7 @@ public partial class Group1 public virtual Task OneAsync(RequestOptions options) => throw null; - public virtual ClientResult One() => throw null; + public virtual ClientResult One(CancellationToken cancellationToken = default) => throw null; public virtual Task OneAsync(CancellationToken cancellationToken = default) => throw null; @@ -27,7 +27,7 @@ public partial class Group1 public virtual Task ThreeAsync(RequestOptions options) => throw null; - public virtual ClientResult Three() => throw null; + public virtual ClientResult Three(CancellationToken cancellationToken = default) => throw null; public virtual Task ThreeAsync(CancellationToken cancellationToken = default) => throw null; @@ -35,7 +35,7 @@ public partial class Group1 public virtual Task FourAsync(RequestOptions options) => throw null; - public virtual ClientResult Four() => throw null; + public virtual ClientResult Four(CancellationToken cancellationToken = default) => throw null; public virtual Task FourAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/two-operation-group/src/Generated/Group2.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/two-operation-group/src/Generated/Group2.cs index 83f7506cc7..dc8ad43369 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/two-operation-group/src/Generated/Group2.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/client/structure/two-operation-group/src/Generated/Group2.cs @@ -19,7 +19,7 @@ public partial class Group2 public virtual Task TwoAsync(RequestOptions options) => throw null; - public virtual ClientResult Two() => throw null; + public virtual ClientResult Two(CancellationToken cancellationToken = default) => throw null; public virtual Task TwoAsync(CancellationToken cancellationToken = default) => throw null; @@ -27,7 +27,7 @@ public partial class Group2 public virtual Task FiveAsync(RequestOptions options) => throw null; - public virtual ClientResult Five() => throw null; + public virtual ClientResult Five(CancellationToken cancellationToken = default) => throw null; public virtual Task FiveAsync(CancellationToken cancellationToken = default) => throw null; @@ -35,7 +35,7 @@ public partial class Group2 public virtual Task SixAsync(RequestOptions options) => throw null; - public virtual ClientResult Six() => throw null; + public virtual ClientResult Six(CancellationToken cancellationToken = default) => throw null; public virtual Task SixAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/Header.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/Header.cs index c0df20832f..c9b5ac5efb 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/Header.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/Header.cs @@ -21,7 +21,7 @@ public partial class Header public virtual Task DefaultAsync(BinaryData value, RequestOptions options) => throw null; - public virtual ClientResult Default(BinaryData value) => throw null; + public virtual ClientResult Default(BinaryData value, CancellationToken cancellationToken = default) => throw null; public virtual Task DefaultAsync(BinaryData value, CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class Header public virtual Task Base64Async(BinaryData value, RequestOptions options) => throw null; - public virtual ClientResult Base64(BinaryData value) => throw null; + public virtual ClientResult Base64(BinaryData value, CancellationToken cancellationToken = default) => throw null; public virtual Task Base64Async(BinaryData value, CancellationToken cancellationToken = default) => throw null; @@ -37,7 +37,7 @@ public partial class Header public virtual Task Base64urlAsync(BinaryData value, RequestOptions options) => throw null; - public virtual ClientResult Base64url(BinaryData value) => throw null; + public virtual ClientResult Base64url(BinaryData value, CancellationToken cancellationToken = default) => throw null; public virtual Task Base64urlAsync(BinaryData value, CancellationToken cancellationToken = default) => throw null; @@ -45,7 +45,7 @@ public partial class Header public virtual Task Base64urlArrayAsync(IEnumerable value, RequestOptions options) => throw null; - public virtual ClientResult Base64urlArray(IEnumerable value) => throw null; + public virtual ClientResult Base64urlArray(IEnumerable value, CancellationToken cancellationToken = default) => throw null; public virtual Task Base64urlArrayAsync(IEnumerable value, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/Property.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/Property.cs index 8c68eb5bed..00a562ac6d 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/Property.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/Property.cs @@ -20,7 +20,7 @@ public partial class Property public virtual Task DefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Default(DefaultBytesProperty body) => throw null; + public virtual ClientResult Default(DefaultBytesProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task> DefaultAsync(DefaultBytesProperty body, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Property public virtual Task Base64Async(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Base64(Base64BytesProperty body) => throw null; + public virtual ClientResult Base64(Base64BytesProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task> Base64Async(Base64BytesProperty body, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class Property public virtual Task Base64urlAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Base64url(Base64urlBytesProperty body) => throw null; + public virtual ClientResult Base64url(Base64urlBytesProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task> Base64urlAsync(Base64urlBytesProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class Property public virtual Task Base64urlArrayAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Base64urlArray(Base64urlArrayBytesProperty body) => throw null; + public virtual ClientResult Base64urlArray(Base64urlArrayBytesProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task> Base64urlArrayAsync(Base64urlArrayBytesProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/Query.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/Query.cs index 635e9ce2bc..c0f522c51b 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/Query.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/Query.cs @@ -21,7 +21,7 @@ public partial class Query public virtual Task DefaultAsync(BinaryData value, RequestOptions options) => throw null; - public virtual ClientResult Default(BinaryData value) => throw null; + public virtual ClientResult Default(BinaryData value, CancellationToken cancellationToken = default) => throw null; public virtual Task DefaultAsync(BinaryData value, CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class Query public virtual Task Base64Async(BinaryData value, RequestOptions options) => throw null; - public virtual ClientResult Base64(BinaryData value) => throw null; + public virtual ClientResult Base64(BinaryData value, CancellationToken cancellationToken = default) => throw null; public virtual Task Base64Async(BinaryData value, CancellationToken cancellationToken = default) => throw null; @@ -37,7 +37,7 @@ public partial class Query public virtual Task Base64urlAsync(BinaryData value, RequestOptions options) => throw null; - public virtual ClientResult Base64url(BinaryData value) => throw null; + public virtual ClientResult Base64url(BinaryData value, CancellationToken cancellationToken = default) => throw null; public virtual Task Base64urlAsync(BinaryData value, CancellationToken cancellationToken = default) => throw null; @@ -45,7 +45,7 @@ public partial class Query public virtual Task Base64urlArrayAsync(IEnumerable value, RequestOptions options) => throw null; - public virtual ClientResult Base64urlArray(IEnumerable value) => throw null; + public virtual ClientResult Base64urlArray(IEnumerable value, CancellationToken cancellationToken = default) => throw null; public virtual Task Base64urlArrayAsync(IEnumerable value, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/RequestBody.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/RequestBody.cs index 02d3517de9..b7898078b0 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/RequestBody.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/RequestBody.cs @@ -20,7 +20,7 @@ public partial class RequestBody public virtual Task DefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Default(BinaryData value) => throw null; + public virtual ClientResult Default(BinaryData value, CancellationToken cancellationToken = default) => throw null; public virtual Task DefaultAsync(BinaryData value, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class RequestBody public virtual Task OctetStreamAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult OctetStream(BinaryData value) => throw null; + public virtual ClientResult OctetStream(BinaryData value, CancellationToken cancellationToken = default) => throw null; public virtual Task OctetStreamAsync(BinaryData value, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class RequestBody public virtual Task CustomContentTypeAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult CustomContentType(BinaryData value) => throw null; + public virtual ClientResult CustomContentType(BinaryData value, CancellationToken cancellationToken = default) => throw null; public virtual Task CustomContentTypeAsync(BinaryData value, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class RequestBody public virtual Task Base64Async(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Base64(BinaryData value) => throw null; + public virtual ClientResult Base64(BinaryData value, CancellationToken cancellationToken = default) => throw null; public virtual Task Base64Async(BinaryData value, CancellationToken cancellationToken = default) => throw null; @@ -52,7 +52,7 @@ public partial class RequestBody public virtual Task Base64urlAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Base64url(BinaryData value) => throw null; + public virtual ClientResult Base64url(BinaryData value, CancellationToken cancellationToken = default) => throw null; public virtual Task Base64urlAsync(BinaryData value, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/ResponseBody.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/ResponseBody.cs index 5a88205756..dd849dfa3f 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/ResponseBody.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/bytes/src/Generated/ResponseBody.cs @@ -20,7 +20,7 @@ public partial class ResponseBody public virtual Task DefaultAsync(RequestOptions options) => throw null; - public virtual ClientResult Default() => throw null; + public virtual ClientResult Default(CancellationToken cancellationToken = default) => throw null; public virtual Task> DefaultAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class ResponseBody public virtual Task OctetStreamAsync(RequestOptions options) => throw null; - public virtual ClientResult OctetStream() => throw null; + public virtual ClientResult OctetStream(CancellationToken cancellationToken = default) => throw null; public virtual Task> OctetStreamAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class ResponseBody public virtual Task CustomContentTypeAsync(RequestOptions options) => throw null; - public virtual ClientResult CustomContentType() => throw null; + public virtual ClientResult CustomContentType(CancellationToken cancellationToken = default) => throw null; public virtual Task> CustomContentTypeAsync(CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class ResponseBody public virtual Task Base64Async(RequestOptions options) => throw null; - public virtual ClientResult Base64() => throw null; + public virtual ClientResult Base64(CancellationToken cancellationToken = default) => throw null; public virtual Task> Base64Async(CancellationToken cancellationToken = default) => throw null; @@ -52,7 +52,7 @@ public partial class ResponseBody public virtual Task Base64urlAsync(RequestOptions options) => throw null; - public virtual ClientResult Base64url() => throw null; + public virtual ClientResult Base64url(CancellationToken cancellationToken = default) => throw null; public virtual Task> Base64urlAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/datetime/src/Generated/Header.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/datetime/src/Generated/Header.cs index 41b594923c..a5d0061827 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/datetime/src/Generated/Header.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/datetime/src/Generated/Header.cs @@ -21,7 +21,7 @@ public partial class Header public virtual Task DefaultAsync(DateTimeOffset value, RequestOptions options) => throw null; - public virtual ClientResult Default(DateTimeOffset value) => throw null; + public virtual ClientResult Default(DateTimeOffset value, CancellationToken cancellationToken = default) => throw null; public virtual Task DefaultAsync(DateTimeOffset value, CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class Header public virtual Task Rfc3339Async(DateTimeOffset value, RequestOptions options) => throw null; - public virtual ClientResult Rfc3339(DateTimeOffset value) => throw null; + public virtual ClientResult Rfc3339(DateTimeOffset value, CancellationToken cancellationToken = default) => throw null; public virtual Task Rfc3339Async(DateTimeOffset value, CancellationToken cancellationToken = default) => throw null; @@ -37,7 +37,7 @@ public partial class Header public virtual Task Rfc7231Async(DateTimeOffset value, RequestOptions options) => throw null; - public virtual ClientResult Rfc7231(DateTimeOffset value) => throw null; + public virtual ClientResult Rfc7231(DateTimeOffset value, CancellationToken cancellationToken = default) => throw null; public virtual Task Rfc7231Async(DateTimeOffset value, CancellationToken cancellationToken = default) => throw null; @@ -45,7 +45,7 @@ public partial class Header public virtual Task UnixTimestampAsync(DateTimeOffset value, RequestOptions options) => throw null; - public virtual ClientResult UnixTimestamp(DateTimeOffset value) => throw null; + public virtual ClientResult UnixTimestamp(DateTimeOffset value, CancellationToken cancellationToken = default) => throw null; public virtual Task UnixTimestampAsync(DateTimeOffset value, CancellationToken cancellationToken = default) => throw null; @@ -53,7 +53,7 @@ public partial class Header public virtual Task UnixTimestampArrayAsync(IEnumerable value, RequestOptions options) => throw null; - public virtual ClientResult UnixTimestampArray(IEnumerable value) => throw null; + public virtual ClientResult UnixTimestampArray(IEnumerable value, CancellationToken cancellationToken = default) => throw null; public virtual Task UnixTimestampArrayAsync(IEnumerable value, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/datetime/src/Generated/Property.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/datetime/src/Generated/Property.cs index fe3e3a9514..370a6c9825 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/datetime/src/Generated/Property.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/datetime/src/Generated/Property.cs @@ -20,7 +20,7 @@ public partial class Property public virtual Task DefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Default(DefaultDatetimeProperty body) => throw null; + public virtual ClientResult Default(DefaultDatetimeProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task> DefaultAsync(DefaultDatetimeProperty body, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Property public virtual Task Rfc3339Async(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Rfc3339(Rfc3339DatetimeProperty body) => throw null; + public virtual ClientResult Rfc3339(Rfc3339DatetimeProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task> Rfc3339Async(Rfc3339DatetimeProperty body, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class Property public virtual Task Rfc7231Async(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Rfc7231(Rfc7231DatetimeProperty body) => throw null; + public virtual ClientResult Rfc7231(Rfc7231DatetimeProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task> Rfc7231Async(Rfc7231DatetimeProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class Property public virtual Task UnixTimestampAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult UnixTimestamp(UnixTimestampDatetimeProperty body) => throw null; + public virtual ClientResult UnixTimestamp(UnixTimestampDatetimeProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task> UnixTimestampAsync(UnixTimestampDatetimeProperty body, CancellationToken cancellationToken = default) => throw null; @@ -52,7 +52,7 @@ public partial class Property public virtual Task UnixTimestampArrayAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult UnixTimestampArray(UnixTimestampArrayDatetimeProperty body) => throw null; + public virtual ClientResult UnixTimestampArray(UnixTimestampArrayDatetimeProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task> UnixTimestampArrayAsync(UnixTimestampArrayDatetimeProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/datetime/src/Generated/Query.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/datetime/src/Generated/Query.cs index c797656b6f..9bdd9ef202 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/datetime/src/Generated/Query.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/datetime/src/Generated/Query.cs @@ -21,7 +21,7 @@ public partial class Query public virtual Task DefaultAsync(DateTimeOffset value, RequestOptions options) => throw null; - public virtual ClientResult Default(DateTimeOffset value) => throw null; + public virtual ClientResult Default(DateTimeOffset value, CancellationToken cancellationToken = default) => throw null; public virtual Task DefaultAsync(DateTimeOffset value, CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class Query public virtual Task Rfc3339Async(DateTimeOffset value, RequestOptions options) => throw null; - public virtual ClientResult Rfc3339(DateTimeOffset value) => throw null; + public virtual ClientResult Rfc3339(DateTimeOffset value, CancellationToken cancellationToken = default) => throw null; public virtual Task Rfc3339Async(DateTimeOffset value, CancellationToken cancellationToken = default) => throw null; @@ -37,7 +37,7 @@ public partial class Query public virtual Task Rfc7231Async(DateTimeOffset value, RequestOptions options) => throw null; - public virtual ClientResult Rfc7231(DateTimeOffset value) => throw null; + public virtual ClientResult Rfc7231(DateTimeOffset value, CancellationToken cancellationToken = default) => throw null; public virtual Task Rfc7231Async(DateTimeOffset value, CancellationToken cancellationToken = default) => throw null; @@ -45,7 +45,7 @@ public partial class Query public virtual Task UnixTimestampAsync(DateTimeOffset value, RequestOptions options) => throw null; - public virtual ClientResult UnixTimestamp(DateTimeOffset value) => throw null; + public virtual ClientResult UnixTimestamp(DateTimeOffset value, CancellationToken cancellationToken = default) => throw null; public virtual Task UnixTimestampAsync(DateTimeOffset value, CancellationToken cancellationToken = default) => throw null; @@ -53,7 +53,7 @@ public partial class Query public virtual Task UnixTimestampArrayAsync(IEnumerable value, RequestOptions options) => throw null; - public virtual ClientResult UnixTimestampArray(IEnumerable value) => throw null; + public virtual ClientResult UnixTimestampArray(IEnumerable value, CancellationToken cancellationToken = default) => throw null; public virtual Task UnixTimestampArrayAsync(IEnumerable value, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/datetime/src/Generated/ResponseHeader.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/datetime/src/Generated/ResponseHeader.cs index e4fc12bf31..9ec01d1c0b 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/datetime/src/Generated/ResponseHeader.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/datetime/src/Generated/ResponseHeader.cs @@ -19,7 +19,7 @@ public partial class ResponseHeader public virtual Task DefaultAsync(RequestOptions options) => throw null; - public virtual ClientResult Default() => throw null; + public virtual ClientResult Default(CancellationToken cancellationToken = default) => throw null; public virtual Task DefaultAsync(CancellationToken cancellationToken = default) => throw null; @@ -27,7 +27,7 @@ public partial class ResponseHeader public virtual Task Rfc3339Async(RequestOptions options) => throw null; - public virtual ClientResult Rfc3339() => throw null; + public virtual ClientResult Rfc3339(CancellationToken cancellationToken = default) => throw null; public virtual Task Rfc3339Async(CancellationToken cancellationToken = default) => throw null; @@ -35,7 +35,7 @@ public partial class ResponseHeader public virtual Task Rfc7231Async(RequestOptions options) => throw null; - public virtual ClientResult Rfc7231() => throw null; + public virtual ClientResult Rfc7231(CancellationToken cancellationToken = default) => throw null; public virtual Task Rfc7231Async(CancellationToken cancellationToken = default) => throw null; @@ -43,7 +43,7 @@ public partial class ResponseHeader public virtual Task UnixTimestampAsync(RequestOptions options) => throw null; - public virtual ClientResult UnixTimestamp() => throw null; + public virtual ClientResult UnixTimestamp(CancellationToken cancellationToken = default) => throw null; public virtual Task UnixTimestampAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/duration/src/Generated/Header.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/duration/src/Generated/Header.cs index 956977fab8..4dcb081e36 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/duration/src/Generated/Header.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/duration/src/Generated/Header.cs @@ -21,7 +21,7 @@ public partial class Header public virtual Task DefaultAsync(TimeSpan duration, RequestOptions options) => throw null; - public virtual ClientResult Default(TimeSpan duration) => throw null; + public virtual ClientResult Default(TimeSpan duration, CancellationToken cancellationToken = default) => throw null; public virtual Task DefaultAsync(TimeSpan duration, CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class Header public virtual Task Iso8601Async(TimeSpan duration, RequestOptions options) => throw null; - public virtual ClientResult Iso8601(TimeSpan duration) => throw null; + public virtual ClientResult Iso8601(TimeSpan duration, CancellationToken cancellationToken = default) => throw null; public virtual Task Iso8601Async(TimeSpan duration, CancellationToken cancellationToken = default) => throw null; @@ -37,7 +37,7 @@ public partial class Header public virtual Task Iso8601ArrayAsync(IEnumerable duration, RequestOptions options) => throw null; - public virtual ClientResult Iso8601Array(IEnumerable duration) => throw null; + public virtual ClientResult Iso8601Array(IEnumerable duration, CancellationToken cancellationToken = default) => throw null; public virtual Task Iso8601ArrayAsync(IEnumerable duration, CancellationToken cancellationToken = default) => throw null; @@ -45,7 +45,7 @@ public partial class Header public virtual Task Int32SecondsAsync(TimeSpan duration, RequestOptions options) => throw null; - public virtual ClientResult Int32Seconds(TimeSpan duration) => throw null; + public virtual ClientResult Int32Seconds(TimeSpan duration, CancellationToken cancellationToken = default) => throw null; public virtual Task Int32SecondsAsync(TimeSpan duration, CancellationToken cancellationToken = default) => throw null; @@ -53,7 +53,7 @@ public partial class Header public virtual Task FloatSecondsAsync(TimeSpan duration, RequestOptions options) => throw null; - public virtual ClientResult FloatSeconds(TimeSpan duration) => throw null; + public virtual ClientResult FloatSeconds(TimeSpan duration, CancellationToken cancellationToken = default) => throw null; public virtual Task FloatSecondsAsync(TimeSpan duration, CancellationToken cancellationToken = default) => throw null; @@ -61,7 +61,7 @@ public partial class Header public virtual Task Float64SecondsAsync(TimeSpan duration, RequestOptions options) => throw null; - public virtual ClientResult Float64Seconds(TimeSpan duration) => throw null; + public virtual ClientResult Float64Seconds(TimeSpan duration, CancellationToken cancellationToken = default) => throw null; public virtual Task Float64SecondsAsync(TimeSpan duration, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/duration/src/Generated/Property.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/duration/src/Generated/Property.cs index 5712b27089..0895d90cb2 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/duration/src/Generated/Property.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/duration/src/Generated/Property.cs @@ -20,7 +20,7 @@ public partial class Property public virtual Task DefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Default(DefaultDurationProperty body) => throw null; + public virtual ClientResult Default(DefaultDurationProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task> DefaultAsync(DefaultDurationProperty body, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Property public virtual Task Iso8601Async(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Iso8601(ISO8601DurationProperty body) => throw null; + public virtual ClientResult Iso8601(ISO8601DurationProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task> Iso8601Async(ISO8601DurationProperty body, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class Property public virtual Task Int32SecondsAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Int32Seconds(Int32SecondsDurationProperty body) => throw null; + public virtual ClientResult Int32Seconds(Int32SecondsDurationProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task> Int32SecondsAsync(Int32SecondsDurationProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class Property public virtual Task FloatSecondsAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult FloatSeconds(FloatSecondsDurationProperty body) => throw null; + public virtual ClientResult FloatSeconds(FloatSecondsDurationProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task> FloatSecondsAsync(FloatSecondsDurationProperty body, CancellationToken cancellationToken = default) => throw null; @@ -52,7 +52,7 @@ public partial class Property public virtual Task Float64SecondsAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Float64Seconds(Float64SecondsDurationProperty body) => throw null; + public virtual ClientResult Float64Seconds(Float64SecondsDurationProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task> Float64SecondsAsync(Float64SecondsDurationProperty body, CancellationToken cancellationToken = default) => throw null; @@ -60,7 +60,7 @@ public partial class Property public virtual Task FloatSecondsArrayAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult FloatSecondsArray(FloatSecondsDurationArrayProperty body) => throw null; + public virtual ClientResult FloatSecondsArray(FloatSecondsDurationArrayProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task> FloatSecondsArrayAsync(FloatSecondsDurationArrayProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/duration/src/Generated/Query.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/duration/src/Generated/Query.cs index 332a099b22..acdba548f7 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/duration/src/Generated/Query.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/duration/src/Generated/Query.cs @@ -21,7 +21,7 @@ public partial class Query public virtual Task DefaultAsync(TimeSpan input, RequestOptions options) => throw null; - public virtual ClientResult Default(TimeSpan input) => throw null; + public virtual ClientResult Default(TimeSpan input, CancellationToken cancellationToken = default) => throw null; public virtual Task DefaultAsync(TimeSpan input, CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class Query public virtual Task Iso8601Async(TimeSpan input, RequestOptions options) => throw null; - public virtual ClientResult Iso8601(TimeSpan input) => throw null; + public virtual ClientResult Iso8601(TimeSpan input, CancellationToken cancellationToken = default) => throw null; public virtual Task Iso8601Async(TimeSpan input, CancellationToken cancellationToken = default) => throw null; @@ -37,7 +37,7 @@ public partial class Query public virtual Task Int32SecondsAsync(TimeSpan input, RequestOptions options) => throw null; - public virtual ClientResult Int32Seconds(TimeSpan input) => throw null; + public virtual ClientResult Int32Seconds(TimeSpan input, CancellationToken cancellationToken = default) => throw null; public virtual Task Int32SecondsAsync(TimeSpan input, CancellationToken cancellationToken = default) => throw null; @@ -45,7 +45,7 @@ public partial class Query public virtual Task FloatSecondsAsync(TimeSpan input, RequestOptions options) => throw null; - public virtual ClientResult FloatSeconds(TimeSpan input) => throw null; + public virtual ClientResult FloatSeconds(TimeSpan input, CancellationToken cancellationToken = default) => throw null; public virtual Task FloatSecondsAsync(TimeSpan input, CancellationToken cancellationToken = default) => throw null; @@ -53,7 +53,7 @@ public partial class Query public virtual Task Float64SecondsAsync(TimeSpan input, RequestOptions options) => throw null; - public virtual ClientResult Float64Seconds(TimeSpan input) => throw null; + public virtual ClientResult Float64Seconds(TimeSpan input, CancellationToken cancellationToken = default) => throw null; public virtual Task Float64SecondsAsync(TimeSpan input, CancellationToken cancellationToken = default) => throw null; @@ -61,7 +61,7 @@ public partial class Query public virtual Task Int32SecondsArrayAsync(IEnumerable input, RequestOptions options) => throw null; - public virtual ClientResult Int32SecondsArray(IEnumerable input) => throw null; + public virtual ClientResult Int32SecondsArray(IEnumerable input, CancellationToken cancellationToken = default) => throw null; public virtual Task Int32SecondsArrayAsync(IEnumerable input, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/numeric/src/Generated/Property.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/numeric/src/Generated/Property.cs index 4ebe494bae..f3d58fd18b 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/numeric/src/Generated/Property.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/encode/numeric/src/Generated/Property.cs @@ -20,7 +20,7 @@ public partial class Property public virtual Task SafeintAsStringAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult SafeintAsString(SafeintAsStringProperty value) => throw null; + public virtual ClientResult SafeintAsString(SafeintAsStringProperty value, CancellationToken cancellationToken = default) => throw null; public virtual Task> SafeintAsStringAsync(SafeintAsStringProperty value, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Property public virtual Task Uint32AsStringOptionalAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Uint32AsStringOptional(Uint32AsStringProperty value) => throw null; + public virtual ClientResult Uint32AsStringOptional(Uint32AsStringProperty value, CancellationToken cancellationToken = default) => throw null; public virtual Task> Uint32AsStringOptionalAsync(Uint32AsStringProperty value, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class Property public virtual Task Uint8AsStringAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Uint8AsString(Uint8AsStringProperty value) => throw null; + public virtual ClientResult Uint8AsString(Uint8AsStringProperty value, CancellationToken cancellationToken = default) => throw null; public virtual Task> Uint8AsStringAsync(Uint8AsStringProperty value, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/basic/src/Generated/ExplicitBody.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/basic/src/Generated/ExplicitBody.cs index cfa792021e..93f38dc924 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/basic/src/Generated/ExplicitBody.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/basic/src/Generated/ExplicitBody.cs @@ -20,7 +20,7 @@ public partial class ExplicitBody public virtual Task SimpleAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Simple(User body) => throw null; + public virtual ClientResult Simple(User body, CancellationToken cancellationToken = default) => throw null; public virtual Task SimpleAsync(User body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/basic/src/Generated/ImplicitBody.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/basic/src/Generated/ImplicitBody.cs index cb1aa73180..d0067bcaaa 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/basic/src/Generated/ImplicitBody.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/basic/src/Generated/ImplicitBody.cs @@ -19,7 +19,7 @@ public partial class ImplicitBody public virtual Task SimpleAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Simple(string name) => throw null; + public virtual ClientResult Simple(string name, CancellationToken cancellationToken = default) => throw null; public virtual Task SimpleAsync(string name, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/body-optionality/src/Generated/BodyOptionalityClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/body-optionality/src/Generated/BodyOptionalityClient.cs index 95446075e4..4ea51c3fe6 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/body-optionality/src/Generated/BodyOptionalityClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/body-optionality/src/Generated/BodyOptionalityClient.cs @@ -23,7 +23,7 @@ public partial class BodyOptionalityClient public virtual Task RequiredExplicitAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult RequiredExplicit(BodyModel body) => throw null; + public virtual ClientResult RequiredExplicit(BodyModel body, CancellationToken cancellationToken = default) => throw null; public virtual Task RequiredExplicitAsync(BodyModel body, CancellationToken cancellationToken = default) => throw null; @@ -31,7 +31,7 @@ public partial class BodyOptionalityClient public virtual Task RequiredImplicitAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult RequiredImplicit(string name) => throw null; + public virtual ClientResult RequiredImplicit(string name, CancellationToken cancellationToken = default) => throw null; public virtual Task RequiredImplicitAsync(string name, CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/body-optionality/src/Generated/OptionalExplicit.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/body-optionality/src/Generated/OptionalExplicit.cs index 54dda83a93..13e3b1ac81 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/body-optionality/src/Generated/OptionalExplicit.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/body-optionality/src/Generated/OptionalExplicit.cs @@ -20,7 +20,7 @@ public partial class OptionalExplicit public virtual Task SetAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Set(BodyModel body = null) => throw null; + public virtual ClientResult Set(BodyModel body = null, CancellationToken cancellationToken = default) => throw null; public virtual Task SetAsync(BodyModel body = null, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class OptionalExplicit public virtual Task OmitAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Omit(BodyModel body = null) => throw null; + public virtual ClientResult Omit(BodyModel body = null, CancellationToken cancellationToken = default) => throw null; public virtual Task OmitAsync(BodyModel body = null, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/collection-format/src/Generated/Header.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/collection-format/src/Generated/Header.cs index 611df9bb56..bda19c88a8 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/collection-format/src/Generated/Header.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/collection-format/src/Generated/Header.cs @@ -20,7 +20,7 @@ public partial class Header public virtual Task CsvAsync(IEnumerable colors, RequestOptions options) => throw null; - public virtual ClientResult Csv(IEnumerable colors) => throw null; + public virtual ClientResult Csv(IEnumerable colors, CancellationToken cancellationToken = default) => throw null; public virtual Task CsvAsync(IEnumerable colors, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/collection-format/src/Generated/Query.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/collection-format/src/Generated/Query.cs index e98843490b..7a9c0bf3ed 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/collection-format/src/Generated/Query.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/collection-format/src/Generated/Query.cs @@ -20,7 +20,7 @@ public partial class Query public virtual Task MultiAsync(IEnumerable colors, RequestOptions options) => throw null; - public virtual ClientResult Multi(IEnumerable colors) => throw null; + public virtual ClientResult Multi(IEnumerable colors, CancellationToken cancellationToken = default) => throw null; public virtual Task MultiAsync(IEnumerable colors, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Query public virtual Task SsvAsync(IEnumerable colors, RequestOptions options) => throw null; - public virtual ClientResult Ssv(IEnumerable colors) => throw null; + public virtual ClientResult Ssv(IEnumerable colors, CancellationToken cancellationToken = default) => throw null; public virtual Task SsvAsync(IEnumerable colors, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class Query public virtual Task TsvAsync(IEnumerable colors, RequestOptions options) => throw null; - public virtual ClientResult Tsv(IEnumerable colors) => throw null; + public virtual ClientResult Tsv(IEnumerable colors, CancellationToken cancellationToken = default) => throw null; public virtual Task TsvAsync(IEnumerable colors, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class Query public virtual Task PipesAsync(IEnumerable colors, RequestOptions options) => throw null; - public virtual ClientResult Pipes(IEnumerable colors) => throw null; + public virtual ClientResult Pipes(IEnumerable colors, CancellationToken cancellationToken = default) => throw null; public virtual Task PipesAsync(IEnumerable colors, CancellationToken cancellationToken = default) => throw null; @@ -52,7 +52,7 @@ public partial class Query public virtual Task CsvAsync(IEnumerable colors, RequestOptions options) => throw null; - public virtual ClientResult Csv(IEnumerable colors) => throw null; + public virtual ClientResult Csv(IEnumerable colors, CancellationToken cancellationToken = default) => throw null; public virtual Task CsvAsync(IEnumerable colors, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/spread/src/Generated/Alias.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/spread/src/Generated/Alias.cs index 7624c52f10..dddfff2392 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/spread/src/Generated/Alias.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/spread/src/Generated/Alias.cs @@ -20,7 +20,7 @@ public partial class Alias public virtual Task SpreadAsRequestBodyAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult SpreadAsRequestBody(string name) => throw null; + public virtual ClientResult SpreadAsRequestBody(string name, CancellationToken cancellationToken = default) => throw null; public virtual Task SpreadAsRequestBodyAsync(string name, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Alias public virtual Task SpreadParameterWithInnerModelAsync(string id, string xMsTestHeader, BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult SpreadParameterWithInnerModel(string id, string xMsTestHeader, string name) => throw null; + public virtual ClientResult SpreadParameterWithInnerModel(string id, string xMsTestHeader, string name, CancellationToken cancellationToken = default) => throw null; public virtual Task SpreadParameterWithInnerModelAsync(string id, string xMsTestHeader, string name, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class Alias public virtual Task SpreadAsRequestParameterAsync(string id, string xMsTestHeader, BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult SpreadAsRequestParameter(string id, string xMsTestHeader, string name) => throw null; + public virtual ClientResult SpreadAsRequestParameter(string id, string xMsTestHeader, string name, CancellationToken cancellationToken = default) => throw null; public virtual Task SpreadAsRequestParameterAsync(string id, string xMsTestHeader, string name, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class Alias public virtual Task SpreadWithMultipleParametersAsync(string id, string xMsTestHeader, BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult SpreadWithMultipleParameters(string id, string xMsTestHeader, string requiredString, IEnumerable requiredIntList, int? optionalInt = default, IEnumerable optionalStringList = default) => throw null; + public virtual ClientResult SpreadWithMultipleParameters(string id, string xMsTestHeader, string requiredString, IEnumerable requiredIntList, int? optionalInt = default, IEnumerable optionalStringList = default, CancellationToken cancellationToken = default) => throw null; public virtual Task SpreadWithMultipleParametersAsync(string id, string xMsTestHeader, string requiredString, IEnumerable requiredIntList, int? optionalInt = default, IEnumerable optionalStringList = default, CancellationToken cancellationToken = default) => throw null; @@ -52,7 +52,7 @@ public partial class Alias public virtual Task SpreadParameterWithInnerAliasAsync(string id, string xMsTestHeader, BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult SpreadParameterWithInnerAlias(string id, string xMsTestHeader, string name, int age) => throw null; + public virtual ClientResult SpreadParameterWithInnerAlias(string id, string xMsTestHeader, string name, int age, CancellationToken cancellationToken = default) => throw null; public virtual Task SpreadParameterWithInnerAliasAsync(string id, string xMsTestHeader, string name, int age, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/spread/src/Generated/Model.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/spread/src/Generated/Model.cs index 678cb42f10..e8a6b3fa29 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/spread/src/Generated/Model.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/parameters/spread/src/Generated/Model.cs @@ -20,7 +20,7 @@ public partial class Model public virtual Task SpreadAsRequestBodyAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult SpreadAsRequestBody(string name) => throw null; + public virtual ClientResult SpreadAsRequestBody(string name, CancellationToken cancellationToken = default) => throw null; public virtual Task SpreadAsRequestBodyAsync(string name, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Model public virtual Task SpreadCompositeRequestOnlyWithBodyAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult SpreadCompositeRequestOnlyWithBody(BodyParameter body) => throw null; + public virtual ClientResult SpreadCompositeRequestOnlyWithBody(BodyParameter body, CancellationToken cancellationToken = default) => throw null; public virtual Task SpreadCompositeRequestOnlyWithBodyAsync(BodyParameter body, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class Model public virtual Task SpreadCompositeRequestWithoutBodyAsync(string name, string testHeader, RequestOptions options) => throw null; - public virtual ClientResult SpreadCompositeRequestWithoutBody(string name, string testHeader) => throw null; + public virtual ClientResult SpreadCompositeRequestWithoutBody(string name, string testHeader, CancellationToken cancellationToken = default) => throw null; public virtual Task SpreadCompositeRequestWithoutBodyAsync(string name, string testHeader, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class Model public virtual Task SpreadCompositeRequestAsync(string name, string testHeader, BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult SpreadCompositeRequest(string name, string testHeader, BodyParameter body) => throw null; + public virtual ClientResult SpreadCompositeRequest(string name, string testHeader, BodyParameter body, CancellationToken cancellationToken = default) => throw null; public virtual Task SpreadCompositeRequestAsync(string name, string testHeader, BodyParameter body, CancellationToken cancellationToken = default) => throw null; @@ -52,7 +52,7 @@ public partial class Model public virtual Task SpreadCompositeRequestMixAsync(string name, string testHeader, BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult SpreadCompositeRequestMix(string name, string testHeader, string prop) => throw null; + public virtual ClientResult SpreadCompositeRequestMix(string name, string testHeader, string prop, CancellationToken cancellationToken = default) => throw null; public virtual Task SpreadCompositeRequestMixAsync(string name, string testHeader, string prop, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/content-negotiation/src/Generated/DifferentBody.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/content-negotiation/src/Generated/DifferentBody.cs index e6efb33ff2..3acc6eca8d 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/content-negotiation/src/Generated/DifferentBody.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/content-negotiation/src/Generated/DifferentBody.cs @@ -21,7 +21,7 @@ public partial class DifferentBody public virtual Task GetAvatarAsPngAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAvatarAsPng() => throw null; + public virtual ClientResult GetAvatarAsPng(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAvatarAsPngAsync(CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class DifferentBody public virtual Task GetAvatarAsJsonAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAvatarAsJson() => throw null; + public virtual ClientResult GetAvatarAsJson(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAvatarAsJsonAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/content-negotiation/src/Generated/SameBody.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/content-negotiation/src/Generated/SameBody.cs index 557a1d5a8b..35493a8357 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/content-negotiation/src/Generated/SameBody.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/content-negotiation/src/Generated/SameBody.cs @@ -20,7 +20,7 @@ public partial class SameBody public virtual Task GetAvatarAsPngAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAvatarAsPng() => throw null; + public virtual ClientResult GetAvatarAsPng(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAvatarAsPngAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class SameBody public virtual Task GetAvatarAsJpegAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAvatarAsJpeg() => throw null; + public virtual ClientResult GetAvatarAsJpeg(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAvatarAsJpegAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/json-merge-patch/src/Generated/JsonMergePatchClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/json-merge-patch/src/Generated/JsonMergePatchClient.cs index a0ede8687d..7bfcb15b1b 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/json-merge-patch/src/Generated/JsonMergePatchClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/json-merge-patch/src/Generated/JsonMergePatchClient.cs @@ -23,7 +23,7 @@ public partial class JsonMergePatchClient public virtual Task CreateResourceAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult CreateResource(Resource body) => throw null; + public virtual ClientResult CreateResource(Resource body, CancellationToken cancellationToken = default) => throw null; public virtual Task> CreateResourceAsync(Resource body, CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/media-type/src/Generated/StringBody.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/media-type/src/Generated/StringBody.cs index b3de0edda6..b0e91a7020 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/media-type/src/Generated/StringBody.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/payload/media-type/src/Generated/StringBody.cs @@ -19,7 +19,7 @@ public partial class StringBody public virtual Task SendAsTextAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult SendAsText(string text) => throw null; + public virtual ClientResult SendAsText(string text, CancellationToken cancellationToken = default) => throw null; public virtual Task SendAsTextAsync(string text, CancellationToken cancellationToken = default) => throw null; @@ -27,7 +27,7 @@ public partial class StringBody public virtual Task GetAsTextAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAsText() => throw null; + public virtual ClientResult GetAsText(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsTextAsync(CancellationToken cancellationToken = default) => throw null; @@ -35,7 +35,7 @@ public partial class StringBody public virtual Task SendAsJsonAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult SendAsJson(string text) => throw null; + public virtual ClientResult SendAsJson(string text, CancellationToken cancellationToken = default) => throw null; public virtual Task SendAsJsonAsync(string text, CancellationToken cancellationToken = default) => throw null; @@ -43,7 +43,7 @@ public partial class StringBody public virtual Task GetAsJsonAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAsJson() => throw null; + public virtual ClientResult GetAsJson(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsJsonAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/resiliency/srv-driven/v1/src/Generated/ResiliencyServiceDrivenClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/resiliency/srv-driven/v1/src/Generated/ResiliencyServiceDrivenClient.cs index 8c25a81940..130f148e87 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/resiliency/srv-driven/v1/src/Generated/ResiliencyServiceDrivenClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/resiliency/srv-driven/v1/src/Generated/ResiliencyServiceDrivenClient.cs @@ -24,7 +24,7 @@ public partial class ResiliencyServiceDrivenClient public virtual Task FromNoneAsync(RequestOptions options) => throw null; - public virtual ClientResult FromNone() => throw null; + public virtual ClientResult FromNone(CancellationToken cancellationToken = default) => throw null; public virtual Task FromNoneAsync(CancellationToken cancellationToken = default) => throw null; @@ -32,7 +32,7 @@ public partial class ResiliencyServiceDrivenClient public virtual Task FromOneRequiredAsync(string parameter, RequestOptions options) => throw null; - public virtual ClientResult FromOneRequired(string parameter) => throw null; + public virtual ClientResult FromOneRequired(string parameter, CancellationToken cancellationToken = default) => throw null; public virtual Task FromOneRequiredAsync(string parameter, CancellationToken cancellationToken = default) => throw null; @@ -40,7 +40,7 @@ public partial class ResiliencyServiceDrivenClient public virtual Task FromOneOptionalAsync(string parameter, RequestOptions options) => throw null; - public virtual ClientResult FromOneOptional(string parameter = null) => throw null; + public virtual ClientResult FromOneOptional(string parameter = null, CancellationToken cancellationToken = default) => throw null; public virtual Task FromOneOptionalAsync(string parameter = null, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/resiliency/srv-driven/v2/src/Generated/ResiliencyServiceDrivenClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/resiliency/srv-driven/v2/src/Generated/ResiliencyServiceDrivenClient.cs index 6cc3562d37..11797d94b6 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/resiliency/srv-driven/v2/src/Generated/ResiliencyServiceDrivenClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/resiliency/srv-driven/v2/src/Generated/ResiliencyServiceDrivenClient.cs @@ -24,7 +24,7 @@ public partial class ResiliencyServiceDrivenClient public virtual Task AddOperationAsync(RequestOptions options) => throw null; - public virtual ClientResult AddOperation() => throw null; + public virtual ClientResult AddOperation(CancellationToken cancellationToken = default) => throw null; public virtual Task AddOperationAsync(CancellationToken cancellationToken = default) => throw null; @@ -32,7 +32,7 @@ public partial class ResiliencyServiceDrivenClient public virtual Task FromNoneAsync(string newParameter, RequestOptions options) => throw null; - public virtual ClientResult FromNone(string newParameter = null) => throw null; + public virtual ClientResult FromNone(string newParameter = null, CancellationToken cancellationToken = default) => throw null; public virtual Task FromNoneAsync(string newParameter = null, CancellationToken cancellationToken = default) => throw null; @@ -40,7 +40,7 @@ public partial class ResiliencyServiceDrivenClient public virtual Task FromOneRequiredAsync(string parameter, string newParameter, RequestOptions options) => throw null; - public virtual ClientResult FromOneRequired(string parameter, string newParameter = null) => throw null; + public virtual ClientResult FromOneRequired(string parameter, string newParameter = null, CancellationToken cancellationToken = default) => throw null; public virtual Task FromOneRequiredAsync(string parameter, string newParameter = null, CancellationToken cancellationToken = default) => throw null; @@ -48,7 +48,7 @@ public partial class ResiliencyServiceDrivenClient public virtual Task FromOneOptionalAsync(string parameter, string newParameter, RequestOptions options) => throw null; - public virtual ClientResult FromOneOptional(string parameter = null, string newParameter = null) => throw null; + public virtual ClientResult FromOneOptional(string parameter = null, string newParameter = null, CancellationToken cancellationToken = default) => throw null; public virtual Task FromOneOptionalAsync(string parameter = null, string newParameter = null, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/InInterface.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/InInterface.cs index c01a82e47e..2c68d8281b 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/InInterface.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/InInterface.cs @@ -19,7 +19,7 @@ public partial class InInterface public virtual Task FixedAsync(RequestOptions options) => throw null; - public virtual ClientResult Fixed() => throw null; + public virtual ClientResult Fixed(CancellationToken cancellationToken = default) => throw null; public virtual Task FixedAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParameters.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParameters.cs index 37daa6a19d..945f9d0567 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParameters.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParameters.cs @@ -19,7 +19,7 @@ public partial class PathParameters public virtual Task TemplateOnlyAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult TemplateOnly(string @param) => throw null; + public virtual ClientResult TemplateOnly(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task TemplateOnlyAsync(string @param, CancellationToken cancellationToken = default) => throw null; @@ -27,7 +27,7 @@ public partial class PathParameters public virtual Task ExplicitAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult Explicit(string @param) => throw null; + public virtual ClientResult Explicit(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task ExplicitAsync(string @param, CancellationToken cancellationToken = default) => throw null; @@ -35,7 +35,7 @@ public partial class PathParameters public virtual Task AnnotationOnlyAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult AnnotationOnly(string @param) => throw null; + public virtual ClientResult AnnotationOnly(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task AnnotationOnlyAsync(string @param, CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersLabelExpansionExplode.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersLabelExpansionExplode.cs index 86a2543033..d844af2bc5 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersLabelExpansionExplode.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersLabelExpansionExplode.cs @@ -20,7 +20,7 @@ public partial class PathParametersLabelExpansionExplode public virtual Task PrimitiveAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult Primitive(string @param) => throw null; + public virtual ClientResult Primitive(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task PrimitiveAsync(string @param, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class PathParametersLabelExpansionExplode public virtual Task ArrayAsync(IEnumerable @param, RequestOptions options) => throw null; - public virtual ClientResult Array(IEnumerable @param) => throw null; + public virtual ClientResult Array(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; public virtual Task ArrayAsync(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class PathParametersLabelExpansionExplode public virtual Task RecordAsync(IDictionary @param, RequestOptions options) => throw null; - public virtual ClientResult Record(IDictionary @param) => throw null; + public virtual ClientResult Record(IDictionary @param, CancellationToken cancellationToken = default) => throw null; public virtual Task RecordAsync(IDictionary @param, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersLabelExpansionStandard.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersLabelExpansionStandard.cs index 65ba0dd28e..1044215dcb 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersLabelExpansionStandard.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersLabelExpansionStandard.cs @@ -20,7 +20,7 @@ public partial class PathParametersLabelExpansionStandard public virtual Task PrimitiveAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult Primitive(string @param) => throw null; + public virtual ClientResult Primitive(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task PrimitiveAsync(string @param, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class PathParametersLabelExpansionStandard public virtual Task ArrayAsync(IEnumerable @param, RequestOptions options) => throw null; - public virtual ClientResult Array(IEnumerable @param) => throw null; + public virtual ClientResult Array(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; public virtual Task ArrayAsync(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class PathParametersLabelExpansionStandard public virtual Task RecordAsync(IDictionary @param, RequestOptions options) => throw null; - public virtual ClientResult Record(IDictionary @param) => throw null; + public virtual ClientResult Record(IDictionary @param, CancellationToken cancellationToken = default) => throw null; public virtual Task RecordAsync(IDictionary @param, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersMatrixExpansionExplode.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersMatrixExpansionExplode.cs index 21ccb56760..480cf409e3 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersMatrixExpansionExplode.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersMatrixExpansionExplode.cs @@ -20,7 +20,7 @@ public partial class PathParametersMatrixExpansionExplode public virtual Task PrimitiveAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult Primitive(string @param) => throw null; + public virtual ClientResult Primitive(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task PrimitiveAsync(string @param, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class PathParametersMatrixExpansionExplode public virtual Task ArrayAsync(IEnumerable @param, RequestOptions options) => throw null; - public virtual ClientResult Array(IEnumerable @param) => throw null; + public virtual ClientResult Array(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; public virtual Task ArrayAsync(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class PathParametersMatrixExpansionExplode public virtual Task RecordAsync(IDictionary @param, RequestOptions options) => throw null; - public virtual ClientResult Record(IDictionary @param) => throw null; + public virtual ClientResult Record(IDictionary @param, CancellationToken cancellationToken = default) => throw null; public virtual Task RecordAsync(IDictionary @param, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersMatrixExpansionStandard.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersMatrixExpansionStandard.cs index ad197bbab1..78dc990435 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersMatrixExpansionStandard.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersMatrixExpansionStandard.cs @@ -20,7 +20,7 @@ public partial class PathParametersMatrixExpansionStandard public virtual Task PrimitiveAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult Primitive(string @param) => throw null; + public virtual ClientResult Primitive(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task PrimitiveAsync(string @param, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class PathParametersMatrixExpansionStandard public virtual Task ArrayAsync(IEnumerable @param, RequestOptions options) => throw null; - public virtual ClientResult Array(IEnumerable @param) => throw null; + public virtual ClientResult Array(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; public virtual Task ArrayAsync(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class PathParametersMatrixExpansionStandard public virtual Task RecordAsync(IDictionary @param, RequestOptions options) => throw null; - public virtual ClientResult Record(IDictionary @param) => throw null; + public virtual ClientResult Record(IDictionary @param, CancellationToken cancellationToken = default) => throw null; public virtual Task RecordAsync(IDictionary @param, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersPathExpansionExplode.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersPathExpansionExplode.cs index 60598f389f..55e0c1452e 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersPathExpansionExplode.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersPathExpansionExplode.cs @@ -20,7 +20,7 @@ public partial class PathParametersPathExpansionExplode public virtual Task PrimitiveAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult Primitive(string @param) => throw null; + public virtual ClientResult Primitive(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task PrimitiveAsync(string @param, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class PathParametersPathExpansionExplode public virtual Task ArrayAsync(IEnumerable @param, RequestOptions options) => throw null; - public virtual ClientResult Array(IEnumerable @param) => throw null; + public virtual ClientResult Array(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; public virtual Task ArrayAsync(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class PathParametersPathExpansionExplode public virtual Task RecordAsync(IDictionary @param, RequestOptions options) => throw null; - public virtual ClientResult Record(IDictionary @param) => throw null; + public virtual ClientResult Record(IDictionary @param, CancellationToken cancellationToken = default) => throw null; public virtual Task RecordAsync(IDictionary @param, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersPathExpansionStandard.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersPathExpansionStandard.cs index 08c056ef08..0102ff7ca1 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersPathExpansionStandard.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersPathExpansionStandard.cs @@ -20,7 +20,7 @@ public partial class PathParametersPathExpansionStandard public virtual Task PrimitiveAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult Primitive(string @param) => throw null; + public virtual ClientResult Primitive(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task PrimitiveAsync(string @param, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class PathParametersPathExpansionStandard public virtual Task ArrayAsync(IEnumerable @param, RequestOptions options) => throw null; - public virtual ClientResult Array(IEnumerable @param) => throw null; + public virtual ClientResult Array(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; public virtual Task ArrayAsync(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class PathParametersPathExpansionStandard public virtual Task RecordAsync(IDictionary @param, RequestOptions options) => throw null; - public virtual ClientResult Record(IDictionary @param) => throw null; + public virtual ClientResult Record(IDictionary @param, CancellationToken cancellationToken = default) => throw null; public virtual Task RecordAsync(IDictionary @param, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersReservedExpansion.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersReservedExpansion.cs index 4fcb10656c..9536143239 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersReservedExpansion.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersReservedExpansion.cs @@ -19,7 +19,7 @@ public partial class PathParametersReservedExpansion public virtual Task TemplateAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult Template(string @param) => throw null; + public virtual ClientResult Template(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task TemplateAsync(string @param, CancellationToken cancellationToken = default) => throw null; @@ -27,7 +27,7 @@ public partial class PathParametersReservedExpansion public virtual Task AnnotationAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult Annotation(string @param) => throw null; + public virtual ClientResult Annotation(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task AnnotationAsync(string @param, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersSimpleExpansionExplode.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersSimpleExpansionExplode.cs index 98199c0694..2a4e7a7fbc 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersSimpleExpansionExplode.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersSimpleExpansionExplode.cs @@ -20,7 +20,7 @@ public partial class PathParametersSimpleExpansionExplode public virtual Task PrimitiveAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult Primitive(string @param) => throw null; + public virtual ClientResult Primitive(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task PrimitiveAsync(string @param, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class PathParametersSimpleExpansionExplode public virtual Task ArrayAsync(IEnumerable @param, RequestOptions options) => throw null; - public virtual ClientResult Array(IEnumerable @param) => throw null; + public virtual ClientResult Array(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; public virtual Task ArrayAsync(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class PathParametersSimpleExpansionExplode public virtual Task RecordAsync(IDictionary @param, RequestOptions options) => throw null; - public virtual ClientResult Record(IDictionary @param) => throw null; + public virtual ClientResult Record(IDictionary @param, CancellationToken cancellationToken = default) => throw null; public virtual Task RecordAsync(IDictionary @param, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersSimpleExpansionStandard.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersSimpleExpansionStandard.cs index 5665841897..a54c64a0e9 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersSimpleExpansionStandard.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/PathParametersSimpleExpansionStandard.cs @@ -20,7 +20,7 @@ public partial class PathParametersSimpleExpansionStandard public virtual Task PrimitiveAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult Primitive(string @param) => throw null; + public virtual ClientResult Primitive(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task PrimitiveAsync(string @param, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class PathParametersSimpleExpansionStandard public virtual Task ArrayAsync(IEnumerable @param, RequestOptions options) => throw null; - public virtual ClientResult Array(IEnumerable @param) => throw null; + public virtual ClientResult Array(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; public virtual Task ArrayAsync(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class PathParametersSimpleExpansionStandard public virtual Task RecordAsync(IDictionary @param, RequestOptions options) => throw null; - public virtual ClientResult Record(IDictionary @param) => throw null; + public virtual ClientResult Record(IDictionary @param, CancellationToken cancellationToken = default) => throw null; public virtual Task RecordAsync(IDictionary @param, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParameters.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParameters.cs index efbee63fbc..eafad598a3 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParameters.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParameters.cs @@ -19,7 +19,7 @@ public partial class QueryParameters public virtual Task TemplateOnlyAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult TemplateOnly(string @param) => throw null; + public virtual ClientResult TemplateOnly(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task TemplateOnlyAsync(string @param, CancellationToken cancellationToken = default) => throw null; @@ -27,7 +27,7 @@ public partial class QueryParameters public virtual Task ExplicitAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult Explicit(string @param) => throw null; + public virtual ClientResult Explicit(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task ExplicitAsync(string @param, CancellationToken cancellationToken = default) => throw null; @@ -35,7 +35,7 @@ public partial class QueryParameters public virtual Task AnnotationOnlyAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult AnnotationOnly(string @param) => throw null; + public virtual ClientResult AnnotationOnly(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task AnnotationOnlyAsync(string @param, CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParametersQueryContinuationExplode.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParametersQueryContinuationExplode.cs index 88fb66288b..8f017e26d8 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParametersQueryContinuationExplode.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParametersQueryContinuationExplode.cs @@ -20,7 +20,7 @@ public partial class QueryParametersQueryContinuationExplode public virtual Task PrimitiveAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult Primitive(string @param) => throw null; + public virtual ClientResult Primitive(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task PrimitiveAsync(string @param, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class QueryParametersQueryContinuationExplode public virtual Task ArrayAsync(IEnumerable @param, RequestOptions options) => throw null; - public virtual ClientResult Array(IEnumerable @param) => throw null; + public virtual ClientResult Array(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; public virtual Task ArrayAsync(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class QueryParametersQueryContinuationExplode public virtual Task RecordAsync(IDictionary @param, RequestOptions options) => throw null; - public virtual ClientResult Record(IDictionary @param) => throw null; + public virtual ClientResult Record(IDictionary @param, CancellationToken cancellationToken = default) => throw null; public virtual Task RecordAsync(IDictionary @param, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParametersQueryContinuationStandard.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParametersQueryContinuationStandard.cs index f501241cd7..e9c366e498 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParametersQueryContinuationStandard.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParametersQueryContinuationStandard.cs @@ -20,7 +20,7 @@ public partial class QueryParametersQueryContinuationStandard public virtual Task PrimitiveAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult Primitive(string @param) => throw null; + public virtual ClientResult Primitive(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task PrimitiveAsync(string @param, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class QueryParametersQueryContinuationStandard public virtual Task ArrayAsync(IEnumerable @param, RequestOptions options) => throw null; - public virtual ClientResult Array(IEnumerable @param) => throw null; + public virtual ClientResult Array(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; public virtual Task ArrayAsync(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class QueryParametersQueryContinuationStandard public virtual Task RecordAsync(IDictionary @param, RequestOptions options) => throw null; - public virtual ClientResult Record(IDictionary @param) => throw null; + public virtual ClientResult Record(IDictionary @param, CancellationToken cancellationToken = default) => throw null; public virtual Task RecordAsync(IDictionary @param, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParametersQueryExpansionExplode.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParametersQueryExpansionExplode.cs index d25db2d3a5..af8a04a49e 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParametersQueryExpansionExplode.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParametersQueryExpansionExplode.cs @@ -20,7 +20,7 @@ public partial class QueryParametersQueryExpansionExplode public virtual Task PrimitiveAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult Primitive(string @param) => throw null; + public virtual ClientResult Primitive(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task PrimitiveAsync(string @param, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class QueryParametersQueryExpansionExplode public virtual Task ArrayAsync(IEnumerable @param, RequestOptions options) => throw null; - public virtual ClientResult Array(IEnumerable @param) => throw null; + public virtual ClientResult Array(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; public virtual Task ArrayAsync(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class QueryParametersQueryExpansionExplode public virtual Task RecordAsync(IDictionary @param, RequestOptions options) => throw null; - public virtual ClientResult Record(IDictionary @param) => throw null; + public virtual ClientResult Record(IDictionary @param, CancellationToken cancellationToken = default) => throw null; public virtual Task RecordAsync(IDictionary @param, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParametersQueryExpansionStandard.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParametersQueryExpansionStandard.cs index 8745e55f5c..f0a66a020e 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParametersQueryExpansionStandard.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/QueryParametersQueryExpansionStandard.cs @@ -20,7 +20,7 @@ public partial class QueryParametersQueryExpansionStandard public virtual Task PrimitiveAsync(string @param, RequestOptions options) => throw null; - public virtual ClientResult Primitive(string @param) => throw null; + public virtual ClientResult Primitive(string @param, CancellationToken cancellationToken = default) => throw null; public virtual Task PrimitiveAsync(string @param, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class QueryParametersQueryExpansionStandard public virtual Task ArrayAsync(IEnumerable @param, RequestOptions options) => throw null; - public virtual ClientResult Array(IEnumerable @param) => throw null; + public virtual ClientResult Array(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; public virtual Task ArrayAsync(IEnumerable @param, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class QueryParametersQueryExpansionStandard public virtual Task RecordAsync(IDictionary @param, RequestOptions options) => throw null; - public virtual ClientResult Record(IDictionary @param) => throw null; + public virtual ClientResult Record(IDictionary @param, CancellationToken cancellationToken = default) => throw null; public virtual Task RecordAsync(IDictionary @param, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/RoutesClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/RoutesClient.cs index a57a85276e..c2bb7449fb 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/RoutesClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/routes/src/Generated/RoutesClient.cs @@ -22,7 +22,7 @@ public partial class RoutesClient public virtual Task FixedAsync(RequestOptions options) => throw null; - public virtual ClientResult Fixed() => throw null; + public virtual ClientResult Fixed(CancellationToken cancellationToken = default) => throw null; public virtual Task FixedAsync(CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/serialization/encoded-name/json/src/Generated/Property.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/serialization/encoded-name/json/src/Generated/Property.cs index 2b70458e80..ab46ec6767 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/serialization/encoded-name/json/src/Generated/Property.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/serialization/encoded-name/json/src/Generated/Property.cs @@ -20,7 +20,7 @@ public partial class Property public virtual Task SendAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Send(JsonEncodedNameModel body) => throw null; + public virtual ClientResult Send(JsonEncodedNameModel body, CancellationToken cancellationToken = default) => throw null; public virtual Task SendAsync(JsonEncodedNameModel body, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Property public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/endpoint/not-defined/src/Generated/NotDefinedClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/endpoint/not-defined/src/Generated/NotDefinedClient.cs index 68bed4d189..c9b371e391 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/endpoint/not-defined/src/Generated/NotDefinedClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/endpoint/not-defined/src/Generated/NotDefinedClient.cs @@ -24,7 +24,7 @@ public partial class NotDefinedClient public virtual Task ValidAsync(RequestOptions options) => throw null; - public virtual ClientResult Valid() => throw null; + public virtual ClientResult Valid(CancellationToken cancellationToken = default) => throw null; public virtual Task ValidAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/path/multiple/src/Generated/MultipleClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/path/multiple/src/Generated/MultipleClient.cs index 7ea2dc0836..cfb066bf91 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/path/multiple/src/Generated/MultipleClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/path/multiple/src/Generated/MultipleClient.cs @@ -24,7 +24,7 @@ public partial class MultipleClient public virtual Task NoOperationParamsAsync(RequestOptions options) => throw null; - public virtual ClientResult NoOperationParams() => throw null; + public virtual ClientResult NoOperationParams(CancellationToken cancellationToken = default) => throw null; public virtual Task NoOperationParamsAsync(CancellationToken cancellationToken = default) => throw null; @@ -32,7 +32,7 @@ public partial class MultipleClient public virtual Task WithOperationPathParamAsync(string keyword, RequestOptions options) => throw null; - public virtual ClientResult WithOperationPathParam(string keyword) => throw null; + public virtual ClientResult WithOperationPathParam(string keyword, CancellationToken cancellationToken = default) => throw null; public virtual Task WithOperationPathParamAsync(string keyword, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/path/single/src/Generated/SingleClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/path/single/src/Generated/SingleClient.cs index 63fcd089e6..25d2f13eb1 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/path/single/src/Generated/SingleClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/path/single/src/Generated/SingleClient.cs @@ -24,7 +24,7 @@ public partial class SingleClient public virtual Task MyOpAsync(RequestOptions options) => throw null; - public virtual ClientResult MyOp() => throw null; + public virtual ClientResult MyOp(CancellationToken cancellationToken = default) => throw null; public virtual Task MyOpAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/versions/not-versioned/src/Generated/NotVersionedClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/versions/not-versioned/src/Generated/NotVersionedClient.cs index 835652b533..6fb0abe3bc 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/versions/not-versioned/src/Generated/NotVersionedClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/versions/not-versioned/src/Generated/NotVersionedClient.cs @@ -24,7 +24,7 @@ public partial class NotVersionedClient public virtual Task WithoutApiVersionAsync(RequestOptions options) => throw null; - public virtual ClientResult WithoutApiVersion() => throw null; + public virtual ClientResult WithoutApiVersion(CancellationToken cancellationToken = default) => throw null; public virtual Task WithoutApiVersionAsync(CancellationToken cancellationToken = default) => throw null; @@ -32,7 +32,7 @@ public partial class NotVersionedClient public virtual Task WithQueryApiVersionAsync(string apiVersion, RequestOptions options) => throw null; - public virtual ClientResult WithQueryApiVersion(string apiVersion) => throw null; + public virtual ClientResult WithQueryApiVersion(string apiVersion, CancellationToken cancellationToken = default) => throw null; public virtual Task WithQueryApiVersionAsync(string apiVersion, CancellationToken cancellationToken = default) => throw null; @@ -40,7 +40,7 @@ public partial class NotVersionedClient public virtual Task WithPathApiVersionAsync(string apiVersion, RequestOptions options) => throw null; - public virtual ClientResult WithPathApiVersion(string apiVersion) => throw null; + public virtual ClientResult WithPathApiVersion(string apiVersion, CancellationToken cancellationToken = default) => throw null; public virtual Task WithPathApiVersionAsync(string apiVersion, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/versions/versioned/src/Generated/VersionedClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/versions/versioned/src/Generated/VersionedClient.cs index 86dfb535a2..01e9d2e322 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/versions/versioned/src/Generated/VersionedClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/server/versions/versioned/src/Generated/VersionedClient.cs @@ -24,7 +24,7 @@ public partial class VersionedClient public virtual Task WithoutApiVersionAsync(RequestOptions options) => throw null; - public virtual ClientResult WithoutApiVersion() => throw null; + public virtual ClientResult WithoutApiVersion(CancellationToken cancellationToken = default) => throw null; public virtual Task WithoutApiVersionAsync(CancellationToken cancellationToken = default) => throw null; @@ -32,7 +32,7 @@ public partial class VersionedClient public virtual Task WithQueryApiVersionAsync(RequestOptions options) => throw null; - public virtual ClientResult WithQueryApiVersion() => throw null; + public virtual ClientResult WithQueryApiVersion(CancellationToken cancellationToken = default) => throw null; public virtual Task WithQueryApiVersionAsync(CancellationToken cancellationToken = default) => throw null; @@ -40,7 +40,7 @@ public partial class VersionedClient public virtual Task WithPathApiVersionAsync(RequestOptions options) => throw null; - public virtual ClientResult WithPathApiVersion() => throw null; + public virtual ClientResult WithPathApiVersion(CancellationToken cancellationToken = default) => throw null; public virtual Task WithPathApiVersionAsync(CancellationToken cancellationToken = default) => throw null; @@ -48,7 +48,7 @@ public partial class VersionedClient public virtual Task WithQueryOldApiVersionAsync(RequestOptions options) => throw null; - public virtual ClientResult WithQueryOldApiVersion() => throw null; + public virtual ClientResult WithQueryOldApiVersion(CancellationToken cancellationToken = default) => throw null; public virtual Task WithQueryOldApiVersionAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-headers/repeatability/src/Generated/RepeatabilityClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-headers/repeatability/src/Generated/RepeatabilityClient.cs index 188269060e..325865ab67 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-headers/repeatability/src/Generated/RepeatabilityClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-headers/repeatability/src/Generated/RepeatabilityClient.cs @@ -22,7 +22,7 @@ public partial class RepeatabilityClient public virtual Task ImmediateSuccessAsync(RequestOptions options) => throw null; - public virtual ClientResult ImmediateSuccess() => throw null; + public virtual ClientResult ImmediateSuccess(CancellationToken cancellationToken = default) => throw null; public virtual Task ImmediateSuccessAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-words/src/Generated/ModelProperties.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-words/src/Generated/ModelProperties.cs index fd320a82fe..d8ea4bf5da 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-words/src/Generated/ModelProperties.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-words/src/Generated/ModelProperties.cs @@ -20,7 +20,7 @@ public partial class ModelProperties public virtual Task SameAsModelAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult SameAsModel(SameAsModel body) => throw null; + public virtual ClientResult SameAsModel(SameAsModel body, CancellationToken cancellationToken = default) => throw null; public virtual Task SameAsModelAsync(SameAsModel body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-words/src/Generated/ModelsOps.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-words/src/Generated/ModelsOps.cs index 0dadac74dc..62aab4211d 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-words/src/Generated/ModelsOps.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-words/src/Generated/ModelsOps.cs @@ -20,7 +20,7 @@ public partial class ModelsOps public virtual Task WithAndAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithAnd(And body) => throw null; + public virtual ClientResult WithAnd(And body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithAndAsync(And body, CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class ModelsOps public virtual Task WithAsAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithAs(As body) => throw null; + public virtual ClientResult WithAs(As body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithAsAsync(As body, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class ModelsOps public virtual Task WithAssertAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithAssert(Assert body) => throw null; + public virtual ClientResult WithAssert(Assert body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithAssertAsync(Assert body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class ModelsOps public virtual Task WithAsyncAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithAsync(Async body) => throw null; + public virtual ClientResult WithAsync(Async body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithAsyncAsync(Async body, CancellationToken cancellationToken = default) => throw null; @@ -52,7 +52,7 @@ public partial class ModelsOps public virtual Task WithAwaitAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithAwait(Await body) => throw null; + public virtual ClientResult WithAwait(Await body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithAwaitAsync(Await body, CancellationToken cancellationToken = default) => throw null; @@ -60,7 +60,7 @@ public partial class ModelsOps public virtual Task WithBreakAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithBreak(Break body) => throw null; + public virtual ClientResult WithBreak(Break body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithBreakAsync(Break body, CancellationToken cancellationToken = default) => throw null; @@ -68,7 +68,7 @@ public partial class ModelsOps public virtual Task WithClassAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithClass(Class body) => throw null; + public virtual ClientResult WithClass(Class body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithClassAsync(Class body, CancellationToken cancellationToken = default) => throw null; @@ -76,7 +76,7 @@ public partial class ModelsOps public virtual Task WithConstructorAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithConstructor(Constructor body) => throw null; + public virtual ClientResult WithConstructor(Constructor body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithConstructorAsync(Constructor body, CancellationToken cancellationToken = default) => throw null; @@ -84,7 +84,7 @@ public partial class ModelsOps public virtual Task WithContinueAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithContinue(Continue body) => throw null; + public virtual ClientResult WithContinue(Continue body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithContinueAsync(Continue body, CancellationToken cancellationToken = default) => throw null; @@ -92,7 +92,7 @@ public partial class ModelsOps public virtual Task WithDefAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithDef(Def body) => throw null; + public virtual ClientResult WithDef(Def body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithDefAsync(Def body, CancellationToken cancellationToken = default) => throw null; @@ -100,7 +100,7 @@ public partial class ModelsOps public virtual Task WithDelAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithDel(Del body) => throw null; + public virtual ClientResult WithDel(Del body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithDelAsync(Del body, CancellationToken cancellationToken = default) => throw null; @@ -108,7 +108,7 @@ public partial class ModelsOps public virtual Task WithElifAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithElif(Elif body) => throw null; + public virtual ClientResult WithElif(Elif body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithElifAsync(Elif body, CancellationToken cancellationToken = default) => throw null; @@ -116,7 +116,7 @@ public partial class ModelsOps public virtual Task WithElseAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithElse(Else body) => throw null; + public virtual ClientResult WithElse(Else body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithElseAsync(Else body, CancellationToken cancellationToken = default) => throw null; @@ -124,7 +124,7 @@ public partial class ModelsOps public virtual Task WithExceptAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithExcept(Except body) => throw null; + public virtual ClientResult WithExcept(Except body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithExceptAsync(Except body, CancellationToken cancellationToken = default) => throw null; @@ -132,7 +132,7 @@ public partial class ModelsOps public virtual Task WithExecAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithExec(Exec body) => throw null; + public virtual ClientResult WithExec(Exec body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithExecAsync(Exec body, CancellationToken cancellationToken = default) => throw null; @@ -140,7 +140,7 @@ public partial class ModelsOps public virtual Task WithFinallyAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithFinally(Finally body) => throw null; + public virtual ClientResult WithFinally(Finally body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithFinallyAsync(Finally body, CancellationToken cancellationToken = default) => throw null; @@ -148,7 +148,7 @@ public partial class ModelsOps public virtual Task WithForAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithFor(For body) => throw null; + public virtual ClientResult WithFor(For body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithForAsync(For body, CancellationToken cancellationToken = default) => throw null; @@ -156,7 +156,7 @@ public partial class ModelsOps public virtual Task WithFromAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithFrom(From body) => throw null; + public virtual ClientResult WithFrom(From body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithFromAsync(From body, CancellationToken cancellationToken = default) => throw null; @@ -164,7 +164,7 @@ public partial class ModelsOps public virtual Task WithGlobalAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithGlobal(Global body) => throw null; + public virtual ClientResult WithGlobal(Global body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithGlobalAsync(Global body, CancellationToken cancellationToken = default) => throw null; @@ -172,7 +172,7 @@ public partial class ModelsOps public virtual Task WithIfAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithIf(If body) => throw null; + public virtual ClientResult WithIf(If body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithIfAsync(If body, CancellationToken cancellationToken = default) => throw null; @@ -180,7 +180,7 @@ public partial class ModelsOps public virtual Task WithImportAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithImport(Import body) => throw null; + public virtual ClientResult WithImport(Import body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithImportAsync(Import body, CancellationToken cancellationToken = default) => throw null; @@ -188,7 +188,7 @@ public partial class ModelsOps public virtual Task WithInAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithIn(In body) => throw null; + public virtual ClientResult WithIn(In body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithInAsync(In body, CancellationToken cancellationToken = default) => throw null; @@ -196,7 +196,7 @@ public partial class ModelsOps public virtual Task WithIsAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithIs(Is body) => throw null; + public virtual ClientResult WithIs(Is body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithIsAsync(Is body, CancellationToken cancellationToken = default) => throw null; @@ -204,7 +204,7 @@ public partial class ModelsOps public virtual Task WithLambdaAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithLambda(Lambda body) => throw null; + public virtual ClientResult WithLambda(Lambda body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithLambdaAsync(Lambda body, CancellationToken cancellationToken = default) => throw null; @@ -212,7 +212,7 @@ public partial class ModelsOps public virtual Task WithNotAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithNot(Not body) => throw null; + public virtual ClientResult WithNot(Not body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithNotAsync(Not body, CancellationToken cancellationToken = default) => throw null; @@ -220,7 +220,7 @@ public partial class ModelsOps public virtual Task WithOrAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithOr(Or body) => throw null; + public virtual ClientResult WithOr(Or body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithOrAsync(Or body, CancellationToken cancellationToken = default) => throw null; @@ -228,7 +228,7 @@ public partial class ModelsOps public virtual Task WithPassAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithPass(Pass body) => throw null; + public virtual ClientResult WithPass(Pass body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithPassAsync(Pass body, CancellationToken cancellationToken = default) => throw null; @@ -236,7 +236,7 @@ public partial class ModelsOps public virtual Task WithRaiseAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithRaise(Raise body) => throw null; + public virtual ClientResult WithRaise(Raise body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithRaiseAsync(Raise body, CancellationToken cancellationToken = default) => throw null; @@ -244,7 +244,7 @@ public partial class ModelsOps public virtual Task WithReturnAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithReturn(Return body) => throw null; + public virtual ClientResult WithReturn(Return body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithReturnAsync(Return body, CancellationToken cancellationToken = default) => throw null; @@ -252,7 +252,7 @@ public partial class ModelsOps public virtual Task WithTryAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithTry(Try body) => throw null; + public virtual ClientResult WithTry(Try body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithTryAsync(Try body, CancellationToken cancellationToken = default) => throw null; @@ -260,7 +260,7 @@ public partial class ModelsOps public virtual Task WithWhileAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithWhile(While body) => throw null; + public virtual ClientResult WithWhile(While body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithWhileAsync(While body, CancellationToken cancellationToken = default) => throw null; @@ -268,7 +268,7 @@ public partial class ModelsOps public virtual Task WithWithAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithWith(With body) => throw null; + public virtual ClientResult WithWith(With body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithWithAsync(With body, CancellationToken cancellationToken = default) => throw null; @@ -276,7 +276,7 @@ public partial class ModelsOps public virtual Task WithYieldAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult WithYield(Yield body) => throw null; + public virtual ClientResult WithYield(Yield body, CancellationToken cancellationToken = default) => throw null; public virtual Task WithYieldAsync(Yield body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-words/src/Generated/Operations.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-words/src/Generated/Operations.cs index db9b2beb3a..bb367d9e0e 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-words/src/Generated/Operations.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-words/src/Generated/Operations.cs @@ -19,7 +19,7 @@ public partial class Operations public virtual Task AndAsync(RequestOptions options) => throw null; - public virtual ClientResult And() => throw null; + public virtual ClientResult And(CancellationToken cancellationToken = default) => throw null; public virtual Task AndAsync(CancellationToken cancellationToken = default) => throw null; @@ -27,7 +27,7 @@ public partial class Operations public virtual Task AsAsync(RequestOptions options) => throw null; - public virtual ClientResult As() => throw null; + public virtual ClientResult As(CancellationToken cancellationToken = default) => throw null; public virtual Task AsAsync(CancellationToken cancellationToken = default) => throw null; @@ -35,7 +35,7 @@ public partial class Operations public virtual Task AssertAsync(RequestOptions options) => throw null; - public virtual ClientResult Assert() => throw null; + public virtual ClientResult Assert(CancellationToken cancellationToken = default) => throw null; public virtual Task AssertAsync(CancellationToken cancellationToken = default) => throw null; @@ -43,7 +43,7 @@ public partial class Operations public virtual Task AsyncAsync(RequestOptions options) => throw null; - public virtual ClientResult Async() => throw null; + public virtual ClientResult Async(CancellationToken cancellationToken = default) => throw null; public virtual Task AsyncAsync(CancellationToken cancellationToken = default) => throw null; @@ -51,7 +51,7 @@ public partial class Operations public virtual Task AwaitAsync(RequestOptions options) => throw null; - public virtual ClientResult Await() => throw null; + public virtual ClientResult Await(CancellationToken cancellationToken = default) => throw null; public virtual Task AwaitAsync(CancellationToken cancellationToken = default) => throw null; @@ -59,7 +59,7 @@ public partial class Operations public virtual Task BreakAsync(RequestOptions options) => throw null; - public virtual ClientResult Break() => throw null; + public virtual ClientResult Break(CancellationToken cancellationToken = default) => throw null; public virtual Task BreakAsync(CancellationToken cancellationToken = default) => throw null; @@ -67,7 +67,7 @@ public partial class Operations public virtual Task ClassAsync(RequestOptions options) => throw null; - public virtual ClientResult Class() => throw null; + public virtual ClientResult Class(CancellationToken cancellationToken = default) => throw null; public virtual Task ClassAsync(CancellationToken cancellationToken = default) => throw null; @@ -75,7 +75,7 @@ public partial class Operations public virtual Task ConstructorAsync(RequestOptions options) => throw null; - public virtual ClientResult Constructor() => throw null; + public virtual ClientResult Constructor(CancellationToken cancellationToken = default) => throw null; public virtual Task ConstructorAsync(CancellationToken cancellationToken = default) => throw null; @@ -83,7 +83,7 @@ public partial class Operations public virtual Task ContinueAsync(RequestOptions options) => throw null; - public virtual ClientResult Continue() => throw null; + public virtual ClientResult Continue(CancellationToken cancellationToken = default) => throw null; public virtual Task ContinueAsync(CancellationToken cancellationToken = default) => throw null; @@ -91,7 +91,7 @@ public partial class Operations public virtual Task DefAsync(RequestOptions options) => throw null; - public virtual ClientResult Def() => throw null; + public virtual ClientResult Def(CancellationToken cancellationToken = default) => throw null; public virtual Task DefAsync(CancellationToken cancellationToken = default) => throw null; @@ -99,7 +99,7 @@ public partial class Operations public virtual Task DelAsync(RequestOptions options) => throw null; - public virtual ClientResult Del() => throw null; + public virtual ClientResult Del(CancellationToken cancellationToken = default) => throw null; public virtual Task DelAsync(CancellationToken cancellationToken = default) => throw null; @@ -107,7 +107,7 @@ public partial class Operations public virtual Task ElifAsync(RequestOptions options) => throw null; - public virtual ClientResult Elif() => throw null; + public virtual ClientResult Elif(CancellationToken cancellationToken = default) => throw null; public virtual Task ElifAsync(CancellationToken cancellationToken = default) => throw null; @@ -115,7 +115,7 @@ public partial class Operations public virtual Task ElseAsync(RequestOptions options) => throw null; - public virtual ClientResult Else() => throw null; + public virtual ClientResult Else(CancellationToken cancellationToken = default) => throw null; public virtual Task ElseAsync(CancellationToken cancellationToken = default) => throw null; @@ -123,7 +123,7 @@ public partial class Operations public virtual Task ExceptAsync(RequestOptions options) => throw null; - public virtual ClientResult Except() => throw null; + public virtual ClientResult Except(CancellationToken cancellationToken = default) => throw null; public virtual Task ExceptAsync(CancellationToken cancellationToken = default) => throw null; @@ -131,7 +131,7 @@ public partial class Operations public virtual Task ExecAsync(RequestOptions options) => throw null; - public virtual ClientResult Exec() => throw null; + public virtual ClientResult Exec(CancellationToken cancellationToken = default) => throw null; public virtual Task ExecAsync(CancellationToken cancellationToken = default) => throw null; @@ -139,7 +139,7 @@ public partial class Operations public virtual Task FinallyAsync(RequestOptions options) => throw null; - public virtual ClientResult Finally() => throw null; + public virtual ClientResult Finally(CancellationToken cancellationToken = default) => throw null; public virtual Task FinallyAsync(CancellationToken cancellationToken = default) => throw null; @@ -147,7 +147,7 @@ public partial class Operations public virtual Task ForAsync(RequestOptions options) => throw null; - public virtual ClientResult For() => throw null; + public virtual ClientResult For(CancellationToken cancellationToken = default) => throw null; public virtual Task ForAsync(CancellationToken cancellationToken = default) => throw null; @@ -155,7 +155,7 @@ public partial class Operations public virtual Task FromAsync(RequestOptions options) => throw null; - public virtual ClientResult From() => throw null; + public virtual ClientResult From(CancellationToken cancellationToken = default) => throw null; public virtual Task FromAsync(CancellationToken cancellationToken = default) => throw null; @@ -163,7 +163,7 @@ public partial class Operations public virtual Task GlobalAsync(RequestOptions options) => throw null; - public virtual ClientResult Global() => throw null; + public virtual ClientResult Global(CancellationToken cancellationToken = default) => throw null; public virtual Task GlobalAsync(CancellationToken cancellationToken = default) => throw null; @@ -171,7 +171,7 @@ public partial class Operations public virtual Task IfAsync(RequestOptions options) => throw null; - public virtual ClientResult If() => throw null; + public virtual ClientResult If(CancellationToken cancellationToken = default) => throw null; public virtual Task IfAsync(CancellationToken cancellationToken = default) => throw null; @@ -179,7 +179,7 @@ public partial class Operations public virtual Task ImportAsync(RequestOptions options) => throw null; - public virtual ClientResult Import() => throw null; + public virtual ClientResult Import(CancellationToken cancellationToken = default) => throw null; public virtual Task ImportAsync(CancellationToken cancellationToken = default) => throw null; @@ -187,7 +187,7 @@ public partial class Operations public virtual Task InAsync(RequestOptions options) => throw null; - public virtual ClientResult In() => throw null; + public virtual ClientResult In(CancellationToken cancellationToken = default) => throw null; public virtual Task InAsync(CancellationToken cancellationToken = default) => throw null; @@ -195,7 +195,7 @@ public partial class Operations public virtual Task IsAsync(RequestOptions options) => throw null; - public virtual ClientResult Is() => throw null; + public virtual ClientResult Is(CancellationToken cancellationToken = default) => throw null; public virtual Task IsAsync(CancellationToken cancellationToken = default) => throw null; @@ -203,7 +203,7 @@ public partial class Operations public virtual Task LambdaAsync(RequestOptions options) => throw null; - public virtual ClientResult Lambda() => throw null; + public virtual ClientResult Lambda(CancellationToken cancellationToken = default) => throw null; public virtual Task LambdaAsync(CancellationToken cancellationToken = default) => throw null; @@ -211,7 +211,7 @@ public partial class Operations public virtual Task NotAsync(RequestOptions options) => throw null; - public virtual ClientResult Not() => throw null; + public virtual ClientResult Not(CancellationToken cancellationToken = default) => throw null; public virtual Task NotAsync(CancellationToken cancellationToken = default) => throw null; @@ -219,7 +219,7 @@ public partial class Operations public virtual Task OrAsync(RequestOptions options) => throw null; - public virtual ClientResult Or() => throw null; + public virtual ClientResult Or(CancellationToken cancellationToken = default) => throw null; public virtual Task OrAsync(CancellationToken cancellationToken = default) => throw null; @@ -227,7 +227,7 @@ public partial class Operations public virtual Task PassAsync(RequestOptions options) => throw null; - public virtual ClientResult Pass() => throw null; + public virtual ClientResult Pass(CancellationToken cancellationToken = default) => throw null; public virtual Task PassAsync(CancellationToken cancellationToken = default) => throw null; @@ -235,7 +235,7 @@ public partial class Operations public virtual Task RaiseAsync(RequestOptions options) => throw null; - public virtual ClientResult Raise() => throw null; + public virtual ClientResult Raise(CancellationToken cancellationToken = default) => throw null; public virtual Task RaiseAsync(CancellationToken cancellationToken = default) => throw null; @@ -243,7 +243,7 @@ public partial class Operations public virtual Task ReturnAsync(RequestOptions options) => throw null; - public virtual ClientResult Return() => throw null; + public virtual ClientResult Return(CancellationToken cancellationToken = default) => throw null; public virtual Task ReturnAsync(CancellationToken cancellationToken = default) => throw null; @@ -251,7 +251,7 @@ public partial class Operations public virtual Task TryAsync(RequestOptions options) => throw null; - public virtual ClientResult Try() => throw null; + public virtual ClientResult Try(CancellationToken cancellationToken = default) => throw null; public virtual Task TryAsync(CancellationToken cancellationToken = default) => throw null; @@ -259,7 +259,7 @@ public partial class Operations public virtual Task WhileAsync(RequestOptions options) => throw null; - public virtual ClientResult While() => throw null; + public virtual ClientResult While(CancellationToken cancellationToken = default) => throw null; public virtual Task WhileAsync(CancellationToken cancellationToken = default) => throw null; @@ -267,7 +267,7 @@ public partial class Operations public virtual Task WithAsync(RequestOptions options) => throw null; - public virtual ClientResult With() => throw null; + public virtual ClientResult With(CancellationToken cancellationToken = default) => throw null; public virtual Task WithAsync(CancellationToken cancellationToken = default) => throw null; @@ -275,7 +275,7 @@ public partial class Operations public virtual Task YieldAsync(RequestOptions options) => throw null; - public virtual ClientResult Yield() => throw null; + public virtual ClientResult Yield(CancellationToken cancellationToken = default) => throw null; public virtual Task YieldAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-words/src/Generated/Parameters.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-words/src/Generated/Parameters.cs index 905a642753..a489749d1a 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-words/src/Generated/Parameters.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/special-words/src/Generated/Parameters.cs @@ -19,7 +19,7 @@ public partial class Parameters public virtual Task WithAndAsync(string @and, RequestOptions options) => throw null; - public virtual ClientResult WithAnd(string @and) => throw null; + public virtual ClientResult WithAnd(string @and, CancellationToken cancellationToken = default) => throw null; public virtual Task WithAndAsync(string @and, CancellationToken cancellationToken = default) => throw null; @@ -27,7 +27,7 @@ public partial class Parameters public virtual Task WithAsAsync(string @as, RequestOptions options) => throw null; - public virtual ClientResult WithAs(string @as) => throw null; + public virtual ClientResult WithAs(string @as, CancellationToken cancellationToken = default) => throw null; public virtual Task WithAsAsync(string @as, CancellationToken cancellationToken = default) => throw null; @@ -35,7 +35,7 @@ public partial class Parameters public virtual Task WithAssertAsync(string assert, RequestOptions options) => throw null; - public virtual ClientResult WithAssert(string assert) => throw null; + public virtual ClientResult WithAssert(string assert, CancellationToken cancellationToken = default) => throw null; public virtual Task WithAssertAsync(string assert, CancellationToken cancellationToken = default) => throw null; @@ -43,7 +43,7 @@ public partial class Parameters public virtual Task WithAsyncAsync(string @async, RequestOptions options) => throw null; - public virtual ClientResult WithAsync(string @async) => throw null; + public virtual ClientResult WithAsync(string @async, CancellationToken cancellationToken = default) => throw null; public virtual Task WithAsyncAsync(string @async, CancellationToken cancellationToken = default) => throw null; @@ -51,7 +51,7 @@ public partial class Parameters public virtual Task WithAwaitAsync(string @await, RequestOptions options) => throw null; - public virtual ClientResult WithAwait(string @await) => throw null; + public virtual ClientResult WithAwait(string @await, CancellationToken cancellationToken = default) => throw null; public virtual Task WithAwaitAsync(string @await, CancellationToken cancellationToken = default) => throw null; @@ -59,7 +59,7 @@ public partial class Parameters public virtual Task WithBreakAsync(string @break, RequestOptions options) => throw null; - public virtual ClientResult WithBreak(string @break) => throw null; + public virtual ClientResult WithBreak(string @break, CancellationToken cancellationToken = default) => throw null; public virtual Task WithBreakAsync(string @break, CancellationToken cancellationToken = default) => throw null; @@ -67,7 +67,7 @@ public partial class Parameters public virtual Task WithClassAsync(string @class, RequestOptions options) => throw null; - public virtual ClientResult WithClass(string @class) => throw null; + public virtual ClientResult WithClass(string @class, CancellationToken cancellationToken = default) => throw null; public virtual Task WithClassAsync(string @class, CancellationToken cancellationToken = default) => throw null; @@ -75,7 +75,7 @@ public partial class Parameters public virtual Task WithConstructorAsync(string constructor, RequestOptions options) => throw null; - public virtual ClientResult WithConstructor(string constructor) => throw null; + public virtual ClientResult WithConstructor(string constructor, CancellationToken cancellationToken = default) => throw null; public virtual Task WithConstructorAsync(string constructor, CancellationToken cancellationToken = default) => throw null; @@ -83,7 +83,7 @@ public partial class Parameters public virtual Task WithContinueAsync(string @continue, RequestOptions options) => throw null; - public virtual ClientResult WithContinue(string @continue) => throw null; + public virtual ClientResult WithContinue(string @continue, CancellationToken cancellationToken = default) => throw null; public virtual Task WithContinueAsync(string @continue, CancellationToken cancellationToken = default) => throw null; @@ -91,7 +91,7 @@ public partial class Parameters public virtual Task WithDefAsync(string def, RequestOptions options) => throw null; - public virtual ClientResult WithDef(string def) => throw null; + public virtual ClientResult WithDef(string def, CancellationToken cancellationToken = default) => throw null; public virtual Task WithDefAsync(string def, CancellationToken cancellationToken = default) => throw null; @@ -99,7 +99,7 @@ public partial class Parameters public virtual Task WithDelAsync(string del, RequestOptions options) => throw null; - public virtual ClientResult WithDel(string del) => throw null; + public virtual ClientResult WithDel(string del, CancellationToken cancellationToken = default) => throw null; public virtual Task WithDelAsync(string del, CancellationToken cancellationToken = default) => throw null; @@ -107,7 +107,7 @@ public partial class Parameters public virtual Task WithElifAsync(string elif, RequestOptions options) => throw null; - public virtual ClientResult WithElif(string elif) => throw null; + public virtual ClientResult WithElif(string elif, CancellationToken cancellationToken = default) => throw null; public virtual Task WithElifAsync(string elif, CancellationToken cancellationToken = default) => throw null; @@ -115,7 +115,7 @@ public partial class Parameters public virtual Task WithElseAsync(string @else, RequestOptions options) => throw null; - public virtual ClientResult WithElse(string @else) => throw null; + public virtual ClientResult WithElse(string @else, CancellationToken cancellationToken = default) => throw null; public virtual Task WithElseAsync(string @else, CancellationToken cancellationToken = default) => throw null; @@ -123,7 +123,7 @@ public partial class Parameters public virtual Task WithExceptAsync(string except, RequestOptions options) => throw null; - public virtual ClientResult WithExcept(string except) => throw null; + public virtual ClientResult WithExcept(string except, CancellationToken cancellationToken = default) => throw null; public virtual Task WithExceptAsync(string except, CancellationToken cancellationToken = default) => throw null; @@ -131,7 +131,7 @@ public partial class Parameters public virtual Task WithExecAsync(string exec, RequestOptions options) => throw null; - public virtual ClientResult WithExec(string exec) => throw null; + public virtual ClientResult WithExec(string exec, CancellationToken cancellationToken = default) => throw null; public virtual Task WithExecAsync(string exec, CancellationToken cancellationToken = default) => throw null; @@ -139,7 +139,7 @@ public partial class Parameters public virtual Task WithFinallyAsync(string @finally, RequestOptions options) => throw null; - public virtual ClientResult WithFinally(string @finally) => throw null; + public virtual ClientResult WithFinally(string @finally, CancellationToken cancellationToken = default) => throw null; public virtual Task WithFinallyAsync(string @finally, CancellationToken cancellationToken = default) => throw null; @@ -147,7 +147,7 @@ public partial class Parameters public virtual Task WithForAsync(string @for, RequestOptions options) => throw null; - public virtual ClientResult WithFor(string @for) => throw null; + public virtual ClientResult WithFor(string @for, CancellationToken cancellationToken = default) => throw null; public virtual Task WithForAsync(string @for, CancellationToken cancellationToken = default) => throw null; @@ -155,7 +155,7 @@ public partial class Parameters public virtual Task WithFromAsync(string @from, RequestOptions options) => throw null; - public virtual ClientResult WithFrom(string @from) => throw null; + public virtual ClientResult WithFrom(string @from, CancellationToken cancellationToken = default) => throw null; public virtual Task WithFromAsync(string @from, CancellationToken cancellationToken = default) => throw null; @@ -163,7 +163,7 @@ public partial class Parameters public virtual Task WithGlobalAsync(string @global, RequestOptions options) => throw null; - public virtual ClientResult WithGlobal(string @global) => throw null; + public virtual ClientResult WithGlobal(string @global, CancellationToken cancellationToken = default) => throw null; public virtual Task WithGlobalAsync(string @global, CancellationToken cancellationToken = default) => throw null; @@ -171,7 +171,7 @@ public partial class Parameters public virtual Task WithIfAsync(string @if, RequestOptions options) => throw null; - public virtual ClientResult WithIf(string @if) => throw null; + public virtual ClientResult WithIf(string @if, CancellationToken cancellationToken = default) => throw null; public virtual Task WithIfAsync(string @if, CancellationToken cancellationToken = default) => throw null; @@ -179,7 +179,7 @@ public partial class Parameters public virtual Task WithImportAsync(string import, RequestOptions options) => throw null; - public virtual ClientResult WithImport(string import) => throw null; + public virtual ClientResult WithImport(string import, CancellationToken cancellationToken = default) => throw null; public virtual Task WithImportAsync(string import, CancellationToken cancellationToken = default) => throw null; @@ -187,7 +187,7 @@ public partial class Parameters public virtual Task WithInAsync(string @in, RequestOptions options) => throw null; - public virtual ClientResult WithIn(string @in) => throw null; + public virtual ClientResult WithIn(string @in, CancellationToken cancellationToken = default) => throw null; public virtual Task WithInAsync(string @in, CancellationToken cancellationToken = default) => throw null; @@ -195,7 +195,7 @@ public partial class Parameters public virtual Task WithIsAsync(string @is, RequestOptions options) => throw null; - public virtual ClientResult WithIs(string @is) => throw null; + public virtual ClientResult WithIs(string @is, CancellationToken cancellationToken = default) => throw null; public virtual Task WithIsAsync(string @is, CancellationToken cancellationToken = default) => throw null; @@ -203,7 +203,7 @@ public partial class Parameters public virtual Task WithLambdaAsync(string lambda, RequestOptions options) => throw null; - public virtual ClientResult WithLambda(string lambda) => throw null; + public virtual ClientResult WithLambda(string lambda, CancellationToken cancellationToken = default) => throw null; public virtual Task WithLambdaAsync(string lambda, CancellationToken cancellationToken = default) => throw null; @@ -211,7 +211,7 @@ public partial class Parameters public virtual Task WithNotAsync(string @not, RequestOptions options) => throw null; - public virtual ClientResult WithNot(string @not) => throw null; + public virtual ClientResult WithNot(string @not, CancellationToken cancellationToken = default) => throw null; public virtual Task WithNotAsync(string @not, CancellationToken cancellationToken = default) => throw null; @@ -219,7 +219,7 @@ public partial class Parameters public virtual Task WithOrAsync(string @or, RequestOptions options) => throw null; - public virtual ClientResult WithOr(string @or) => throw null; + public virtual ClientResult WithOr(string @or, CancellationToken cancellationToken = default) => throw null; public virtual Task WithOrAsync(string @or, CancellationToken cancellationToken = default) => throw null; @@ -227,7 +227,7 @@ public partial class Parameters public virtual Task WithPassAsync(string pass, RequestOptions options) => throw null; - public virtual ClientResult WithPass(string pass) => throw null; + public virtual ClientResult WithPass(string pass, CancellationToken cancellationToken = default) => throw null; public virtual Task WithPassAsync(string pass, CancellationToken cancellationToken = default) => throw null; @@ -235,7 +235,7 @@ public partial class Parameters public virtual Task WithRaiseAsync(string raise, RequestOptions options) => throw null; - public virtual ClientResult WithRaise(string raise) => throw null; + public virtual ClientResult WithRaise(string raise, CancellationToken cancellationToken = default) => throw null; public virtual Task WithRaiseAsync(string raise, CancellationToken cancellationToken = default) => throw null; @@ -243,7 +243,7 @@ public partial class Parameters public virtual Task WithReturnAsync(string @return, RequestOptions options) => throw null; - public virtual ClientResult WithReturn(string @return) => throw null; + public virtual ClientResult WithReturn(string @return, CancellationToken cancellationToken = default) => throw null; public virtual Task WithReturnAsync(string @return, CancellationToken cancellationToken = default) => throw null; @@ -251,7 +251,7 @@ public partial class Parameters public virtual Task WithTryAsync(string @try, RequestOptions options) => throw null; - public virtual ClientResult WithTry(string @try) => throw null; + public virtual ClientResult WithTry(string @try, CancellationToken cancellationToken = default) => throw null; public virtual Task WithTryAsync(string @try, CancellationToken cancellationToken = default) => throw null; @@ -259,7 +259,7 @@ public partial class Parameters public virtual Task WithWhileAsync(string @while, RequestOptions options) => throw null; - public virtual ClientResult WithWhile(string @while) => throw null; + public virtual ClientResult WithWhile(string @while, CancellationToken cancellationToken = default) => throw null; public virtual Task WithWhileAsync(string @while, CancellationToken cancellationToken = default) => throw null; @@ -267,7 +267,7 @@ public partial class Parameters public virtual Task WithWithAsync(string @with, RequestOptions options) => throw null; - public virtual ClientResult WithWith(string @with) => throw null; + public virtual ClientResult WithWith(string @with, CancellationToken cancellationToken = default) => throw null; public virtual Task WithWithAsync(string @with, CancellationToken cancellationToken = default) => throw null; @@ -275,7 +275,7 @@ public partial class Parameters public virtual Task WithYieldAsync(string @yield, RequestOptions options) => throw null; - public virtual ClientResult WithYield(string @yield) => throw null; + public virtual ClientResult WithYield(string @yield, CancellationToken cancellationToken = default) => throw null; public virtual Task WithYieldAsync(string @yield, CancellationToken cancellationToken = default) => throw null; @@ -283,7 +283,7 @@ public partial class Parameters public virtual Task WithCancellationTokenAsync(string cancellationToken, RequestOptions options) => throw null; - public virtual ClientResult WithCancellationToken(string cancellationToken) => throw null; + public virtual ClientResult WithCancellationToken(string cancellationToken, CancellationToken cancellationToken0 = default) => throw null; public virtual Task WithCancellationTokenAsync(string cancellationToken, CancellationToken cancellationToken0 = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/BooleanValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/BooleanValue.cs index 1b800048e7..9fc20e0c2b 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/BooleanValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/BooleanValue.cs @@ -20,7 +20,7 @@ public partial class BooleanValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class BooleanValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IEnumerable body) => throw null; + public virtual ClientResult Put(IEnumerable body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IEnumerable body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/DatetimeValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/DatetimeValue.cs index f3e27e2237..deccfdbaf6 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/DatetimeValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/DatetimeValue.cs @@ -21,7 +21,7 @@ public partial class DatetimeValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class DatetimeValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IEnumerable body) => throw null; + public virtual ClientResult Put(IEnumerable body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IEnumerable body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/DurationValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/DurationValue.cs index 5a4b6f8630..cd0211f890 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/DurationValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/DurationValue.cs @@ -21,7 +21,7 @@ public partial class DurationValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class DurationValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IEnumerable body) => throw null; + public virtual ClientResult Put(IEnumerable body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IEnumerable body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/Float32Value.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/Float32Value.cs index 86858d6e80..c441fd659b 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/Float32Value.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/Float32Value.cs @@ -20,7 +20,7 @@ public partial class Float32Value public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Float32Value public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IEnumerable body) => throw null; + public virtual ClientResult Put(IEnumerable body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IEnumerable body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/Int32Value.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/Int32Value.cs index 92affa96e1..ce83b6431e 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/Int32Value.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/Int32Value.cs @@ -20,7 +20,7 @@ public partial class Int32Value public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Int32Value public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IEnumerable body) => throw null; + public virtual ClientResult Put(IEnumerable body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IEnumerable body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/Int64Value.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/Int64Value.cs index 9857253665..8eb1865b54 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/Int64Value.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/Int64Value.cs @@ -20,7 +20,7 @@ public partial class Int64Value public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Int64Value public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IEnumerable body) => throw null; + public virtual ClientResult Put(IEnumerable body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IEnumerable body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/ModelValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/ModelValue.cs index f4928dff07..7aae49a145 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/ModelValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/ModelValue.cs @@ -21,7 +21,7 @@ public partial class ModelValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class ModelValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IEnumerable body) => throw null; + public virtual ClientResult Put(IEnumerable body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IEnumerable body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableBooleanValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableBooleanValue.cs index 8922fba736..023d81c417 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableBooleanValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableBooleanValue.cs @@ -20,7 +20,7 @@ public partial class NullableBooleanValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class NullableBooleanValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IEnumerable body) => throw null; + public virtual ClientResult Put(IEnumerable body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IEnumerable body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableFloatValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableFloatValue.cs index c0e16fc1e1..cdff8174fb 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableFloatValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableFloatValue.cs @@ -20,7 +20,7 @@ public partial class NullableFloatValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class NullableFloatValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IEnumerable body) => throw null; + public virtual ClientResult Put(IEnumerable body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IEnumerable body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableInt32Value.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableInt32Value.cs index 2343855fd5..f7623a675e 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableInt32Value.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableInt32Value.cs @@ -20,7 +20,7 @@ public partial class NullableInt32Value public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class NullableInt32Value public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IEnumerable body) => throw null; + public virtual ClientResult Put(IEnumerable body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IEnumerable body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableModelValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableModelValue.cs index 412174b2be..0caabc37ce 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableModelValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableModelValue.cs @@ -21,7 +21,7 @@ public partial class NullableModelValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class NullableModelValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IEnumerable body) => throw null; + public virtual ClientResult Put(IEnumerable body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IEnumerable body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableStringValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableStringValue.cs index 7c844b6dba..6ae4dc2e66 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableStringValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/NullableStringValue.cs @@ -20,7 +20,7 @@ public partial class NullableStringValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class NullableStringValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IEnumerable body) => throw null; + public virtual ClientResult Put(IEnumerable body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IEnumerable body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/StringValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/StringValue.cs index 2cc70b0f13..36230a3fa0 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/StringValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/StringValue.cs @@ -20,7 +20,7 @@ public partial class StringValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class StringValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IEnumerable body) => throw null; + public virtual ClientResult Put(IEnumerable body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IEnumerable body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/UnknownValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/UnknownValue.cs index 1a84f30ed0..350ae306a1 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/UnknownValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/array/src/Generated/UnknownValue.cs @@ -21,7 +21,7 @@ public partial class UnknownValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class UnknownValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IEnumerable body) => throw null; + public virtual ClientResult Put(IEnumerable body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IEnumerable body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/BooleanValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/BooleanValue.cs index d38c757eb4..58869c99dc 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/BooleanValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/BooleanValue.cs @@ -20,7 +20,7 @@ public partial class BooleanValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class BooleanValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IDictionary body) => throw null; + public virtual ClientResult Put(IDictionary body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IDictionary body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/DatetimeValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/DatetimeValue.cs index fc564fde4f..97cffdfde9 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/DatetimeValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/DatetimeValue.cs @@ -21,7 +21,7 @@ public partial class DatetimeValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class DatetimeValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IDictionary body) => throw null; + public virtual ClientResult Put(IDictionary body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IDictionary body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/DurationValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/DurationValue.cs index db50e64f33..40ebceeefc 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/DurationValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/DurationValue.cs @@ -21,7 +21,7 @@ public partial class DurationValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class DurationValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IDictionary body) => throw null; + public virtual ClientResult Put(IDictionary body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IDictionary body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/Float32Value.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/Float32Value.cs index fe304395ca..a08fd4acdd 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/Float32Value.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/Float32Value.cs @@ -20,7 +20,7 @@ public partial class Float32Value public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Float32Value public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IDictionary body) => throw null; + public virtual ClientResult Put(IDictionary body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IDictionary body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/Int32Value.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/Int32Value.cs index d015e3264f..4408ee93d5 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/Int32Value.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/Int32Value.cs @@ -20,7 +20,7 @@ public partial class Int32Value public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Int32Value public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IDictionary body) => throw null; + public virtual ClientResult Put(IDictionary body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IDictionary body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/Int64Value.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/Int64Value.cs index a8afa024cf..c5bff56c84 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/Int64Value.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/Int64Value.cs @@ -20,7 +20,7 @@ public partial class Int64Value public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Int64Value public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IDictionary body) => throw null; + public virtual ClientResult Put(IDictionary body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IDictionary body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/ModelValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/ModelValue.cs index 89600b07f1..bae8ed5f43 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/ModelValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/ModelValue.cs @@ -21,7 +21,7 @@ public partial class ModelValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class ModelValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IDictionary body) => throw null; + public virtual ClientResult Put(IDictionary body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IDictionary body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/NullableFloatValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/NullableFloatValue.cs index 20770c47b5..f4113eea94 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/NullableFloatValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/NullableFloatValue.cs @@ -20,7 +20,7 @@ public partial class NullableFloatValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class NullableFloatValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IDictionary body) => throw null; + public virtual ClientResult Put(IDictionary body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IDictionary body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/RecursiveModelValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/RecursiveModelValue.cs index 32bbfbd6e0..2526a333be 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/RecursiveModelValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/RecursiveModelValue.cs @@ -21,7 +21,7 @@ public partial class RecursiveModelValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class RecursiveModelValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IDictionary body) => throw null; + public virtual ClientResult Put(IDictionary body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IDictionary body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/StringValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/StringValue.cs index b18c84442a..fd7b77adf8 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/StringValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/StringValue.cs @@ -20,7 +20,7 @@ public partial class StringValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class StringValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IDictionary body) => throw null; + public virtual ClientResult Put(IDictionary body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IDictionary body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/UnknownValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/UnknownValue.cs index dd4bb9bd24..471d71a871 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/UnknownValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/dictionary/src/Generated/UnknownValue.cs @@ -21,7 +21,7 @@ public partial class UnknownValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult> Get() => throw null; + public virtual ClientResult> Get(CancellationToken cancellationToken = default) => throw null; public virtual Task>> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class UnknownValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IDictionary body) => throw null; + public virtual ClientResult Put(IDictionary body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IDictionary body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/enum/extensible/src/Generated/String.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/enum/extensible/src/Generated/String.cs index 2af8dcb5f7..ef9d25a807 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/enum/extensible/src/Generated/String.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/enum/extensible/src/Generated/String.cs @@ -20,7 +20,7 @@ public partial class String public virtual Task GetKnownValueAsync(RequestOptions options) => throw null; - public virtual ClientResult GetKnownValue() => throw null; + public virtual ClientResult GetKnownValue(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetKnownValueAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class String public virtual Task GetUnknownValueAsync(RequestOptions options) => throw null; - public virtual ClientResult GetUnknownValue() => throw null; + public virtual ClientResult GetUnknownValue(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetUnknownValueAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class String public virtual Task PutKnownValueAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutKnownValue(DaysOfWeekExtensibleEnum body) => throw null; + public virtual ClientResult PutKnownValue(DaysOfWeekExtensibleEnum body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutKnownValueAsync(DaysOfWeekExtensibleEnum body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class String public virtual Task PutUnknownValueAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutUnknownValue(DaysOfWeekExtensibleEnum body) => throw null; + public virtual ClientResult PutUnknownValue(DaysOfWeekExtensibleEnum body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutUnknownValueAsync(DaysOfWeekExtensibleEnum body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/enum/fixed/src/Generated/String.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/enum/fixed/src/Generated/String.cs index 4865af4e44..03ba5cafdf 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/enum/fixed/src/Generated/String.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/enum/fixed/src/Generated/String.cs @@ -20,7 +20,7 @@ public partial class String public virtual Task GetKnownValueAsync(RequestOptions options) => throw null; - public virtual ClientResult GetKnownValue() => throw null; + public virtual ClientResult GetKnownValue(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetKnownValueAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class String public virtual Task PutKnownValueAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutKnownValue(DaysOfWeekEnum body) => throw null; + public virtual ClientResult PutKnownValue(DaysOfWeekEnum body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutKnownValueAsync(DaysOfWeekEnum body, CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class String public virtual Task PutUnknownValueAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutUnknownValue(DaysOfWeekEnum body) => throw null; + public virtual ClientResult PutUnknownValue(DaysOfWeekEnum body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutUnknownValueAsync(DaysOfWeekEnum body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/empty/src/Generated/EmptyClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/empty/src/Generated/EmptyClient.cs index 6387e2bba4..a6075f0ee9 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/empty/src/Generated/EmptyClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/empty/src/Generated/EmptyClient.cs @@ -23,7 +23,7 @@ public partial class EmptyClient public virtual Task PutEmptyAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutEmpty(EmptyInput input) => throw null; + public virtual ClientResult PutEmpty(EmptyInput input, CancellationToken cancellationToken = default) => throw null; public virtual Task PutEmptyAsync(EmptyInput input, CancellationToken cancellationToken = default) => throw null; @@ -31,7 +31,7 @@ public partial class EmptyClient public virtual Task GetEmptyAsync(RequestOptions options) => throw null; - public virtual ClientResult GetEmpty() => throw null; + public virtual ClientResult GetEmpty(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetEmptyAsync(CancellationToken cancellationToken = default) => throw null; @@ -39,7 +39,7 @@ public partial class EmptyClient public virtual Task PostRoundTripEmptyAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PostRoundTripEmpty(EmptyInputOutput body) => throw null; + public virtual ClientResult PostRoundTripEmpty(EmptyInputOutput body, CancellationToken cancellationToken = default) => throw null; public virtual Task> PostRoundTripEmptyAsync(EmptyInputOutput body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/enum-discriminator/src/Generated/EnumDiscriminatorClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/enum-discriminator/src/Generated/EnumDiscriminatorClient.cs index 8e41fc5469..0fb262b7f9 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/enum-discriminator/src/Generated/EnumDiscriminatorClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/enum-discriminator/src/Generated/EnumDiscriminatorClient.cs @@ -23,7 +23,7 @@ public partial class EnumDiscriminatorClient public virtual Task GetExtensibleModelAsync(RequestOptions options) => throw null; - public virtual ClientResult GetExtensibleModel() => throw null; + public virtual ClientResult GetExtensibleModel(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetExtensibleModelAsync(CancellationToken cancellationToken = default) => throw null; @@ -31,7 +31,7 @@ public partial class EnumDiscriminatorClient public virtual Task PutExtensibleModelAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutExtensibleModel(Dog input) => throw null; + public virtual ClientResult PutExtensibleModel(Dog input, CancellationToken cancellationToken = default) => throw null; public virtual Task PutExtensibleModelAsync(Dog input, CancellationToken cancellationToken = default) => throw null; @@ -39,7 +39,7 @@ public partial class EnumDiscriminatorClient public virtual Task GetExtensibleModelMissingDiscriminatorAsync(RequestOptions options) => throw null; - public virtual ClientResult GetExtensibleModelMissingDiscriminator() => throw null; + public virtual ClientResult GetExtensibleModelMissingDiscriminator(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetExtensibleModelMissingDiscriminatorAsync(CancellationToken cancellationToken = default) => throw null; @@ -47,7 +47,7 @@ public partial class EnumDiscriminatorClient public virtual Task GetExtensibleModelWrongDiscriminatorAsync(RequestOptions options) => throw null; - public virtual ClientResult GetExtensibleModelWrongDiscriminator() => throw null; + public virtual ClientResult GetExtensibleModelWrongDiscriminator(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetExtensibleModelWrongDiscriminatorAsync(CancellationToken cancellationToken = default) => throw null; @@ -55,7 +55,7 @@ public partial class EnumDiscriminatorClient public virtual Task GetFixedModelAsync(RequestOptions options) => throw null; - public virtual ClientResult GetFixedModel() => throw null; + public virtual ClientResult GetFixedModel(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetFixedModelAsync(CancellationToken cancellationToken = default) => throw null; @@ -63,7 +63,7 @@ public partial class EnumDiscriminatorClient public virtual Task PutFixedModelAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutFixedModel(Snake input) => throw null; + public virtual ClientResult PutFixedModel(Snake input, CancellationToken cancellationToken = default) => throw null; public virtual Task PutFixedModelAsync(Snake input, CancellationToken cancellationToken = default) => throw null; @@ -71,7 +71,7 @@ public partial class EnumDiscriminatorClient public virtual Task GetFixedModelMissingDiscriminatorAsync(RequestOptions options) => throw null; - public virtual ClientResult GetFixedModelMissingDiscriminator() => throw null; + public virtual ClientResult GetFixedModelMissingDiscriminator(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetFixedModelMissingDiscriminatorAsync(CancellationToken cancellationToken = default) => throw null; @@ -79,7 +79,7 @@ public partial class EnumDiscriminatorClient public virtual Task GetFixedModelWrongDiscriminatorAsync(RequestOptions options) => throw null; - public virtual ClientResult GetFixedModelWrongDiscriminator() => throw null; + public virtual ClientResult GetFixedModelWrongDiscriminator(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetFixedModelWrongDiscriminatorAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/nested-discriminator/src/Generated/NestedDiscriminatorClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/nested-discriminator/src/Generated/NestedDiscriminatorClient.cs index 2026c15162..5bc2d771b9 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/nested-discriminator/src/Generated/NestedDiscriminatorClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/nested-discriminator/src/Generated/NestedDiscriminatorClient.cs @@ -23,7 +23,7 @@ public partial class NestedDiscriminatorClient public virtual Task GetModelAsync(RequestOptions options) => throw null; - public virtual ClientResult GetModel() => throw null; + public virtual ClientResult GetModel(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetModelAsync(CancellationToken cancellationToken = default) => throw null; @@ -31,7 +31,7 @@ public partial class NestedDiscriminatorClient public virtual Task PutModelAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutModel(Fish input) => throw null; + public virtual ClientResult PutModel(Fish input, CancellationToken cancellationToken = default) => throw null; public virtual Task PutModelAsync(Fish input, CancellationToken cancellationToken = default) => throw null; @@ -39,7 +39,7 @@ public partial class NestedDiscriminatorClient public virtual Task GetRecursiveModelAsync(RequestOptions options) => throw null; - public virtual ClientResult GetRecursiveModel() => throw null; + public virtual ClientResult GetRecursiveModel(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetRecursiveModelAsync(CancellationToken cancellationToken = default) => throw null; @@ -47,7 +47,7 @@ public partial class NestedDiscriminatorClient public virtual Task PutRecursiveModelAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutRecursiveModel(Fish input) => throw null; + public virtual ClientResult PutRecursiveModel(Fish input, CancellationToken cancellationToken = default) => throw null; public virtual Task PutRecursiveModelAsync(Fish input, CancellationToken cancellationToken = default) => throw null; @@ -55,7 +55,7 @@ public partial class NestedDiscriminatorClient public virtual Task GetMissingDiscriminatorAsync(RequestOptions options) => throw null; - public virtual ClientResult GetMissingDiscriminator() => throw null; + public virtual ClientResult GetMissingDiscriminator(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetMissingDiscriminatorAsync(CancellationToken cancellationToken = default) => throw null; @@ -63,7 +63,7 @@ public partial class NestedDiscriminatorClient public virtual Task GetWrongDiscriminatorAsync(RequestOptions options) => throw null; - public virtual ClientResult GetWrongDiscriminator() => throw null; + public virtual ClientResult GetWrongDiscriminator(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetWrongDiscriminatorAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/not-discriminated/src/Generated/NotDiscriminatedClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/not-discriminated/src/Generated/NotDiscriminatedClient.cs index 3caa1d4ac4..fd6cef19cb 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/not-discriminated/src/Generated/NotDiscriminatedClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/not-discriminated/src/Generated/NotDiscriminatedClient.cs @@ -23,7 +23,7 @@ public partial class NotDiscriminatedClient public virtual Task PostValidAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PostValid(Siamese input) => throw null; + public virtual ClientResult PostValid(Siamese input, CancellationToken cancellationToken = default) => throw null; public virtual Task PostValidAsync(Siamese input, CancellationToken cancellationToken = default) => throw null; @@ -31,7 +31,7 @@ public partial class NotDiscriminatedClient public virtual Task GetValidAsync(RequestOptions options) => throw null; - public virtual ClientResult GetValid() => throw null; + public virtual ClientResult GetValid(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetValidAsync(CancellationToken cancellationToken = default) => throw null; @@ -39,7 +39,7 @@ public partial class NotDiscriminatedClient public virtual Task PutValidAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutValid(Siamese input) => throw null; + public virtual ClientResult PutValid(Siamese input, CancellationToken cancellationToken = default) => throw null; public virtual Task> PutValidAsync(Siamese input, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/recursive/src/Generated/RecursiveClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/recursive/src/Generated/RecursiveClient.cs index 5c8dec7c24..e5e8fd0ed4 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/recursive/src/Generated/RecursiveClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/recursive/src/Generated/RecursiveClient.cs @@ -23,7 +23,7 @@ public partial class RecursiveClient public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(Extension input) => throw null; + public virtual ClientResult Put(Extension input, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(Extension input, CancellationToken cancellationToken = default) => throw null; @@ -31,7 +31,7 @@ public partial class RecursiveClient public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/SingleDiscriminatorClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/SingleDiscriminatorClient.cs index 793a1c0c87..15e73e5f86 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/SingleDiscriminatorClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/inheritance/single-discriminator/src/Generated/SingleDiscriminatorClient.cs @@ -23,7 +23,7 @@ public partial class SingleDiscriminatorClient public virtual Task GetModelAsync(RequestOptions options) => throw null; - public virtual ClientResult GetModel() => throw null; + public virtual ClientResult GetModel(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetModelAsync(CancellationToken cancellationToken = default) => throw null; @@ -31,7 +31,7 @@ public partial class SingleDiscriminatorClient public virtual Task PutModelAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutModel(Bird input) => throw null; + public virtual ClientResult PutModel(Bird input, CancellationToken cancellationToken = default) => throw null; public virtual Task PutModelAsync(Bird input, CancellationToken cancellationToken = default) => throw null; @@ -39,7 +39,7 @@ public partial class SingleDiscriminatorClient public virtual Task GetRecursiveModelAsync(RequestOptions options) => throw null; - public virtual ClientResult GetRecursiveModel() => throw null; + public virtual ClientResult GetRecursiveModel(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetRecursiveModelAsync(CancellationToken cancellationToken = default) => throw null; @@ -47,7 +47,7 @@ public partial class SingleDiscriminatorClient public virtual Task PutRecursiveModelAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutRecursiveModel(Bird input) => throw null; + public virtual ClientResult PutRecursiveModel(Bird input, CancellationToken cancellationToken = default) => throw null; public virtual Task PutRecursiveModelAsync(Bird input, CancellationToken cancellationToken = default) => throw null; @@ -55,7 +55,7 @@ public partial class SingleDiscriminatorClient public virtual Task GetMissingDiscriminatorAsync(RequestOptions options) => throw null; - public virtual ClientResult GetMissingDiscriminator() => throw null; + public virtual ClientResult GetMissingDiscriminator(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetMissingDiscriminatorAsync(CancellationToken cancellationToken = default) => throw null; @@ -63,7 +63,7 @@ public partial class SingleDiscriminatorClient public virtual Task GetWrongDiscriminatorAsync(RequestOptions options) => throw null; - public virtual ClientResult GetWrongDiscriminator() => throw null; + public virtual ClientResult GetWrongDiscriminator(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetWrongDiscriminatorAsync(CancellationToken cancellationToken = default) => throw null; @@ -71,7 +71,7 @@ public partial class SingleDiscriminatorClient public virtual Task GetLegacyModelAsync(RequestOptions options) => throw null; - public virtual ClientResult GetLegacyModel() => throw null; + public virtual ClientResult GetLegacyModel(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetLegacyModelAsync(CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/usage/src/Generated/UsageClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/usage/src/Generated/UsageClient.cs index 5e8ed26c7c..1e9687b46a 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/usage/src/Generated/UsageClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/usage/src/Generated/UsageClient.cs @@ -23,7 +23,7 @@ public partial class UsageClient public virtual Task InputAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Input(InputRecord input) => throw null; + public virtual ClientResult Input(InputRecord input, CancellationToken cancellationToken = default) => throw null; public virtual Task InputAsync(InputRecord input, CancellationToken cancellationToken = default) => throw null; @@ -31,7 +31,7 @@ public partial class UsageClient public virtual Task OutputAsync(RequestOptions options) => throw null; - public virtual ClientResult Output() => throw null; + public virtual ClientResult Output(CancellationToken cancellationToken = default) => throw null; public virtual Task> OutputAsync(CancellationToken cancellationToken = default) => throw null; @@ -39,7 +39,7 @@ public partial class UsageClient public virtual Task InputAndOutputAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult InputAndOutput(InputOutputRecord body) => throw null; + public virtual ClientResult InputAndOutput(InputOutputRecord body, CancellationToken cancellationToken = default) => throw null; public virtual Task> InputAndOutputAsync(InputOutputRecord body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/visibility/src/Generated/VisibilityClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/visibility/src/Generated/VisibilityClient.cs index 7edccdf5de..f5c6e7f27b 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/visibility/src/Generated/VisibilityClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/model/visibility/src/Generated/VisibilityClient.cs @@ -23,7 +23,7 @@ public partial class VisibilityClient public virtual Task GetModelAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult GetModel(VisibilityModel input) => throw null; + public virtual ClientResult GetModel(VisibilityModel input, CancellationToken cancellationToken = default) => throw null; public virtual Task> GetModelAsync(VisibilityModel input, CancellationToken cancellationToken = default) => throw null; @@ -31,7 +31,7 @@ public partial class VisibilityClient public virtual Task HeadModelAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult HeadModel(VisibilityModel input) => throw null; + public virtual ClientResult HeadModel(VisibilityModel input, CancellationToken cancellationToken = default) => throw null; public virtual Task HeadModelAsync(VisibilityModel input, CancellationToken cancellationToken = default) => throw null; @@ -39,7 +39,7 @@ public partial class VisibilityClient public virtual Task PutModelAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutModel(VisibilityModel input) => throw null; + public virtual ClientResult PutModel(VisibilityModel input, CancellationToken cancellationToken = default) => throw null; public virtual Task PutModelAsync(VisibilityModel input, CancellationToken cancellationToken = default) => throw null; @@ -51,7 +51,7 @@ public partial class VisibilityClient public virtual Task PostModelAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PostModel(VisibilityModel input) => throw null; + public virtual ClientResult PostModel(VisibilityModel input, CancellationToken cancellationToken = default) => throw null; public virtual Task PostModelAsync(VisibilityModel input, CancellationToken cancellationToken = default) => throw null; @@ -59,7 +59,7 @@ public partial class VisibilityClient public virtual Task DeleteModelAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult DeleteModel(VisibilityModel input) => throw null; + public virtual ClientResult DeleteModel(VisibilityModel input, CancellationToken cancellationToken = default) => throw null; public virtual Task DeleteModelAsync(VisibilityModel input, CancellationToken cancellationToken = default) => throw null; @@ -67,7 +67,7 @@ public partial class VisibilityClient public virtual Task PutReadOnlyModelAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutReadOnlyModel(ReadOnlyModel input) => throw null; + public virtual ClientResult PutReadOnlyModel(ReadOnlyModel input, CancellationToken cancellationToken = default) => throw null; public virtual Task> PutReadOnlyModelAsync(ReadOnlyModel input, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadFloat.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadFloat.cs index ab73615a83..6ddeb10c36 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadFloat.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadFloat.cs @@ -20,7 +20,7 @@ public partial class ExtendsDifferentSpreadFloat public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class ExtendsDifferentSpreadFloat public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(DifferentSpreadFloatDerived body) => throw null; + public virtual ClientResult Put(DifferentSpreadFloatDerived body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(DifferentSpreadFloatDerived body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModel.cs index e743871eef..149d68643f 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModel.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModel.cs @@ -20,7 +20,7 @@ public partial class ExtendsDifferentSpreadModel public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class ExtendsDifferentSpreadModel public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(DifferentSpreadModelDerived body) => throw null; + public virtual ClientResult Put(DifferentSpreadModelDerived body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(DifferentSpreadModelDerived body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModelArray.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModelArray.cs index 89b8c9d619..842983aeee 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModelArray.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadModelArray.cs @@ -20,7 +20,7 @@ public partial class ExtendsDifferentSpreadModelArray public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class ExtendsDifferentSpreadModelArray public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(DifferentSpreadModelArrayDerived body) => throw null; + public virtual ClientResult Put(DifferentSpreadModelArrayDerived body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(DifferentSpreadModelArrayDerived body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadString.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadString.cs index ebc4fed979..4500baa0fa 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadString.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsDifferentSpreadString.cs @@ -20,7 +20,7 @@ public partial class ExtendsDifferentSpreadString public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class ExtendsDifferentSpreadString public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(DifferentSpreadStringDerived body) => throw null; + public virtual ClientResult Put(DifferentSpreadStringDerived body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(DifferentSpreadStringDerived body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsFloat.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsFloat.cs index b3d380e6fa..f5c991644b 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsFloat.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsFloat.cs @@ -20,7 +20,7 @@ public partial class ExtendsFloat public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class ExtendsFloat public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(ExtendsFloatAdditionalProperties body) => throw null; + public virtual ClientResult Put(ExtendsFloatAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(ExtendsFloatAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsModel.cs index 35c4e3430f..8be28cbddb 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsModel.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsModel.cs @@ -20,7 +20,7 @@ public partial class ExtendsModel public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class ExtendsModel public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(ExtendsModelAdditionalProperties body) => throw null; + public virtual ClientResult Put(ExtendsModelAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(ExtendsModelAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsModelArray.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsModelArray.cs index e37e3791a3..fc91f14066 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsModelArray.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsModelArray.cs @@ -20,7 +20,7 @@ public partial class ExtendsModelArray public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class ExtendsModelArray public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(ExtendsModelArrayAdditionalProperties body) => throw null; + public virtual ClientResult Put(ExtendsModelArrayAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(ExtendsModelArrayAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsString.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsString.cs index f93198254c..fd57374bb0 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsString.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsString.cs @@ -20,7 +20,7 @@ public partial class ExtendsString public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class ExtendsString public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(ExtendsStringAdditionalProperties body) => throw null; + public virtual ClientResult Put(ExtendsStringAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(ExtendsStringAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknown.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknown.cs index 7eeaf6f302..a56f77368e 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknown.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknown.cs @@ -20,7 +20,7 @@ public partial class ExtendsUnknown public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class ExtendsUnknown public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(ExtendsUnknownAdditionalProperties body) => throw null; + public virtual ClientResult Put(ExtendsUnknownAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(ExtendsUnknownAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknownDerived.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknownDerived.cs index 95c624a3c1..dff5553044 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknownDerived.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknownDerived.cs @@ -20,7 +20,7 @@ public partial class ExtendsUnknownDerived public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class ExtendsUnknownDerived public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(ExtendsUnknownAdditionalPropertiesDerived body) => throw null; + public virtual ClientResult Put(ExtendsUnknownAdditionalPropertiesDerived body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(ExtendsUnknownAdditionalPropertiesDerived body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknownDiscriminated.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknownDiscriminated.cs index ab7479e1f5..892863d04c 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknownDiscriminated.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/ExtendsUnknownDiscriminated.cs @@ -20,7 +20,7 @@ public partial class ExtendsUnknownDiscriminated public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class ExtendsUnknownDiscriminated public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(ExtendsUnknownAdditionalPropertiesDiscriminated body) => throw null; + public virtual ClientResult Put(ExtendsUnknownAdditionalPropertiesDiscriminated body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(ExtendsUnknownAdditionalPropertiesDiscriminated body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsFloat.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsFloat.cs index c12957705f..e5091bc5f0 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsFloat.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsFloat.cs @@ -20,7 +20,7 @@ public partial class IsFloat public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class IsFloat public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IsFloatAdditionalProperties body) => throw null; + public virtual ClientResult Put(IsFloatAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IsFloatAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsModel.cs index 4cc7906c62..58afa817c6 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsModel.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsModel.cs @@ -20,7 +20,7 @@ public partial class IsModel public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class IsModel public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IsModelAdditionalProperties body) => throw null; + public virtual ClientResult Put(IsModelAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IsModelAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsModelArray.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsModelArray.cs index 2ca47c59a6..ae5b723c37 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsModelArray.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsModelArray.cs @@ -20,7 +20,7 @@ public partial class IsModelArray public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class IsModelArray public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IsModelArrayAdditionalProperties body) => throw null; + public virtual ClientResult Put(IsModelArrayAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IsModelArrayAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsString.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsString.cs index 649896eb0f..74dbd82b94 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsString.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsString.cs @@ -20,7 +20,7 @@ public partial class IsString public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class IsString public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IsStringAdditionalProperties body) => throw null; + public virtual ClientResult Put(IsStringAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IsStringAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknown.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknown.cs index 3f04c0a31f..fa026e5942 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknown.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknown.cs @@ -20,7 +20,7 @@ public partial class IsUnknown public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class IsUnknown public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IsUnknownAdditionalProperties body) => throw null; + public virtual ClientResult Put(IsUnknownAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IsUnknownAdditionalProperties body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknownDerived.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknownDerived.cs index 449f6ca870..05a05af7c3 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknownDerived.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknownDerived.cs @@ -20,7 +20,7 @@ public partial class IsUnknownDerived public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class IsUnknownDerived public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IsUnknownAdditionalPropertiesDerived body) => throw null; + public virtual ClientResult Put(IsUnknownAdditionalPropertiesDerived body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IsUnknownAdditionalPropertiesDerived body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknownDiscriminated.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknownDiscriminated.cs index 0e2b17309d..47352eb913 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknownDiscriminated.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/IsUnknownDiscriminated.cs @@ -20,7 +20,7 @@ public partial class IsUnknownDiscriminated public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class IsUnknownDiscriminated public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IsUnknownAdditionalPropertiesDiscriminated body) => throw null; + public virtual ClientResult Put(IsUnknownAdditionalPropertiesDiscriminated body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IsUnknownAdditionalPropertiesDiscriminated body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/MultipleSpread.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/MultipleSpread.cs index 64dfb9b160..10ae6e3d1b 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/MultipleSpread.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/MultipleSpread.cs @@ -20,7 +20,7 @@ public partial class MultipleSpread public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class MultipleSpread public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(MultipleSpreadRecord body) => throw null; + public virtual ClientResult Put(MultipleSpreadRecord body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(MultipleSpreadRecord body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentFloat.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentFloat.cs index cf670557aa..b45a0adf2e 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentFloat.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentFloat.cs @@ -20,7 +20,7 @@ public partial class SpreadDifferentFloat public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class SpreadDifferentFloat public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(DifferentSpreadFloatRecord body) => throw null; + public virtual ClientResult Put(DifferentSpreadFloatRecord body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(DifferentSpreadFloatRecord body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentModel.cs index 71ae92d81e..7a4828d7a2 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentModel.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentModel.cs @@ -20,7 +20,7 @@ public partial class SpreadDifferentModel public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class SpreadDifferentModel public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(DifferentSpreadModelRecord body) => throw null; + public virtual ClientResult Put(DifferentSpreadModelRecord body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(DifferentSpreadModelRecord body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentModelArray.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentModelArray.cs index 4b58472a7f..0929a2387e 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentModelArray.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentModelArray.cs @@ -20,7 +20,7 @@ public partial class SpreadDifferentModelArray public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class SpreadDifferentModelArray public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(DifferentSpreadModelArrayRecord body) => throw null; + public virtual ClientResult Put(DifferentSpreadModelArrayRecord body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(DifferentSpreadModelArrayRecord body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentString.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentString.cs index affcc37fbb..f59f19462f 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentString.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadDifferentString.cs @@ -20,7 +20,7 @@ public partial class SpreadDifferentString public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class SpreadDifferentString public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(DifferentSpreadStringRecord body) => throw null; + public virtual ClientResult Put(DifferentSpreadStringRecord body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(DifferentSpreadStringRecord body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadFloat.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadFloat.cs index 2d6de14e8a..2082be364c 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadFloat.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadFloat.cs @@ -20,7 +20,7 @@ public partial class SpreadFloat public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class SpreadFloat public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(SpreadFloatRecord body) => throw null; + public virtual ClientResult Put(SpreadFloatRecord body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(SpreadFloatRecord body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadModel.cs index 3789416167..b3ec8e7861 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadModel.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadModel.cs @@ -20,7 +20,7 @@ public partial class SpreadModel public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class SpreadModel public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(SpreadModelRecord body) => throw null; + public virtual ClientResult Put(SpreadModelRecord body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(SpreadModelRecord body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadModelArray.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadModelArray.cs index 73c75d5df0..d8277d84e7 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadModelArray.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadModelArray.cs @@ -20,7 +20,7 @@ public partial class SpreadModelArray public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class SpreadModelArray public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(SpreadModelArrayRecord body) => throw null; + public virtual ClientResult Put(SpreadModelArrayRecord body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(SpreadModelArrayRecord body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordDiscriminatedUnion.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordDiscriminatedUnion.cs index 4fc0025d65..8439f72320 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordDiscriminatedUnion.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordDiscriminatedUnion.cs @@ -20,7 +20,7 @@ public partial class SpreadRecordDiscriminatedUnion public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class SpreadRecordDiscriminatedUnion public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(SpreadRecordForDiscriminatedUnion body) => throw null; + public virtual ClientResult Put(SpreadRecordForDiscriminatedUnion body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(SpreadRecordForDiscriminatedUnion body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion.cs index 9831af4bed..9c2ab2bc54 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion.cs @@ -20,7 +20,7 @@ public partial class SpreadRecordNonDiscriminatedUnion public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class SpreadRecordNonDiscriminatedUnion public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(SpreadRecordForNonDiscriminatedUnion body) => throw null; + public virtual ClientResult Put(SpreadRecordForNonDiscriminatedUnion body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(SpreadRecordForNonDiscriminatedUnion body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion2.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion2.cs index 131a566bb7..78fa7418d6 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion2.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion2.cs @@ -20,7 +20,7 @@ public partial class SpreadRecordNonDiscriminatedUnion2 public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class SpreadRecordNonDiscriminatedUnion2 public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(SpreadRecordForNonDiscriminatedUnion2 body) => throw null; + public virtual ClientResult Put(SpreadRecordForNonDiscriminatedUnion2 body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(SpreadRecordForNonDiscriminatedUnion2 body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion3.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion3.cs index 883e8fcb8c..553ca1e753 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion3.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordNonDiscriminatedUnion3.cs @@ -20,7 +20,7 @@ public partial class SpreadRecordNonDiscriminatedUnion3 public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class SpreadRecordNonDiscriminatedUnion3 public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(SpreadRecordForNonDiscriminatedUnion3 body) => throw null; + public virtual ClientResult Put(SpreadRecordForNonDiscriminatedUnion3 body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(SpreadRecordForNonDiscriminatedUnion3 body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordUnion.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordUnion.cs index 4090deb4b6..433981d443 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordUnion.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadRecordUnion.cs @@ -20,7 +20,7 @@ public partial class SpreadRecordUnion public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class SpreadRecordUnion public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(SpreadRecordForUnion body) => throw null; + public virtual ClientResult Put(SpreadRecordForUnion body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(SpreadRecordForUnion body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadString.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadString.cs index 3d883bd638..1fff54b1f7 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadString.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/additional-properties/src/Generated/SpreadString.cs @@ -20,7 +20,7 @@ public partial class SpreadString public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class SpreadString public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(SpreadStringRecord body) => throw null; + public virtual ClientResult Put(SpreadStringRecord body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(SpreadStringRecord body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Bytes.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Bytes.cs index 9e89539f95..e9b1af619d 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Bytes.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Bytes.cs @@ -20,7 +20,7 @@ public partial class Bytes public virtual Task GetNonNullAsync(RequestOptions options) => throw null; - public virtual ClientResult GetNonNull() => throw null; + public virtual ClientResult GetNonNull(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetNonNullAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Bytes public virtual Task GetNullAsync(RequestOptions options) => throw null; - public virtual ClientResult GetNull() => throw null; + public virtual ClientResult GetNull(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetNullAsync(CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsByte.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsByte.cs index 65b27d8885..9726e1ae06 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsByte.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsByte.cs @@ -20,7 +20,7 @@ public partial class CollectionsByte public virtual Task GetNonNullAsync(RequestOptions options) => throw null; - public virtual ClientResult GetNonNull() => throw null; + public virtual ClientResult GetNonNull(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetNonNullAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class CollectionsByte public virtual Task GetNullAsync(RequestOptions options) => throw null; - public virtual ClientResult GetNull() => throw null; + public virtual ClientResult GetNull(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetNullAsync(CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsModel.cs index cf1ac9e05a..6768e5300d 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsModel.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsModel.cs @@ -20,7 +20,7 @@ public partial class CollectionsModel public virtual Task GetNonNullAsync(RequestOptions options) => throw null; - public virtual ClientResult GetNonNull() => throw null; + public virtual ClientResult GetNonNull(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetNonNullAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class CollectionsModel public virtual Task GetNullAsync(RequestOptions options) => throw null; - public virtual ClientResult GetNull() => throw null; + public virtual ClientResult GetNull(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetNullAsync(CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsString.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsString.cs index d0f494b64d..c3ee7a8235 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsString.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/CollectionsString.cs @@ -20,7 +20,7 @@ public partial class CollectionsString public virtual Task GetNonNullAsync(RequestOptions options) => throw null; - public virtual ClientResult GetNonNull() => throw null; + public virtual ClientResult GetNonNull(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetNonNullAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class CollectionsString public virtual Task GetNullAsync(RequestOptions options) => throw null; - public virtual ClientResult GetNull() => throw null; + public virtual ClientResult GetNull(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetNullAsync(CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Datetime.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Datetime.cs index dc06e6a85b..97261713bd 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Datetime.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Datetime.cs @@ -20,7 +20,7 @@ public partial class Datetime public virtual Task GetNonNullAsync(RequestOptions options) => throw null; - public virtual ClientResult GetNonNull() => throw null; + public virtual ClientResult GetNonNull(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetNonNullAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Datetime public virtual Task GetNullAsync(RequestOptions options) => throw null; - public virtual ClientResult GetNull() => throw null; + public virtual ClientResult GetNull(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetNullAsync(CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Duration.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Duration.cs index 89bd5d75a8..e19fa9a58a 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Duration.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/Duration.cs @@ -20,7 +20,7 @@ public partial class Duration public virtual Task GetNonNullAsync(RequestOptions options) => throw null; - public virtual ClientResult GetNonNull() => throw null; + public virtual ClientResult GetNonNull(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetNonNullAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Duration public virtual Task GetNullAsync(RequestOptions options) => throw null; - public virtual ClientResult GetNull() => throw null; + public virtual ClientResult GetNull(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetNullAsync(CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/String.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/String.cs index 319c4307e4..830b393953 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/String.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/nullable/src/Generated/String.cs @@ -20,7 +20,7 @@ public partial class String public virtual Task GetNonNullAsync(RequestOptions options) => throw null; - public virtual ClientResult GetNonNull() => throw null; + public virtual ClientResult GetNonNull(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetNonNullAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class String public virtual Task GetNullAsync(RequestOptions options) => throw null; - public virtual ClientResult GetNull() => throw null; + public virtual ClientResult GetNull(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetNullAsync(CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/BooleanLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/BooleanLiteral.cs index b68ae5e72d..0a32a1a4a0 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/BooleanLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/BooleanLiteral.cs @@ -20,7 +20,7 @@ public partial class BooleanLiteral public virtual Task GetAllAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAll() => throw null; + public virtual ClientResult GetAll(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAllAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class BooleanLiteral public virtual Task GetDefaultAsync(RequestOptions options) => throw null; - public virtual ClientResult GetDefault() => throw null; + public virtual ClientResult GetDefault(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetDefaultAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class BooleanLiteral public virtual Task PutAllAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutAll(BooleanLiteralProperty body) => throw null; + public virtual ClientResult PutAll(BooleanLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAllAsync(BooleanLiteralProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class BooleanLiteral public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutDefault(BooleanLiteralProperty body) => throw null; + public virtual ClientResult PutDefault(BooleanLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutDefaultAsync(BooleanLiteralProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Bytes.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Bytes.cs index bd03c9ea22..ac2be4cccb 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Bytes.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Bytes.cs @@ -20,7 +20,7 @@ public partial class Bytes public virtual Task GetAllAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAll() => throw null; + public virtual ClientResult GetAll(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAllAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Bytes public virtual Task GetDefaultAsync(RequestOptions options) => throw null; - public virtual ClientResult GetDefault() => throw null; + public virtual ClientResult GetDefault(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetDefaultAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class Bytes public virtual Task PutAllAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutAll(BytesProperty body) => throw null; + public virtual ClientResult PutAll(BytesProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAllAsync(BytesProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class Bytes public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutDefault(BytesProperty body) => throw null; + public virtual ClientResult PutDefault(BytesProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutDefaultAsync(BytesProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/CollectionsByte.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/CollectionsByte.cs index 777167c644..d116273e9a 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/CollectionsByte.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/CollectionsByte.cs @@ -20,7 +20,7 @@ public partial class CollectionsByte public virtual Task GetAllAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAll() => throw null; + public virtual ClientResult GetAll(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAllAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class CollectionsByte public virtual Task GetDefaultAsync(RequestOptions options) => throw null; - public virtual ClientResult GetDefault() => throw null; + public virtual ClientResult GetDefault(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetDefaultAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class CollectionsByte public virtual Task PutAllAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutAll(CollectionsByteProperty body) => throw null; + public virtual ClientResult PutAll(CollectionsByteProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAllAsync(CollectionsByteProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class CollectionsByte public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutDefault(CollectionsByteProperty body) => throw null; + public virtual ClientResult PutDefault(CollectionsByteProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutDefaultAsync(CollectionsByteProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/CollectionsModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/CollectionsModel.cs index c05e09c94f..0f209d4633 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/CollectionsModel.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/CollectionsModel.cs @@ -20,7 +20,7 @@ public partial class CollectionsModel public virtual Task GetAllAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAll() => throw null; + public virtual ClientResult GetAll(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAllAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class CollectionsModel public virtual Task GetDefaultAsync(RequestOptions options) => throw null; - public virtual ClientResult GetDefault() => throw null; + public virtual ClientResult GetDefault(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetDefaultAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class CollectionsModel public virtual Task PutAllAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutAll(CollectionsModelProperty body) => throw null; + public virtual ClientResult PutAll(CollectionsModelProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAllAsync(CollectionsModelProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class CollectionsModel public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutDefault(CollectionsModelProperty body) => throw null; + public virtual ClientResult PutDefault(CollectionsModelProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutDefaultAsync(CollectionsModelProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Datetime.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Datetime.cs index 94036740cd..81574ddc84 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Datetime.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Datetime.cs @@ -20,7 +20,7 @@ public partial class Datetime public virtual Task GetAllAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAll() => throw null; + public virtual ClientResult GetAll(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAllAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Datetime public virtual Task GetDefaultAsync(RequestOptions options) => throw null; - public virtual ClientResult GetDefault() => throw null; + public virtual ClientResult GetDefault(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetDefaultAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class Datetime public virtual Task PutAllAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutAll(DatetimeProperty body) => throw null; + public virtual ClientResult PutAll(DatetimeProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAllAsync(DatetimeProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class Datetime public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutDefault(DatetimeProperty body) => throw null; + public virtual ClientResult PutDefault(DatetimeProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutDefaultAsync(DatetimeProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Duration.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Duration.cs index 9acbe2bc29..18fb39f08e 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Duration.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/Duration.cs @@ -20,7 +20,7 @@ public partial class Duration public virtual Task GetAllAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAll() => throw null; + public virtual ClientResult GetAll(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAllAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Duration public virtual Task GetDefaultAsync(RequestOptions options) => throw null; - public virtual ClientResult GetDefault() => throw null; + public virtual ClientResult GetDefault(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetDefaultAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class Duration public virtual Task PutAllAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutAll(DurationProperty body) => throw null; + public virtual ClientResult PutAll(DurationProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAllAsync(DurationProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class Duration public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutDefault(DurationProperty body) => throw null; + public virtual ClientResult PutDefault(DurationProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutDefaultAsync(DurationProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/FloatLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/FloatLiteral.cs index 0481709052..7bd2a98c71 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/FloatLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/FloatLiteral.cs @@ -20,7 +20,7 @@ public partial class FloatLiteral public virtual Task GetAllAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAll() => throw null; + public virtual ClientResult GetAll(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAllAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class FloatLiteral public virtual Task GetDefaultAsync(RequestOptions options) => throw null; - public virtual ClientResult GetDefault() => throw null; + public virtual ClientResult GetDefault(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetDefaultAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class FloatLiteral public virtual Task PutAllAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutAll(FloatLiteralProperty body) => throw null; + public virtual ClientResult PutAll(FloatLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAllAsync(FloatLiteralProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class FloatLiteral public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutDefault(FloatLiteralProperty body) => throw null; + public virtual ClientResult PutDefault(FloatLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutDefaultAsync(FloatLiteralProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/IntLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/IntLiteral.cs index 5c9c8b5bfb..af77e1f862 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/IntLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/IntLiteral.cs @@ -20,7 +20,7 @@ public partial class IntLiteral public virtual Task GetAllAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAll() => throw null; + public virtual ClientResult GetAll(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAllAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class IntLiteral public virtual Task GetDefaultAsync(RequestOptions options) => throw null; - public virtual ClientResult GetDefault() => throw null; + public virtual ClientResult GetDefault(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetDefaultAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class IntLiteral public virtual Task PutAllAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutAll(IntLiteralProperty body) => throw null; + public virtual ClientResult PutAll(IntLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAllAsync(IntLiteralProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class IntLiteral public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutDefault(IntLiteralProperty body) => throw null; + public virtual ClientResult PutDefault(IntLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutDefaultAsync(IntLiteralProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/PlainDate.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/PlainDate.cs index c96d5a34f4..0d841833f7 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/PlainDate.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/PlainDate.cs @@ -20,7 +20,7 @@ public partial class PlainDate public virtual Task GetAllAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAll() => throw null; + public virtual ClientResult GetAll(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAllAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class PlainDate public virtual Task GetDefaultAsync(RequestOptions options) => throw null; - public virtual ClientResult GetDefault() => throw null; + public virtual ClientResult GetDefault(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetDefaultAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class PlainDate public virtual Task PutAllAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutAll(PlainDateProperty body) => throw null; + public virtual ClientResult PutAll(PlainDateProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAllAsync(PlainDateProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class PlainDate public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutDefault(PlainDateProperty body) => throw null; + public virtual ClientResult PutDefault(PlainDateProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutDefaultAsync(PlainDateProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/PlainTime.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/PlainTime.cs index 74758e22ee..e94179657f 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/PlainTime.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/PlainTime.cs @@ -20,7 +20,7 @@ public partial class PlainTime public virtual Task GetAllAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAll() => throw null; + public virtual ClientResult GetAll(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAllAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class PlainTime public virtual Task GetDefaultAsync(RequestOptions options) => throw null; - public virtual ClientResult GetDefault() => throw null; + public virtual ClientResult GetDefault(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetDefaultAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class PlainTime public virtual Task PutAllAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutAll(PlainTimeProperty body) => throw null; + public virtual ClientResult PutAll(PlainTimeProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAllAsync(PlainTimeProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class PlainTime public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutDefault(PlainTimeProperty body) => throw null; + public virtual ClientResult PutDefault(PlainTimeProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutDefaultAsync(PlainTimeProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/RequiredAndOptional.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/RequiredAndOptional.cs index 70901ae4f6..d074d37cbe 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/RequiredAndOptional.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/RequiredAndOptional.cs @@ -20,7 +20,7 @@ public partial class RequiredAndOptional public virtual Task GetAllAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAll() => throw null; + public virtual ClientResult GetAll(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAllAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class RequiredAndOptional public virtual Task GetRequiredOnlyAsync(RequestOptions options) => throw null; - public virtual ClientResult GetRequiredOnly() => throw null; + public virtual ClientResult GetRequiredOnly(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetRequiredOnlyAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class RequiredAndOptional public virtual Task PutAllAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutAll(RequiredAndOptionalProperty body) => throw null; + public virtual ClientResult PutAll(RequiredAndOptionalProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAllAsync(RequiredAndOptionalProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class RequiredAndOptional public virtual Task PutRequiredOnlyAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutRequiredOnly(RequiredAndOptionalProperty body) => throw null; + public virtual ClientResult PutRequiredOnly(RequiredAndOptionalProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutRequiredOnlyAsync(RequiredAndOptionalProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/String.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/String.cs index 7938b75b1e..6a1259a912 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/String.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/String.cs @@ -20,7 +20,7 @@ public partial class String public virtual Task GetAllAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAll() => throw null; + public virtual ClientResult GetAll(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAllAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class String public virtual Task GetDefaultAsync(RequestOptions options) => throw null; - public virtual ClientResult GetDefault() => throw null; + public virtual ClientResult GetDefault(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetDefaultAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class String public virtual Task PutAllAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutAll(StringProperty body) => throw null; + public virtual ClientResult PutAll(StringProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAllAsync(StringProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class String public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutDefault(StringProperty body) => throw null; + public virtual ClientResult PutDefault(StringProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutDefaultAsync(StringProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/StringLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/StringLiteral.cs index bb01f25c0d..ed6c1f30dc 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/StringLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/StringLiteral.cs @@ -20,7 +20,7 @@ public partial class StringLiteral public virtual Task GetAllAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAll() => throw null; + public virtual ClientResult GetAll(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAllAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class StringLiteral public virtual Task GetDefaultAsync(RequestOptions options) => throw null; - public virtual ClientResult GetDefault() => throw null; + public virtual ClientResult GetDefault(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetDefaultAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class StringLiteral public virtual Task PutAllAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutAll(StringLiteralProperty body) => throw null; + public virtual ClientResult PutAll(StringLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAllAsync(StringLiteralProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class StringLiteral public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutDefault(StringLiteralProperty body) => throw null; + public virtual ClientResult PutDefault(StringLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutDefaultAsync(StringLiteralProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionFloatLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionFloatLiteral.cs index 9c01857f2d..c64ca77294 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionFloatLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionFloatLiteral.cs @@ -20,7 +20,7 @@ public partial class UnionFloatLiteral public virtual Task GetAllAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAll() => throw null; + public virtual ClientResult GetAll(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAllAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class UnionFloatLiteral public virtual Task GetDefaultAsync(RequestOptions options) => throw null; - public virtual ClientResult GetDefault() => throw null; + public virtual ClientResult GetDefault(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetDefaultAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class UnionFloatLiteral public virtual Task PutAllAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutAll(UnionFloatLiteralProperty body) => throw null; + public virtual ClientResult PutAll(UnionFloatLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAllAsync(UnionFloatLiteralProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class UnionFloatLiteral public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutDefault(UnionFloatLiteralProperty body) => throw null; + public virtual ClientResult PutDefault(UnionFloatLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutDefaultAsync(UnionFloatLiteralProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionIntLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionIntLiteral.cs index 6dc1738964..e14701470b 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionIntLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionIntLiteral.cs @@ -20,7 +20,7 @@ public partial class UnionIntLiteral public virtual Task GetAllAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAll() => throw null; + public virtual ClientResult GetAll(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAllAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class UnionIntLiteral public virtual Task GetDefaultAsync(RequestOptions options) => throw null; - public virtual ClientResult GetDefault() => throw null; + public virtual ClientResult GetDefault(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetDefaultAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class UnionIntLiteral public virtual Task PutAllAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutAll(UnionIntLiteralProperty body) => throw null; + public virtual ClientResult PutAll(UnionIntLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAllAsync(UnionIntLiteralProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class UnionIntLiteral public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutDefault(UnionIntLiteralProperty body) => throw null; + public virtual ClientResult PutDefault(UnionIntLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutDefaultAsync(UnionIntLiteralProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionStringLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionStringLiteral.cs index ab29e73381..f504297e66 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionStringLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/optionality/src/Generated/UnionStringLiteral.cs @@ -20,7 +20,7 @@ public partial class UnionStringLiteral public virtual Task GetAllAsync(RequestOptions options) => throw null; - public virtual ClientResult GetAll() => throw null; + public virtual ClientResult GetAll(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAllAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class UnionStringLiteral public virtual Task GetDefaultAsync(RequestOptions options) => throw null; - public virtual ClientResult GetDefault() => throw null; + public virtual ClientResult GetDefault(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetDefaultAsync(CancellationToken cancellationToken = default) => throw null; @@ -36,7 +36,7 @@ public partial class UnionStringLiteral public virtual Task PutAllAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutAll(UnionStringLiteralProperty body) => throw null; + public virtual ClientResult PutAll(UnionStringLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAllAsync(UnionStringLiteralProperty body, CancellationToken cancellationToken = default) => throw null; @@ -44,7 +44,7 @@ public partial class UnionStringLiteral public virtual Task PutDefaultAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult PutDefault(UnionStringLiteralProperty body) => throw null; + public virtual ClientResult PutDefault(UnionStringLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutDefaultAsync(UnionStringLiteralProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Boolean.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Boolean.cs index bc46ea53e5..9d54b64170 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Boolean.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Boolean.cs @@ -20,7 +20,7 @@ public partial class Boolean public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Boolean public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(BooleanProperty body) => throw null; + public virtual ClientResult Put(BooleanProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(BooleanProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/BooleanLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/BooleanLiteral.cs index d7b3f7d8ce..f9d533fadf 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/BooleanLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/BooleanLiteral.cs @@ -20,7 +20,7 @@ public partial class BooleanLiteral public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class BooleanLiteral public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(BooleanLiteralProperty body) => throw null; + public virtual ClientResult Put(BooleanLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(BooleanLiteralProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Bytes.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Bytes.cs index 1bd24b7030..43372c0edc 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Bytes.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Bytes.cs @@ -20,7 +20,7 @@ public partial class Bytes public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Bytes public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(BytesProperty body) => throw null; + public virtual ClientResult Put(BytesProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(BytesProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/CollectionsInt.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/CollectionsInt.cs index 6a5c609b4d..5a16eb7ef1 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/CollectionsInt.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/CollectionsInt.cs @@ -20,7 +20,7 @@ public partial class CollectionsInt public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class CollectionsInt public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(CollectionsIntProperty body) => throw null; + public virtual ClientResult Put(CollectionsIntProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(CollectionsIntProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/CollectionsModel.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/CollectionsModel.cs index 9ee4fed560..6331be576b 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/CollectionsModel.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/CollectionsModel.cs @@ -20,7 +20,7 @@ public partial class CollectionsModel public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class CollectionsModel public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(CollectionsModelProperty body) => throw null; + public virtual ClientResult Put(CollectionsModelProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(CollectionsModelProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/CollectionsString.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/CollectionsString.cs index cf02464e56..bf25a2d266 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/CollectionsString.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/CollectionsString.cs @@ -20,7 +20,7 @@ public partial class CollectionsString public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class CollectionsString public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(CollectionsStringProperty body) => throw null; + public virtual ClientResult Put(CollectionsStringProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(CollectionsStringProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Datetime.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Datetime.cs index 0dc0280aa5..b5356f674b 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Datetime.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Datetime.cs @@ -20,7 +20,7 @@ public partial class Datetime public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Datetime public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(DatetimeProperty body) => throw null; + public virtual ClientResult Put(DatetimeProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(DatetimeProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Decimal.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Decimal.cs index 80de69c435..06d5a0296a 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Decimal.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Decimal.cs @@ -20,7 +20,7 @@ public partial class Decimal public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Decimal public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(DecimalProperty body) => throw null; + public virtual ClientResult Put(DecimalProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(DecimalProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Decimal128.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Decimal128.cs index d61aec9fe5..3008dfa386 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Decimal128.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Decimal128.cs @@ -20,7 +20,7 @@ public partial class Decimal128 public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Decimal128 public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(Decimal128Property body) => throw null; + public virtual ClientResult Put(Decimal128Property body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(Decimal128Property body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/DictionaryString.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/DictionaryString.cs index 2d2de223e2..1f4db6785b 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/DictionaryString.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/DictionaryString.cs @@ -20,7 +20,7 @@ public partial class DictionaryString public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class DictionaryString public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(DictionaryStringProperty body) => throw null; + public virtual ClientResult Put(DictionaryStringProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(DictionaryStringProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Duration.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Duration.cs index 1ad767557a..7d7ba87f76 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Duration.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Duration.cs @@ -20,7 +20,7 @@ public partial class Duration public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Duration public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(DurationProperty body) => throw null; + public virtual ClientResult Put(DurationProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(DurationProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Enum.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Enum.cs index 613de14ba6..bf72853700 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Enum.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Enum.cs @@ -20,7 +20,7 @@ public partial class Enum public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Enum public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(EnumProperty body) => throw null; + public virtual ClientResult Put(EnumProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(EnumProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/ExtensibleEnum.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/ExtensibleEnum.cs index 85441ef2ad..170fab5479 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/ExtensibleEnum.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/ExtensibleEnum.cs @@ -20,7 +20,7 @@ public partial class ExtensibleEnum public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class ExtensibleEnum public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(ExtensibleEnumProperty body) => throw null; + public virtual ClientResult Put(ExtensibleEnumProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(ExtensibleEnumProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Float.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Float.cs index 0595166016..fb995cec26 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Float.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Float.cs @@ -20,7 +20,7 @@ public partial class Float public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Float public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(FloatProperty body) => throw null; + public virtual ClientResult Put(FloatProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(FloatProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/FloatLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/FloatLiteral.cs index 136a80f526..520d2c84fc 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/FloatLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/FloatLiteral.cs @@ -20,7 +20,7 @@ public partial class FloatLiteral public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class FloatLiteral public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(FloatLiteralProperty body) => throw null; + public virtual ClientResult Put(FloatLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(FloatLiteralProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Int.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Int.cs index a383cab086..1ae6c8c891 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Int.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Int.cs @@ -20,7 +20,7 @@ public partial class Int public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Int public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IntProperty body) => throw null; + public virtual ClientResult Put(IntProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IntProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/IntLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/IntLiteral.cs index ea7c49ddb7..41d5e985e1 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/IntLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/IntLiteral.cs @@ -20,7 +20,7 @@ public partial class IntLiteral public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class IntLiteral public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(IntLiteralProperty body) => throw null; + public virtual ClientResult Put(IntLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(IntLiteralProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Model.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Model.cs index 150e06783c..0a251ffc7d 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Model.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Model.cs @@ -20,7 +20,7 @@ public partial class Model public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Model public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(ModelProperty body) => throw null; + public virtual ClientResult Put(ModelProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(ModelProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Never.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Never.cs index 5cbea0d440..1a7fe82aa6 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Never.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/Never.cs @@ -20,7 +20,7 @@ public partial class Never public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Never public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(NeverProperty body) => throw null; + public virtual ClientResult Put(NeverProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(NeverProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/String.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/String.cs index adae364cae..35fe0e825e 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/String.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/String.cs @@ -20,7 +20,7 @@ public partial class String public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class String public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(StringProperty body) => throw null; + public virtual ClientResult Put(StringProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(StringProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/StringLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/StringLiteral.cs index 2522b57660..a1c71cae2b 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/StringLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/StringLiteral.cs @@ -20,7 +20,7 @@ public partial class StringLiteral public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class StringLiteral public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(StringLiteralProperty body) => throw null; + public virtual ClientResult Put(StringLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(StringLiteralProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnionEnumValue.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnionEnumValue.cs index 54cb1ee051..6eb221cb0f 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnionEnumValue.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnionEnumValue.cs @@ -20,7 +20,7 @@ public partial class UnionEnumValue public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class UnionEnumValue public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(UnionEnumValueProperty body) => throw null; + public virtual ClientResult Put(UnionEnumValueProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(UnionEnumValueProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnionFloatLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnionFloatLiteral.cs index 1c22f8857c..9854397c85 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnionFloatLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnionFloatLiteral.cs @@ -20,7 +20,7 @@ public partial class UnionFloatLiteral public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class UnionFloatLiteral public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(UnionFloatLiteralProperty body) => throw null; + public virtual ClientResult Put(UnionFloatLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(UnionFloatLiteralProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnionIntLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnionIntLiteral.cs index 2bb5657af9..349f95c5f8 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnionIntLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnionIntLiteral.cs @@ -20,7 +20,7 @@ public partial class UnionIntLiteral public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class UnionIntLiteral public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(UnionIntLiteralProperty body) => throw null; + public virtual ClientResult Put(UnionIntLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(UnionIntLiteralProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnionStringLiteral.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnionStringLiteral.cs index d3cfa25811..201ab5ae08 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnionStringLiteral.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnionStringLiteral.cs @@ -20,7 +20,7 @@ public partial class UnionStringLiteral public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class UnionStringLiteral public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(UnionStringLiteralProperty body) => throw null; + public virtual ClientResult Put(UnionStringLiteralProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(UnionStringLiteralProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnknownArray.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnknownArray.cs index 184470bc21..abb00dd897 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnknownArray.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnknownArray.cs @@ -20,7 +20,7 @@ public partial class UnknownArray public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class UnknownArray public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(UnknownArrayProperty body) => throw null; + public virtual ClientResult Put(UnknownArrayProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(UnknownArrayProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnknownDict.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnknownDict.cs index 1bdf922f78..e123fdd906 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnknownDict.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnknownDict.cs @@ -20,7 +20,7 @@ public partial class UnknownDict public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class UnknownDict public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(UnknownDictProperty body) => throw null; + public virtual ClientResult Put(UnknownDictProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(UnknownDictProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnknownInt.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnknownInt.cs index f66a5c802a..352dc6a68a 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnknownInt.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnknownInt.cs @@ -20,7 +20,7 @@ public partial class UnknownInt public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class UnknownInt public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(UnknownIntProperty body) => throw null; + public virtual ClientResult Put(UnknownIntProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(UnknownIntProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnknownString.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnknownString.cs index dc45d614bc..dbcf8b93ce 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnknownString.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/property/value-types/src/Generated/UnknownString.cs @@ -20,7 +20,7 @@ public partial class UnknownString public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class UnknownString public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(UnknownStringProperty body) => throw null; + public virtual ClientResult Put(UnknownStringProperty body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(UnknownStringProperty body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/Boolean.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/Boolean.cs index 3bbbd3d173..12a173aba7 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/Boolean.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/Boolean.cs @@ -19,7 +19,7 @@ public partial class Boolean public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -27,7 +27,7 @@ public partial class Boolean public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(bool body) => throw null; + public virtual ClientResult Put(bool body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(bool body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/Decimal128Type.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/Decimal128Type.cs index fda852ef0e..941ee7e41d 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/Decimal128Type.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/Decimal128Type.cs @@ -19,7 +19,7 @@ public partial class Decimal128Type public virtual Task ResponseBodyAsync(RequestOptions options) => throw null; - public virtual ClientResult ResponseBody() => throw null; + public virtual ClientResult ResponseBody(CancellationToken cancellationToken = default) => throw null; public virtual Task> ResponseBodyAsync(CancellationToken cancellationToken = default) => throw null; @@ -27,7 +27,7 @@ public partial class Decimal128Type public virtual Task RequestBodyAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult RequestBody(decimal body) => throw null; + public virtual ClientResult RequestBody(decimal body, CancellationToken cancellationToken = default) => throw null; public virtual Task RequestBodyAsync(decimal body, CancellationToken cancellationToken = default) => throw null; @@ -35,7 +35,7 @@ public partial class Decimal128Type public virtual Task RequestParameterAsync(decimal value, RequestOptions options) => throw null; - public virtual ClientResult RequestParameter(decimal value) => throw null; + public virtual ClientResult RequestParameter(decimal value, CancellationToken cancellationToken = default) => throw null; public virtual Task RequestParameterAsync(decimal value, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/Decimal128Verify.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/Decimal128Verify.cs index e21c71ed9b..a59b85d215 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/Decimal128Verify.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/Decimal128Verify.cs @@ -20,7 +20,7 @@ public partial class Decimal128Verify public virtual Task PrepareVerifyAsync(RequestOptions options) => throw null; - public virtual ClientResult> PrepareVerify() => throw null; + public virtual ClientResult> PrepareVerify(CancellationToken cancellationToken = default) => throw null; public virtual Task>> PrepareVerifyAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Decimal128Verify public virtual Task VerifyAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Verify(decimal body) => throw null; + public virtual ClientResult Verify(decimal body, CancellationToken cancellationToken = default) => throw null; public virtual Task VerifyAsync(decimal body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/DecimalType.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/DecimalType.cs index 87623b6d6d..281338de6c 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/DecimalType.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/DecimalType.cs @@ -19,7 +19,7 @@ public partial class DecimalType public virtual Task ResponseBodyAsync(RequestOptions options) => throw null; - public virtual ClientResult ResponseBody() => throw null; + public virtual ClientResult ResponseBody(CancellationToken cancellationToken = default) => throw null; public virtual Task> ResponseBodyAsync(CancellationToken cancellationToken = default) => throw null; @@ -27,7 +27,7 @@ public partial class DecimalType public virtual Task RequestBodyAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult RequestBody(decimal body) => throw null; + public virtual ClientResult RequestBody(decimal body, CancellationToken cancellationToken = default) => throw null; public virtual Task RequestBodyAsync(decimal body, CancellationToken cancellationToken = default) => throw null; @@ -35,7 +35,7 @@ public partial class DecimalType public virtual Task RequestParameterAsync(decimal value, RequestOptions options) => throw null; - public virtual ClientResult RequestParameter(decimal value) => throw null; + public virtual ClientResult RequestParameter(decimal value, CancellationToken cancellationToken = default) => throw null; public virtual Task RequestParameterAsync(decimal value, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/DecimalVerify.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/DecimalVerify.cs index 1798fcb7e7..4014e93159 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/DecimalVerify.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/DecimalVerify.cs @@ -20,7 +20,7 @@ public partial class DecimalVerify public virtual Task PrepareVerifyAsync(RequestOptions options) => throw null; - public virtual ClientResult> PrepareVerify() => throw null; + public virtual ClientResult> PrepareVerify(CancellationToken cancellationToken = default) => throw null; public virtual Task>> PrepareVerifyAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class DecimalVerify public virtual Task VerifyAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Verify(decimal body) => throw null; + public virtual ClientResult Verify(decimal body, CancellationToken cancellationToken = default) => throw null; public virtual Task VerifyAsync(decimal body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/String.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/String.cs index cedadc21b1..b1b7388d36 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/String.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/String.cs @@ -19,7 +19,7 @@ public partial class String public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -27,7 +27,7 @@ public partial class String public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(string body) => throw null; + public virtual ClientResult Put(string body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(string body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/Unknown.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/Unknown.cs index ccd1f905db..39e08fd702 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/Unknown.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/scalar/src/Generated/Unknown.cs @@ -20,7 +20,7 @@ public partial class Unknown public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class Unknown public virtual Task PutAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Put(BinaryData body) => throw null; + public virtual ClientResult Put(BinaryData body, CancellationToken cancellationToken = default) => throw null; public virtual Task PutAsync(BinaryData body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/EnumsOnly.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/EnumsOnly.cs index d24da83e08..00b1e30fd3 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/EnumsOnly.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/EnumsOnly.cs @@ -20,7 +20,7 @@ public partial class EnumsOnly public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class EnumsOnly public virtual Task SendAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Send(EnumsOnlyCases prop) => throw null; + public virtual ClientResult Send(EnumsOnlyCases prop, CancellationToken cancellationToken = default) => throw null; public virtual Task SendAsync(EnumsOnlyCases prop, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/FloatsOnly.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/FloatsOnly.cs index 79bd3bf635..86d06f8752 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/FloatsOnly.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/FloatsOnly.cs @@ -20,7 +20,7 @@ public partial class FloatsOnly public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class FloatsOnly public virtual Task SendAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Send(GetResponseProp1 prop) => throw null; + public virtual ClientResult Send(GetResponseProp1 prop, CancellationToken cancellationToken = default) => throw null; public virtual Task SendAsync(GetResponseProp1 prop, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/IntsOnly.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/IntsOnly.cs index 4024631fc8..3af98894e9 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/IntsOnly.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/IntsOnly.cs @@ -20,7 +20,7 @@ public partial class IntsOnly public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class IntsOnly public virtual Task SendAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Send(GetResponseProp2 prop) => throw null; + public virtual ClientResult Send(GetResponseProp2 prop, CancellationToken cancellationToken = default) => throw null; public virtual Task SendAsync(GetResponseProp2 prop, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/MixedLiterals.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/MixedLiterals.cs index 1ba4c2d1de..57c0a3189b 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/MixedLiterals.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/MixedLiterals.cs @@ -20,7 +20,7 @@ public partial class MixedLiterals public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class MixedLiterals public virtual Task SendAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Send(MixedLiteralsCases prop) => throw null; + public virtual ClientResult Send(MixedLiteralsCases prop, CancellationToken cancellationToken = default) => throw null; public virtual Task SendAsync(MixedLiteralsCases prop, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/MixedTypes.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/MixedTypes.cs index ddb3dfcdbd..5769b9d132 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/MixedTypes.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/MixedTypes.cs @@ -20,7 +20,7 @@ public partial class MixedTypes public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class MixedTypes public virtual Task SendAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Send(MixedTypesCases prop) => throw null; + public virtual ClientResult Send(MixedTypesCases prop, CancellationToken cancellationToken = default) => throw null; public virtual Task SendAsync(MixedTypesCases prop, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/ModelsOnly.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/ModelsOnly.cs index 6e8bd9ba2f..8eb665a415 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/ModelsOnly.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/ModelsOnly.cs @@ -21,7 +21,7 @@ public partial class ModelsOnly public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -29,7 +29,7 @@ public partial class ModelsOnly public virtual Task SendAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Send(BinaryData prop) => throw null; + public virtual ClientResult Send(BinaryData prop, CancellationToken cancellationToken = default) => throw null; public virtual Task SendAsync(BinaryData prop, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/StringAndArray.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/StringAndArray.cs index f0a404777c..e0152cd181 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/StringAndArray.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/StringAndArray.cs @@ -20,7 +20,7 @@ public partial class StringAndArray public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class StringAndArray public virtual Task SendAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Send(StringAndArrayCases prop) => throw null; + public virtual ClientResult Send(StringAndArrayCases prop, CancellationToken cancellationToken = default) => throw null; public virtual Task SendAsync(StringAndArrayCases prop, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/StringExtensible.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/StringExtensible.cs index 9f0c1cff15..414c87dc27 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/StringExtensible.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/StringExtensible.cs @@ -20,7 +20,7 @@ public partial class StringExtensible public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class StringExtensible public virtual Task SendAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Send(GetResponseProp3 prop) => throw null; + public virtual ClientResult Send(GetResponseProp3 prop, CancellationToken cancellationToken = default) => throw null; public virtual Task SendAsync(GetResponseProp3 prop, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/StringExtensibleNamed.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/StringExtensibleNamed.cs index 096497b473..657248d680 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/StringExtensibleNamed.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/StringExtensibleNamed.cs @@ -20,7 +20,7 @@ public partial class StringExtensibleNamed public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class StringExtensibleNamed public virtual Task SendAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Send(StringExtensibleNamedUnion prop) => throw null; + public virtual ClientResult Send(StringExtensibleNamedUnion prop, CancellationToken cancellationToken = default) => throw null; public virtual Task SendAsync(StringExtensibleNamedUnion prop, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/StringsOnly.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/StringsOnly.cs index 8dc2feeb5c..5b3707a82a 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/StringsOnly.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/type/union/src/Generated/StringsOnly.cs @@ -20,7 +20,7 @@ public partial class StringsOnly public virtual Task GetAsync(RequestOptions options) => throw null; - public virtual ClientResult Get() => throw null; + public virtual ClientResult Get(CancellationToken cancellationToken = default) => throw null; public virtual Task> GetAsync(CancellationToken cancellationToken = default) => throw null; @@ -28,7 +28,7 @@ public partial class StringsOnly public virtual Task SendAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Send(GetResponseProp4 prop) => throw null; + public virtual ClientResult Send(GetResponseProp4 prop, CancellationToken cancellationToken = default) => throw null; public virtual Task SendAsync(GetResponseProp4 prop, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/added/v1/src/Generated/AddedClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/added/v1/src/Generated/AddedClient.cs index 4f3e4e8833..c0e65f7fb4 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/added/v1/src/Generated/AddedClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/added/v1/src/Generated/AddedClient.cs @@ -25,7 +25,7 @@ public partial class AddedClient public virtual Task V1Async(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult V1(ModelV1 body) => throw null; + public virtual ClientResult V1(ModelV1 body, CancellationToken cancellationToken = default) => throw null; public virtual Task> V1Async(ModelV1 body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/added/v2/src/Generated/AddedClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/added/v2/src/Generated/AddedClient.cs index c14b77224f..acbc40ab5d 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/added/v2/src/Generated/AddedClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/added/v2/src/Generated/AddedClient.cs @@ -25,7 +25,7 @@ public partial class AddedClient public virtual Task V1Async(string headerV2, BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult V1(string headerV2, ModelV1 body) => throw null; + public virtual ClientResult V1(string headerV2, ModelV1 body, CancellationToken cancellationToken = default) => throw null; public virtual Task> V1Async(string headerV2, ModelV1 body, CancellationToken cancellationToken = default) => throw null; @@ -33,7 +33,7 @@ public partial class AddedClient public virtual Task V2Async(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult V2(ModelV2 body) => throw null; + public virtual ClientResult V2(ModelV2 body, CancellationToken cancellationToken = default) => throw null; public virtual Task> V2Async(ModelV2 body, CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/added/v2/src/Generated/InterfaceV2.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/added/v2/src/Generated/InterfaceV2.cs index a3e3e2561f..fb097982e0 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/added/v2/src/Generated/InterfaceV2.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/added/v2/src/Generated/InterfaceV2.cs @@ -20,7 +20,7 @@ public partial class InterfaceV2 public virtual Task V2InInterfaceAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult V2InInterface(ModelV2 body) => throw null; + public virtual ClientResult V2InInterface(ModelV2 body, CancellationToken cancellationToken = default) => throw null; public virtual Task> V2InInterfaceAsync(ModelV2 body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/madeOptional/v1/src/Generated/MadeOptionalClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/madeOptional/v1/src/Generated/MadeOptionalClient.cs index 01ca1bac05..c8a62475a7 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/madeOptional/v1/src/Generated/MadeOptionalClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/madeOptional/v1/src/Generated/MadeOptionalClient.cs @@ -25,7 +25,7 @@ public partial class MadeOptionalClient public virtual Task TestAsync(string @param, BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Test(string @param, TestModel body) => throw null; + public virtual ClientResult Test(string @param, TestModel body, CancellationToken cancellationToken = default) => throw null; public virtual Task> TestAsync(string @param, TestModel body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/madeOptional/v2/src/Generated/MadeOptionalClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/madeOptional/v2/src/Generated/MadeOptionalClient.cs index 0e1845360c..24ee4a3365 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/madeOptional/v2/src/Generated/MadeOptionalClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/madeOptional/v2/src/Generated/MadeOptionalClient.cs @@ -25,7 +25,7 @@ public partial class MadeOptionalClient public virtual Task TestAsync(BinaryContent content, string @param = null, RequestOptions options = null) => throw null; - public virtual ClientResult Test(TestModel body, string @param = null) => throw null; + public virtual ClientResult Test(TestModel body, string @param = null, CancellationToken cancellationToken = default) => throw null; public virtual Task> TestAsync(TestModel body, string @param = null, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v1/src/Generated/InterfaceV1.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v1/src/Generated/InterfaceV1.cs index 1b690de1d7..6872adbaa1 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v1/src/Generated/InterfaceV1.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v1/src/Generated/InterfaceV1.cs @@ -20,7 +20,7 @@ public partial class InterfaceV1 public virtual Task V1InInterfaceAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult V1InInterface(ModelV1 body) => throw null; + public virtual ClientResult V1InInterface(ModelV1 body, CancellationToken cancellationToken = default) => throw null; public virtual Task> V1InInterfaceAsync(ModelV1 body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v1/src/Generated/RemovedClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v1/src/Generated/RemovedClient.cs index 916f45fd30..22e266f457 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v1/src/Generated/RemovedClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v1/src/Generated/RemovedClient.cs @@ -25,7 +25,7 @@ public partial class RemovedClient public virtual Task V1Async(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult V1(ModelV1 body) => throw null; + public virtual ClientResult V1(ModelV1 body, CancellationToken cancellationToken = default) => throw null; public virtual Task> V1Async(ModelV1 body, CancellationToken cancellationToken = default) => throw null; @@ -33,7 +33,7 @@ public partial class RemovedClient public virtual Task V2Async(string @param, BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult V2(string @param, ModelV2 body) => throw null; + public virtual ClientResult V2(string @param, ModelV2 body, CancellationToken cancellationToken = default) => throw null; public virtual Task> V2Async(string @param, ModelV2 body, CancellationToken cancellationToken = default) => throw null; @@ -41,7 +41,7 @@ public partial class RemovedClient public virtual Task ModelV3Async(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult ModelV3(ModelV3 body) => throw null; + public virtual ClientResult ModelV3(ModelV3 body, CancellationToken cancellationToken = default) => throw null; public virtual Task> ModelV3Async(ModelV3 body, CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v2/src/Generated/RemovedClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v2/src/Generated/RemovedClient.cs index f959fcc9d9..d5c685403e 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v2/src/Generated/RemovedClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v2/src/Generated/RemovedClient.cs @@ -25,7 +25,7 @@ public partial class RemovedClient public virtual Task V2Async(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult V2(ModelV2 body) => throw null; + public virtual ClientResult V2(ModelV2 body, CancellationToken cancellationToken = default) => throw null; public virtual Task> V2Async(ModelV2 body, CancellationToken cancellationToken = default) => throw null; @@ -33,7 +33,7 @@ public partial class RemovedClient public virtual Task ModelV3Async(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult ModelV3(ModelV3 body) => throw null; + public virtual ClientResult ModelV3(ModelV3 body, CancellationToken cancellationToken = default) => throw null; public virtual Task> ModelV3Async(ModelV3 body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v2Preview/src/Generated/InterfaceV1.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v2Preview/src/Generated/InterfaceV1.cs index 37ff67ae66..e9c63b510a 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v2Preview/src/Generated/InterfaceV1.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v2Preview/src/Generated/InterfaceV1.cs @@ -20,7 +20,7 @@ public partial class InterfaceV1 public virtual Task V1InInterfaceAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult V1InInterface(ModelV1 body) => throw null; + public virtual ClientResult V1InInterface(ModelV1 body, CancellationToken cancellationToken = default) => throw null; public virtual Task> V1InInterfaceAsync(ModelV1 body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v2Preview/src/Generated/RemovedClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v2Preview/src/Generated/RemovedClient.cs index aec443226b..75322a5719 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v2Preview/src/Generated/RemovedClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/removed/v2Preview/src/Generated/RemovedClient.cs @@ -25,7 +25,7 @@ public partial class RemovedClient public virtual Task V1Async(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult V1(ModelV1 body) => throw null; + public virtual ClientResult V1(ModelV1 body, CancellationToken cancellationToken = default) => throw null; public virtual Task> V1Async(ModelV1 body, CancellationToken cancellationToken = default) => throw null; @@ -33,7 +33,7 @@ public partial class RemovedClient public virtual Task V2Async(string @param, BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult V2(string @param, ModelV2 body) => throw null; + public virtual ClientResult V2(string @param, ModelV2 body, CancellationToken cancellationToken = default) => throw null; public virtual Task> V2Async(string @param, ModelV2 body, CancellationToken cancellationToken = default) => throw null; @@ -41,7 +41,7 @@ public partial class RemovedClient public virtual Task ModelV3Async(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult ModelV3(ModelV3 body) => throw null; + public virtual ClientResult ModelV3(ModelV3 body, CancellationToken cancellationToken = default) => throw null; public virtual Task> ModelV3Async(ModelV3 body, CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/renamedFrom/v1/src/Generated/OldInterface.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/renamedFrom/v1/src/Generated/OldInterface.cs index 25c04f8125..75760719b9 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/renamedFrom/v1/src/Generated/OldInterface.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/renamedFrom/v1/src/Generated/OldInterface.cs @@ -20,7 +20,7 @@ public partial class OldInterface public virtual Task NewOpInNewInterfaceAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult NewOpInNewInterface(OldModel body) => throw null; + public virtual ClientResult NewOpInNewInterface(OldModel body, CancellationToken cancellationToken = default) => throw null; public virtual Task> NewOpInNewInterfaceAsync(OldModel body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/renamedFrom/v1/src/Generated/RenamedFromClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/renamedFrom/v1/src/Generated/RenamedFromClient.cs index a6024326c4..282c86d481 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/renamedFrom/v1/src/Generated/RenamedFromClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/renamedFrom/v1/src/Generated/RenamedFromClient.cs @@ -25,7 +25,7 @@ public partial class RenamedFromClient public virtual Task OldOpAsync(string oldQuery, BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult OldOp(string oldQuery, OldModel body) => throw null; + public virtual ClientResult OldOp(string oldQuery, OldModel body, CancellationToken cancellationToken = default) => throw null; public virtual Task> OldOpAsync(string oldQuery, OldModel body, CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/renamedFrom/v2/src/Generated/NewInterface.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/renamedFrom/v2/src/Generated/NewInterface.cs index ff671a89f8..6c1edad7bf 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/renamedFrom/v2/src/Generated/NewInterface.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/renamedFrom/v2/src/Generated/NewInterface.cs @@ -20,7 +20,7 @@ public partial class NewInterface public virtual Task NewOpInNewInterfaceAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult NewOpInNewInterface(NewModel body) => throw null; + public virtual ClientResult NewOpInNewInterface(NewModel body, CancellationToken cancellationToken = default) => throw null; public virtual Task> NewOpInNewInterfaceAsync(NewModel body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/renamedFrom/v2/src/Generated/RenamedFromClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/renamedFrom/v2/src/Generated/RenamedFromClient.cs index 795ef372f6..5aafccf90c 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/renamedFrom/v2/src/Generated/RenamedFromClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/renamedFrom/v2/src/Generated/RenamedFromClient.cs @@ -25,7 +25,7 @@ public partial class RenamedFromClient public virtual Task NewOpAsync(string newQuery, BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult NewOp(string newQuery, NewModel body) => throw null; + public virtual ClientResult NewOp(string newQuery, NewModel body, CancellationToken cancellationToken = default) => throw null; public virtual Task> NewOpAsync(string newQuery, NewModel body, CancellationToken cancellationToken = default) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/returnTypeChangedFrom/v1/src/Generated/ReturnTypeChangedFromClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/returnTypeChangedFrom/v1/src/Generated/ReturnTypeChangedFromClient.cs index 9b9291ec28..f07d9147cc 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/returnTypeChangedFrom/v1/src/Generated/ReturnTypeChangedFromClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/returnTypeChangedFrom/v1/src/Generated/ReturnTypeChangedFromClient.cs @@ -24,7 +24,7 @@ public partial class ReturnTypeChangedFromClient public virtual Task TestAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Test(string body) => throw null; + public virtual ClientResult Test(string body, CancellationToken cancellationToken = default) => throw null; public virtual Task> TestAsync(string body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/returnTypeChangedFrom/v2/src/Generated/ReturnTypeChangedFromClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/returnTypeChangedFrom/v2/src/Generated/ReturnTypeChangedFromClient.cs index 6210793c43..26bed9a285 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/returnTypeChangedFrom/v2/src/Generated/ReturnTypeChangedFromClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/returnTypeChangedFrom/v2/src/Generated/ReturnTypeChangedFromClient.cs @@ -24,7 +24,7 @@ public partial class ReturnTypeChangedFromClient public virtual Task TestAsync(BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Test(string body) => throw null; + public virtual ClientResult Test(string body, CancellationToken cancellationToken = default) => throw null; public virtual Task> TestAsync(string body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/typeChangedFrom/v1/src/Generated/TypeChangedFromClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/typeChangedFrom/v1/src/Generated/TypeChangedFromClient.cs index 9fe1dab017..862cabbd80 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/typeChangedFrom/v1/src/Generated/TypeChangedFromClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/typeChangedFrom/v1/src/Generated/TypeChangedFromClient.cs @@ -25,7 +25,7 @@ public partial class TypeChangedFromClient public virtual Task TestAsync(BinaryContent content, int @param, RequestOptions options = null) => throw null; - public virtual ClientResult Test(TestModel body, int @param) => throw null; + public virtual ClientResult Test(TestModel body, int @param, CancellationToken cancellationToken = default) => throw null; public virtual Task> TestAsync(TestModel body, int @param, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/typeChangedFrom/v2/src/Generated/TypeChangedFromClient.cs b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/typeChangedFrom/v2/src/Generated/TypeChangedFromClient.cs index 90ad3cde4e..5565c68658 100644 --- a/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/typeChangedFrom/v2/src/Generated/TypeChangedFromClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/CadlRanch/http/versioning/typeChangedFrom/v2/src/Generated/TypeChangedFromClient.cs @@ -25,7 +25,7 @@ public partial class TypeChangedFromClient public virtual Task TestAsync(string @param, BinaryContent content, RequestOptions options = null) => throw null; - public virtual ClientResult Test(string @param, TestModel body) => throw null; + public virtual ClientResult Test(string @param, TestModel body, CancellationToken cancellationToken = default) => throw null; public virtual Task> TestAsync(string @param, TestModel body, CancellationToken cancellationToken = default) => throw null; } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Unbranded-TypeSpec/src/Generated/UnbrandedTypeSpecClient.cs b/packages/http-client-csharp/generator/TestProjects/Local/Unbranded-TypeSpec/src/Generated/UnbrandedTypeSpecClient.cs index 441af564ed..278862d6b0 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Unbranded-TypeSpec/src/Generated/UnbrandedTypeSpecClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Unbranded-TypeSpec/src/Generated/UnbrandedTypeSpecClient.cs @@ -108,14 +108,15 @@ public virtual async Task SayHiAsync(string headParameter, string /// /// /// + /// The cancellation token that can be used to cancel the operation. /// or is null. /// Service returned a non-success status code. - public virtual ClientResult SayHi(string headParameter, string queryParameter, string optionalQuery = null) + public virtual ClientResult SayHi(string headParameter, string queryParameter, string optionalQuery = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(headParameter, nameof(headParameter)); Argument.AssertNotNull(queryParameter, nameof(queryParameter)); - ClientResult result = SayHi(headParameter, queryParameter, optionalQuery, options: null); + ClientResult result = SayHi(headParameter, queryParameter, optionalQuery, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); return ClientResult.FromValue((Thing)result, result.GetRawResponse()); } @@ -189,15 +190,16 @@ public virtual async Task HelloAgainAsync(string p2, string p1, Bi /// /// /// + /// The cancellation token that can be used to cancel the operation. /// , or is null. /// Service returned a non-success status code. - public virtual ClientResult HelloAgain(string p2, string p1, RoundTripModel action) + public virtual ClientResult HelloAgain(string p2, string p1, RoundTripModel action, CancellationToken cancellationToken = default) { Argument.AssertNotNull(p2, nameof(p2)); Argument.AssertNotNull(p1, nameof(p1)); Argument.AssertNotNull(action, nameof(action)); - ClientResult result = HelloAgain(p2, p1, action, options: null); + ClientResult result = HelloAgain(p2, p1, action, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); return ClientResult.FromValue((RoundTripModel)result, result.GetRawResponse()); } @@ -303,10 +305,11 @@ public virtual async Task HelloDemo2Async(RequestOptions options) } /// Return hi in demo2. + /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - public virtual ClientResult HelloDemo2() + public virtual ClientResult HelloDemo2(CancellationToken cancellationToken = default) { - ClientResult result = HelloDemo2(options: null); + ClientResult result = HelloDemo2(cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); return ClientResult.FromValue((Thing)result, result.GetRawResponse()); } @@ -363,13 +366,14 @@ public virtual async Task CreateLiteralAsync(BinaryContent content /// Create with literal value. /// + /// The cancellation token that can be used to cancel the operation. /// is null. /// Service returned a non-success status code. - public virtual ClientResult CreateLiteral(Thing body) + public virtual ClientResult CreateLiteral(Thing body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); - ClientResult result = CreateLiteral(body, options: null); + ClientResult result = CreateLiteral(body, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); return ClientResult.FromValue((Thing)result, result.GetRawResponse()); } @@ -421,10 +425,11 @@ public virtual async Task HelloLiteralAsync(RequestOptions options } /// Send literal parameters. + /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - public virtual ClientResult HelloLiteral() + public virtual ClientResult HelloLiteral(CancellationToken cancellationToken = default) { - ClientResult result = HelloLiteral(options: null); + ClientResult result = HelloLiteral(cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); return ClientResult.FromValue((Thing)result, result.GetRawResponse()); } @@ -475,10 +480,11 @@ public virtual async Task TopActionAsync(DateTimeOffset action, Re /// top level method. /// + /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - public virtual ClientResult TopAction(DateTimeOffset action) + public virtual ClientResult TopAction(DateTimeOffset action, CancellationToken cancellationToken = default) { - ClientResult result = TopAction(action, options: null); + ClientResult result = TopAction(action, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); return ClientResult.FromValue((Thing)result, result.GetRawResponse()); } @@ -624,9 +630,10 @@ public virtual async Task AnonymousBodyAsync(BinaryContent content /// optional literal float. /// optional literal bool. /// optional nullable collection. + /// The cancellation token that can be used to cancel the operation. /// , or is null. /// Service returned a non-success status code. - public virtual ClientResult AnonymousBody(string name, BinaryData requiredUnion, ThingRequiredLiteralString requiredLiteralString, ThingRequiredLiteralInt requiredLiteralInt, ThingRequiredLiteralFloat requiredLiteralFloat, bool requiredLiteralBool, string requiredBadDescription, IEnumerable requiredNullableList, ThingOptionalLiteralString? optionalLiteralString = default, ThingOptionalLiteralInt? optionalLiteralInt = default, ThingOptionalLiteralFloat? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default) + public virtual ClientResult AnonymousBody(string name, BinaryData requiredUnion, ThingRequiredLiteralString requiredLiteralString, ThingRequiredLiteralInt requiredLiteralInt, ThingRequiredLiteralFloat requiredLiteralFloat, bool requiredLiteralBool, string requiredBadDescription, IEnumerable requiredNullableList, ThingOptionalLiteralString? optionalLiteralString = default, ThingOptionalLiteralInt? optionalLiteralInt = default, ThingOptionalLiteralFloat? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default, CancellationToken cancellationToken = default) { Argument.AssertNotNull(name, nameof(name)); Argument.AssertNotNull(requiredUnion, nameof(requiredUnion)); @@ -647,7 +654,7 @@ public virtual ClientResult AnonymousBody(string name, BinaryData require optionalNullableList?.ToList() as IList ?? new ChangeTrackingList(), requiredNullableList?.ToList() as IList ?? new ChangeTrackingList(), null); - ClientResult result = AnonymousBody(spreadModel, options: null); + ClientResult result = AnonymousBody(spreadModel, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); return ClientResult.FromValue((Thing)result, result.GetRawResponse()); } @@ -737,14 +744,15 @@ public virtual async Task FriendlyModelAsync(BinaryContent content /// Model can have its friendly name. /// name of the NotFriend. + /// The cancellation token that can be used to cancel the operation. /// is null. /// Service returned a non-success status code. - public virtual ClientResult FriendlyModel(string name) + public virtual ClientResult FriendlyModel(string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(name, nameof(name)); Friend spreadModel = new Friend(name, null); - ClientResult result = FriendlyModel(spreadModel, options: null); + ClientResult result = FriendlyModel(spreadModel, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); return ClientResult.FromValue((Friend)result, result.GetRawResponse()); } @@ -797,10 +805,11 @@ public virtual async Task AddTimeHeaderAsync(RequestOptions option } /// addTimeHeader. + /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - public virtual ClientResult AddTimeHeader() + public virtual ClientResult AddTimeHeader(CancellationToken cancellationToken = default) { - return AddTimeHeader(options: null); + return AddTimeHeader(cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); } /// addTimeHeader. @@ -855,14 +864,15 @@ public virtual async Task ProjectedNameModelAsync(BinaryContent co /// Model can have its projected name. /// name of the ModelWithProjectedName. + /// The cancellation token that can be used to cancel the operation. /// is null. /// Service returned a non-success status code. - public virtual ClientResult ProjectedNameModel(string name) + public virtual ClientResult ProjectedNameModel(string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(name, nameof(name)); ProjectedModel spreadModel = new ProjectedModel(name, null); - ClientResult result = ProjectedNameModel(spreadModel, options: null); + ClientResult result = ProjectedNameModel(spreadModel, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); return ClientResult.FromValue((ProjectedModel)result, result.GetRawResponse()); } @@ -915,10 +925,11 @@ public virtual async Task ReturnsAnonymousModelAsync(RequestOption } /// return anonymous model. + /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - public virtual ClientResult ReturnsAnonymousModel() + public virtual ClientResult ReturnsAnonymousModel(CancellationToken cancellationToken = default) { - ClientResult result = ReturnsAnonymousModel(options: null); + ClientResult result = ReturnsAnonymousModel(cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); return ClientResult.FromValue((ReturnsAnonymousModelResponse)result, result.GetRawResponse()); } @@ -975,13 +986,14 @@ public virtual async Task GetUnknownValueAsync(string accept, Requ /// get extensible enum. /// + /// The cancellation token that can be used to cancel the operation. /// is null. /// Service returned a non-success status code. - public virtual ClientResult GetUnknownValue(string accept) + public virtual ClientResult GetUnknownValue(string accept, CancellationToken cancellationToken = default) { Argument.AssertNotNull(accept, nameof(accept)); - ClientResult result = GetUnknownValue(accept, options: null); + ClientResult result = GetUnknownValue(accept, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); return ClientResult.FromValue(result.GetRawResponse().Content.ToObjectFromJson(), result.GetRawResponse()); } @@ -1042,13 +1054,14 @@ public virtual async Task InternalProtocolAsync(BinaryContent cont /// When set protocol false and convenient true, then the protocol method should be internal. /// + /// The cancellation token that can be used to cancel the operation. /// is null. /// Service returned a non-success status code. - public virtual ClientResult InternalProtocol(Thing body) + public virtual ClientResult InternalProtocol(Thing body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); - ClientResult result = InternalProtocol(body, options: null); + ClientResult result = InternalProtocol(body, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); return ClientResult.FromValue((Thing)result, result.GetRawResponse()); } @@ -1100,10 +1113,11 @@ public virtual async Task StillConvenientAsync(RequestOptions opti } /// When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one. + /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - public virtual ClientResult StillConvenient() + public virtual ClientResult StillConvenient(CancellationToken cancellationToken = default) { - return StillConvenient(options: null); + return StillConvenient(cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); } /// When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one. @@ -1158,13 +1172,14 @@ public virtual async Task HeadAsBooleanAsync(string id, RequestOpt /// head as boolean. /// + /// The cancellation token that can be used to cancel the operation. /// is null. /// Service returned a non-success status code. - public virtual ClientResult HeadAsBoolean(string id) + public virtual ClientResult HeadAsBoolean(string id, CancellationToken cancellationToken = default) { Argument.AssertNotNull(id, nameof(id)); - return HeadAsBoolean(id, options: null); + return HeadAsBoolean(id, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); } /// head as boolean. @@ -1223,13 +1238,14 @@ public virtual async Task WithApiVersionAsync(string p1, RequestOp /// Return hi again. /// + /// The cancellation token that can be used to cancel the operation. /// is null. /// Service returned a non-success status code. - public virtual ClientResult WithApiVersion(string p1) + public virtual ClientResult WithApiVersion(string p1, CancellationToken cancellationToken = default) { Argument.AssertNotNull(p1, nameof(p1)); - return WithApiVersion(p1, options: null); + return WithApiVersion(p1, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); } /// Return hi again.