diff --git a/src/dotnet-svcutil/lib/src/CodeDomFixup/CodeDomVisitors/AddAsyncOpenClose.cs b/src/dotnet-svcutil/lib/src/CodeDomFixup/CodeDomVisitors/AddAsyncOpenClose.cs index 8af6c0cbd750..cca6c8608ec7 100644 --- a/src/dotnet-svcutil/lib/src/CodeDomFixup/CodeDomVisitors/AddAsyncOpenClose.cs +++ b/src/dotnet-svcutil/lib/src/CodeDomFixup/CodeDomVisitors/AddAsyncOpenClose.cs @@ -12,40 +12,6 @@ namespace Microsoft.Tools.ServiceModel.Svcutil { internal class AddAsyncOpenClose : ClientClassVisitor { - //default behavior: won't generate CloseAsync() - private bool _generateCloseAsync = false; - private bool _addCondition = false; - - public AddAsyncOpenClose(CommandProcessorOptions options) - { - if (options.Project != null) - { - Version lowestNetcoreVer = TargetFrameworkHelper.GetLowestNetCoreVersion(options.Project.TargetFrameworks); - bool containsNet6OrGreater = options.Project.TargetFrameworks.Any(t => TargetFrameworkHelper.IsSupportedFramework(t, out FrameworkInfo netfxInfo) && netfxInfo.IsDnx && netfxInfo.Version.Major >= 6); - bool containsNetFx = options.Project.TargetFrameworks.Any(t => TargetFrameworkHelper.IsSupportedFramework(t, out FrameworkInfo netfxInfo) && !netfxInfo.IsDnx); - - // netfx or lowest.net core < 6.0 - if (lowestNetcoreVer == null || (lowestNetcoreVer != null && lowestNetcoreVer.Major < 6)) - { - _generateCloseAsync = true; - if (containsNet6OrGreater) - { - _addCondition = true; - } - } - //lowest .net core >= 6.0 - else if (containsNetFx) - { - _generateCloseAsync = true; - _addCondition = true; - } - } - else if (options.TargetFramework.Version.Major < 6) - { - _generateCloseAsync = true; - } - } - protected override void VisitClientClass(CodeTypeDeclaration type) { base.VisitClientClass(type); @@ -53,10 +19,7 @@ protected override void VisitClientClass(CodeTypeDeclaration type) using (NameScope nameScope = new CodeTypeNameScope(type)) { type.Members.Add(GenerateTaskBasedAsyncMethod("Open", nameScope)); - if(_generateCloseAsync) - { - type.Members.Add(GenerateTaskBasedAsyncMethod("Close", nameScope)); - } + type.Members.Add(GenerateTaskBasedAsyncMethod("Close", nameScope)); } } @@ -95,7 +58,7 @@ private CodeMemberMethod GenerateTaskBasedAsyncMethod(string methodName, NameSco GenerateBeginMethodInvokeExpression(methodName), delegateOfEndCall))); - if(_addCondition && methodName.Equals("Close")) + if(methodName.Equals("Close")) { CodeIfDirective ifStart = new CodeIfDirective(CodeIfMode.Start, "!NET6_0_OR_GREATER"); CodeIfDirective ifEnd = new CodeIfDirective(CodeIfMode.End, ""); diff --git a/src/dotnet-svcutil/lib/src/CodeDomFixup/VisitorFixup.cs b/src/dotnet-svcutil/lib/src/CodeDomFixup/VisitorFixup.cs index 75aa2fa4776e..f03aad494095 100644 --- a/src/dotnet-svcutil/lib/src/CodeDomFixup/VisitorFixup.cs +++ b/src/dotnet-svcutil/lib/src/CodeDomFixup/VisitorFixup.cs @@ -25,7 +25,7 @@ private static CodeDomVisitor[] GetVisitors(ServiceContractGenerator generator, new SpecialIXmlSerializableRemapper(arrayOfXElementTypeHelper), new EnsureAdditionalAssemblyReference(), new CreateCallbackImpl((generator.Options & ServiceContractGenerationOptions.TaskBasedAsynchronousMethod) == ServiceContractGenerationOptions.TaskBasedAsynchronousMethod, generator), - new AddAsyncOpenClose(options), // this one need to run after CreateCallbakImpl which provide name of VerifyCallbackEvents method + new AddAsyncOpenClose(), // this one need to run after CreateCallbakImpl which provide name of VerifyCallbackEvents method }; if (options.Sync != true) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/Auto/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/Auto/Reference.cs index ee6b333e6c6e..49745e7516d5 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/Auto/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/Auto/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/CollectionArray/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/CollectionArray/Reference.cs index 3831137ded94..9d775bbd145b 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/CollectionArray/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/CollectionArray/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/DataContractSerializer/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/DataContractSerializer/Reference.cs index a88508782be5..65122c038fd0 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/DataContractSerializer/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/DataContractSerializer/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/EnableDataBinding/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/EnableDataBinding/Reference.cs index 4b698f2fdffd..f5823bd1de5b 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/EnableDataBinding/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/EnableDataBinding/Reference.cs @@ -1122,6 +1122,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/ExcludeType/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/ExcludeType/Reference.cs index e1529450fed1..260107c36010 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/ExcludeType/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/ExcludeType/Reference.cs @@ -1036,6 +1036,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/Internal/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/Internal/Reference.cs index e00aea3c6a26..f992e63ffc2e 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/Internal/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/Internal/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/MessageContract/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/MessageContract/Reference.cs index 859de2dce60a..3013512f472e 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/MessageContract/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/MessageContract/Reference.cs @@ -1239,6 +1239,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/NoStdLib/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/NoStdLib/Reference.cs index b7b7f0e3a276..efab387715be 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/NoStdLib/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/NoStdLib/Reference.cs @@ -1063,6 +1063,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/None/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/None/Reference.cs index 1683836071f7..4c7e192abeca 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/None/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/None/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/Sync/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/Sync/Reference.cs index adb2822628f5..4ffa55a0f7cd 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/Sync/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/Sync/Reference.cs @@ -1020,6 +1020,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/XmlSerializer/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/XmlSerializer/Reference.cs index d61af2cf8aa1..9382f317de71 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/XmlSerializer/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/XmlSerializer/Reference.cs @@ -1946,6 +1946,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/wrapped/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/wrapped/Reference.cs index a77f9ff74607..db42779d11ea 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/wrapped/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/CodeGenOptions/wrapped/Reference.cs @@ -2456,6 +2456,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/Collections/array/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/Collections/array/Reference.cs index 17acf36a90b9..f79f76a83ef4 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/Collections/array/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/Collections/array/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/Collections/arrayList/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/Collections/arrayList/Reference.cs index b003a8bc9bc2..d4d3b4883e09 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/Collections/arrayList/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/Collections/arrayList/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/Collections/collection/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/Collections/collection/Reference.cs index 5cb2d199622c..aa4ccb4eacdf 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/Collections/collection/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/Collections/collection/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/Collections/dictionary/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/Collections/dictionary/Reference.cs index 04292e9ee32d..cd8e6b03ac92 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/Collections/dictionary/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/Collections/dictionary/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/Collections/hashTable/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/Collections/hashTable/Reference.cs index a819c23be3d0..338b1473744d 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/Collections/hashTable/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/Collections/hashTable/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/Collections/hybridDictionary/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/Collections/hybridDictionary/Reference.cs index 31595a64f4b1..24662f587f43 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/Collections/hybridDictionary/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/Collections/hybridDictionary/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/Collections/linkedList/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/Collections/linkedList/Reference.cs index d7ae5d1dfccd..a9d8109f9219 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/Collections/linkedList/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/Collections/linkedList/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/Collections/list/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/Collections/list/Reference.cs index ce2632bfe904..6c2262ec9bcb 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/Collections/list/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/Collections/list/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/Collections/listDictionary/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/Collections/listDictionary/Reference.cs index 707bb364dd48..79b9e6982c7f 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/Collections/listDictionary/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/Collections/listDictionary/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/Collections/observableCollection/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/Collections/observableCollection/Reference.cs index c9c3374520f4..50712bda4caa 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/Collections/observableCollection/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/Collections/observableCollection/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/Collections/orderedDictionary/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/Collections/orderedDictionary/Reference.cs index 757dec82e764..03fd538f59a0 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/Collections/orderedDictionary/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/Collections/orderedDictionary/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/Collections/sortedDictionary/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/Collections/sortedDictionary/Reference.cs index 0596aa71d111..d7f16a63a515 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/Collections/sortedDictionary/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/Collections/sortedDictionary/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/Collections/sortedList/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/Collections/sortedList/Reference.cs index 9bd7ff495b3a..89efbe5ebba5 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/Collections/sortedList/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/Collections/sortedList/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/Collections/sortedListNonGeneric/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/Collections/sortedListNonGeneric/Reference.cs index 2172d550ceaf..46958f08e836 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/Collections/sortedListNonGeneric/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/Collections/sortedListNonGeneric/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ContractMemberNamedSystem/ContractMemberNamedSystem/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/ContractMemberNamedSystem/ContractMemberNamedSystem/Reference.cs index aebfaae029d7..1b3e41e7472d 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/ContractMemberNamedSystem/ContractMemberNamedSystem/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/ContractMemberNamedSystem/ContractMemberNamedSystem/Reference.cs @@ -164,6 +164,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_IService1)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/DuplexCallback/Duplex/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/DuplexCallback/Duplex/Reference.cs index ef640c28906b..e33905130f45 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/DuplexCallback/Duplex/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/DuplexCallback/Duplex/Reference.cs @@ -88,6 +88,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.tcp_nosecurity_callback_IWcfDuplexService)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/FederationServiceTest/Saml2IssuedToken_mex/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/FederationServiceTest/Saml2IssuedToken_mex/Reference.cs index e2a0082cc285..4f5e0c785e35 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/FederationServiceTest/Saml2IssuedToken_mex/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/FederationServiceTest/Saml2IssuedToken_mex/Reference.cs @@ -616,8 +616,8 @@ public interface IWcfService System.Threading.Tasks.Task TestFaultIntAsync(int faultCode); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IWcfService/TestFaults", ReplyAction="http://tempuri.org/IWcfService/TestFaultsResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(Saml2IssuedToken_mex_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault", Name="FaultDetail", Namespace="http://www.contoso.com/wcfnamespace")] [System.ServiceModel.FaultContractAttribute(typeof(Saml2IssuedToken_mex_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault2", Name="FaultDetail2", Namespace="http://www.contoso.com/wcfnamespace")] + [System.ServiceModel.FaultContractAttribute(typeof(Saml2IssuedToken_mex_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault", Name="FaultDetail", Namespace="http://www.contoso.com/wcfnamespace")] [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task TestFaultsAsync(Saml2IssuedToken_mex_NS.TestFaultsRequest request); @@ -2647,6 +2647,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.issued_token_using_tls_x002F_wsHttp_x002F_wstrust13_x002F_Text_IWcfService)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/FullFramework/FullFramework/ServiceReference/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/FullFramework/FullFramework/ServiceReference/Reference.cs index 38fe18ee887c..630a2d6741d2 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/FullFramework/FullFramework/ServiceReference/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/FullFramework/FullFramework/ServiceReference/Reference.cs @@ -889,10 +889,12 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER public virtual System.Threading.Tasks.Task CloseAsync() { return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); } + #endif private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MetadataQuery/mexParam/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MetadataQuery/mexParam/Reference.cs index dec56e08c239..59caad8f8b2f 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MetadataQuery/mexParam/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MetadataQuery/mexParam/Reference.cs @@ -126,6 +126,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Service1_IService1)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MetadataQuery/noQuery/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MetadataQuery/noQuery/Reference.cs index d97894ab7ce2..2866216ec2eb 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MetadataQuery/noQuery/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MetadataQuery/noQuery/Reference.cs @@ -126,6 +126,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Service1_IService1)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MetadataQuery/singleWsdlQuery/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MetadataQuery/singleWsdlQuery/Reference.cs index 4da0694683df..d37f44b894c6 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MetadataQuery/singleWsdlQuery/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MetadataQuery/singleWsdlQuery/Reference.cs @@ -126,6 +126,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Service1_IService1)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MetadataQuery/wsdlQuery/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MetadataQuery/wsdlQuery/Reference.cs index 7f897ecd76e6..85f60d95242b 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MetadataQuery/wsdlQuery/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MetadataQuery/wsdlQuery/Reference.cs @@ -126,6 +126,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Service1_IService1)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net48/ServiceReference/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net48/ServiceReference/Reference.cs index 72fa5405bfeb..a22904de2e55 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net48/ServiceReference/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net48/ServiceReference/Reference.cs @@ -148,10 +148,12 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER public virtual System.Threading.Tasks.Task CloseAsync() { return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); } + #endif private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net50/ServiceReference/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net50/ServiceReference/Reference.cs index 72fa5405bfeb..a22904de2e55 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net50/ServiceReference/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net50/ServiceReference/Reference.cs @@ -148,10 +148,12 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER public virtual System.Threading.Tasks.Task CloseAsync() { return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); } + #endif private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net60/ServiceReference/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net60/ServiceReference/Reference.cs index cfe70ab35c87..a22904de2e55 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net60/ServiceReference/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net60/ServiceReference/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/netstd20/ServiceReference/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/netstd20/ServiceReference/Reference.cs index 72fa5405bfeb..a22904de2e55 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/netstd20/ServiceReference/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/netstd20/ServiceReference/Reference.cs @@ -148,10 +148,12 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER public virtual System.Threading.Tasks.Task CloseAsync() { return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); } + #endif private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetTypeReuse/TypeReuseClient/ServiceReference/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetTypeReuse/TypeReuseClient/ServiceReference/Reference.cs index 5d52a31783f0..1a34b2c01c98 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetTypeReuse/TypeReuseClient/ServiceReference/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetTypeReuse/TypeReuseClient/ServiceReference/Reference.cs @@ -126,6 +126,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocAll/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocAll/Reference.cs index 2a26b3c7677a..7de67a16a333 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocAll/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocAll/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocAllRelative/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocAllRelative/Reference.cs index 993def591343..0f6ad3cbb75b 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocAllRelative/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocAllRelative/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocFullAndWildcard/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocFullAndWildcard/Reference.cs index a58b60bf5ba9..a80ceb5ed070 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocFullAndWildcard/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocFullAndWildcard/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocFullPath/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocFullPath/Reference.cs index ff20a3b3ec51..fc65901407e1 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocFullPath/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocFullPath/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocRelativeAndWildcard/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocRelativeAndWildcard/Reference.cs index 8ba638abb37f..75bbaedc5cc8 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocRelativeAndWildcard/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocRelativeAndWildcard/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocRelativePath/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocRelativePath/Reference.cs index 80673cd58c5f..3bf317d32323 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocRelativePath/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocRelativePath/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocWsdlRelXsdWildcard/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocWsdlRelXsdWildcard/Reference.cs index 3f3ae29729d5..79797ae941c2 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocWsdlRelXsdWildcard/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocWsdlRelXsdWildcard/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocWsdlWildcard/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocWsdlWildcard/Reference.cs index 705e6239a898..3967768ae471 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocWsdlWildcard/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocWsdlWildcard/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocWsdlWildcardRelative/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocWsdlWildcardRelative/Reference.cs index 192b27b886fb..ccece46956d3 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocWsdlWildcardRelative/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocWsdlWildcardRelative/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocWsdlXsdWildcardRelative/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocWsdlXsdWildcardRelative/Reference.cs index ab9c5623063b..035d00bf2875 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocWsdlXsdWildcardRelative/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultipleDocuments/multiDocWsdlXsdWildcardRelative/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/urlNamespace/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/urlNamespace/Reference.cs index 1f25082cc543..03737cd0fcee 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/urlNamespace/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/urlNamespace/Reference.cs @@ -899,6 +899,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/wildcardNamespace/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/wildcardNamespace/Reference.cs index a7c83c11bc69..2ff08b931f4d 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/wildcardNamespace/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/wildcardNamespace/Reference.cs @@ -889,6 +889,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.defaultEndpoint)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TFM/net90/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/TFM/net90/Reference.cs index 9e959cee686d..c62df6d30264 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TFM/net90/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/TFM/net90/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TFM/tfm100/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/TFM/tfm100/Reference.cs index 2cdd0f324706..5a29d89cc99d 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TFM/tfm100/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/TFM/tfm100/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TFM/tfm20/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/TFM/tfm20/Reference.cs index 5ca65bddc64c..2b9b6b77992e 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TFM/tfm20/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/TFM/tfm20/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TFM/tfm45/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/TFM/tfm45/Reference.cs index 8feb4bbc066e..e974489534b4 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TFM/tfm45/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/TFM/tfm45/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TFM/tfmDefault/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/TFM/tfmDefault/Reference.cs index 209d84208331..070e68883f6e 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TFM/tfmDefault/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/TFM/tfmDefault/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/UpdateNetPipeServiceRef/UpdateNetPipeServiceRefBootstrapping/UpdateNetPipeServiceRefBootstrapping/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/UpdateNetPipeServiceRef/UpdateNetPipeServiceRefBootstrapping/UpdateNetPipeServiceRefBootstrapping/Reference.cs index fe3645b61643..2513e4af9d15 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/UpdateNetPipeServiceRef/UpdateNetPipeServiceRefBootstrapping/UpdateNetPipeServiceRefBootstrapping/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/UpdateNetPipeServiceRef/UpdateNetPipeServiceRefBootstrapping/UpdateNetPipeServiceRefBootstrapping/Reference.cs @@ -88,6 +88,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.NetNamedPipeBinding_IStreamedService)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/UpdateNetPipeServiceRef/UpdateNetPipeServiceRefDefault/UpdateNetPipeServiceRefDefault/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/UpdateNetPipeServiceRef/UpdateNetPipeServiceRefDefault/UpdateNetPipeServiceRefDefault/Reference.cs index ecd9aa8af34e..2f0fc10421e9 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/UpdateNetPipeServiceRef/UpdateNetPipeServiceRefDefault/UpdateNetPipeServiceRefDefault/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/UpdateNetPipeServiceRef/UpdateNetPipeServiceRefDefault/UpdateNetPipeServiceRefDefault/Reference.cs @@ -88,6 +88,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.NetNamedPipeBinding_IStreamedService)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefBasic/UpdateServiceRefBootstrapping/UpdateServiceRefBootstrapping/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefBasic/UpdateServiceRefBootstrapping/UpdateServiceRefBootstrapping/Reference.cs index e648a497213e..1b494d375496 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefBasic/UpdateServiceRefBootstrapping/UpdateServiceRefBootstrapping/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefBasic/UpdateServiceRefBootstrapping/UpdateServiceRefBootstrapping/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefBasic/UpdateServiceRefDefault/UpdateServiceRefDefault/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefBasic/UpdateServiceRefDefault/UpdateServiceRefDefault/Reference.cs index 3ca75cc5a88b..24c21002028d 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefBasic/UpdateServiceRefDefault/UpdateServiceRefDefault/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefBasic/UpdateServiceRefDefault/UpdateServiceRefDefault/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateRefLevels/UpdateServiceRefOptions/Level1/Level2/UpdateRefLevels/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateRefLevels/UpdateServiceRefOptions/Level1/Level2/UpdateRefLevels/Reference.cs index 61419cf4e069..de8e2b2299d6 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateRefLevels/UpdateServiceRefOptions/Level1/Level2/UpdateRefLevels/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateRefLevels/UpdateServiceRefOptions/Level1/Level2/UpdateRefLevels/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateRefLevelsFull/UpdateServiceRefOptions/Level1/Level2/UpdateRefLevelsFull/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateRefLevelsFull/UpdateServiceRefOptions/Level1/Level2/UpdateRefLevelsFull/Reference.cs index 9e25db0a4d00..272bfcd6a5a1 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateRefLevelsFull/UpdateServiceRefOptions/Level1/Level2/UpdateRefLevelsFull/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateRefLevelsFull/UpdateServiceRefOptions/Level1/Level2/UpdateRefLevelsFull/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsDefault/UpdateServiceRefOptionsDefault/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsDefault/UpdateServiceRefOptionsDefault/Reference.cs index 05a956810628..fd5aa01a5622 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsDefault/UpdateServiceRefOptionsDefault/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsDefault/UpdateServiceRefOptionsDefault/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsExtraOptions/UpdateServiceRefOptionsExtraOptions/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsExtraOptions/UpdateServiceRefOptionsExtraOptions/Reference.cs index ad8d89f29eac..7502988e6b25 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsExtraOptions/UpdateServiceRefOptionsExtraOptions/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsExtraOptions/UpdateServiceRefOptionsExtraOptions/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsExtraOptionsWarn/UpdateServiceRefOptionsExtraOptionsWarn/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsExtraOptionsWarn/UpdateServiceRefOptionsExtraOptionsWarn/Reference.cs index 5c31456ee247..08c5fd9f1176 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsExtraOptionsWarn/UpdateServiceRefOptionsExtraOptionsWarn/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsExtraOptionsWarn/UpdateServiceRefOptionsExtraOptionsWarn/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsFilePath/UpdateServiceRefOptionsFilePath/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsFilePath/UpdateServiceRefOptionsFilePath/Reference.cs index 8d3d7a924c45..7d6e531fe393 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsFilePath/UpdateServiceRefOptionsFilePath/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsFilePath/UpdateServiceRefOptionsFilePath/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsFullPath/UpdateServiceRefOptionsFullPath/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsFullPath/UpdateServiceRefOptionsFullPath/Reference.cs index d97526e10890..41c6d1cfae5e 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsFullPath/UpdateServiceRefOptionsFullPath/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsFullPath/UpdateServiceRefOptionsFullPath/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsRef/UpdateServiceRefOptionsRef/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsRef/UpdateServiceRefOptionsRef/Reference.cs index 40dc292edc5e..f414df4bea7a 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsRef/UpdateServiceRefOptionsRef/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsRef/UpdateServiceRefOptionsRef/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsRef2/UpdateServiceRefOptionsRef2/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsRef2/UpdateServiceRefOptionsRef2/Reference.cs index 2e9fb60083f1..c8ec7c54d803 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsRef2/UpdateServiceRefOptionsRef2/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptionsRef2/UpdateServiceRefOptionsRef2/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptions_Folder_With_Spaces/UpdateServiceRefOptions Folder With Spaces/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptions_Folder_With_Spaces/UpdateServiceRefOptions Folder With Spaces/Reference.cs index c6100f6502b6..f845a1ef5a20 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptions_Folder_With_Spaces/UpdateServiceRefOptions Folder With Spaces/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptions_Folder_With_Spaces/UpdateServiceRefOptions Folder With Spaces/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptions_Folder_With_Spaces_Full/UpdateServiceRefOptions Folder With Spaces Full/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptions_Folder_With_Spaces_Full/UpdateServiceRefOptions Folder With Spaces Full/Reference.cs index abb9540bb8f1..a6713f7e846f 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptions_Folder_With_Spaces_Full/UpdateServiceRefOptions Folder With Spaces Full/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefOptions/UpdateServiceRefOptions_Folder_With_Spaces_Full/UpdateServiceRefOptions Folder With Spaces Full/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefWCFCS/CSServiceReference/Connected Services/CSServiceReference/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefWCFCS/CSServiceReference/Connected Services/CSServiceReference/Reference.cs index 575facc567a7..b8c4a6c7b827 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefWCFCS/CSServiceReference/Connected Services/CSServiceReference/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefWCFCS/CSServiceReference/Connected Services/CSServiceReference/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefWCFCS/CSServiceReferenceRoundtrip/Connected Services/CSServiceReferenceRoundtrip/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefWCFCS/CSServiceReferenceRoundtrip/Connected Services/CSServiceReferenceRoundtrip/Reference.cs index e7dae54b131c..45bb18666f64 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefWCFCS/CSServiceReferenceRoundtrip/Connected Services/CSServiceReferenceRoundtrip/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/UpdateServiceRefWCFCS/CSServiceReferenceRoundtrip/Connected Services/CSServiceReferenceRoundtrip/Reference.cs @@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicHttpsTransSecMessCredsUserName/BasicHttpsTransSecMessCredsUserName/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicHttpsTransSecMessCredsUserName/BasicHttpsTransSecMessCredsUserName/Reference.cs index 6927c4cb3495..b6ffdbec401d 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicHttpsTransSecMessCredsUserName/BasicHttpsTransSecMessCredsUserName/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicHttpsTransSecMessCredsUserName/BasicHttpsTransSecMessCredsUserName/Reference.cs @@ -616,8 +616,8 @@ public interface IWcfService System.Threading.Tasks.Task TestFaultIntAsync(int faultCode); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IWcfService/TestFaults", ReplyAction="http://tempuri.org/IWcfService/TestFaultsResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(BasicHttpsTransSecMessCredsUserName_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault", Name="FaultDetail", Namespace="http://www.contoso.com/wcfnamespace")] [System.ServiceModel.FaultContractAttribute(typeof(BasicHttpsTransSecMessCredsUserName_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault2", Name="FaultDetail2", Namespace="http://www.contoso.com/wcfnamespace")] + [System.ServiceModel.FaultContractAttribute(typeof(BasicHttpsTransSecMessCredsUserName_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault", Name="FaultDetail", Namespace="http://www.contoso.com/wcfnamespace")] [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task TestFaultsAsync(BasicHttpsTransSecMessCredsUserName_NS.TestFaultsRequest request); @@ -2647,6 +2647,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.https_message_credentials_username_x002F_Buffered_IWcfService)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttp/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttp/Reference.cs index 3253f7f1a84e..a73c34f568dd 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttp/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttp/Reference.cs @@ -2647,6 +2647,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Text_IWcfService)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpDocLitDualNs/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpDocLitDualNs/Reference.cs index 62cb898577cf..330aa7f8e704 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpDocLitDualNs/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpDocLitDualNs/Reference.cs @@ -779,6 +779,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Basic_ICalculatorDocLit)) @@ -1072,6 +1079,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Basic_IHelloWorldDocLit)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpDocLitSingleNs/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpDocLitSingleNs/Reference.cs index 6e708eb4d8a2..72d01c1f0c89 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpDocLitSingleNs/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpDocLitSingleNs/Reference.cs @@ -779,6 +779,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Basic_ICalculatorDocLit)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpRpcEncDualNs/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpRpcEncDualNs/Reference.cs index 46fd7573c51e..c0c5196e230c 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpRpcEncDualNs/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpRpcEncDualNs/Reference.cs @@ -259,6 +259,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Basic_ICalculatorRpcEnc)) @@ -379,6 +386,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Basic_IHelloWorldRpcEnc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpRpcEncSingleNs/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpRpcEncSingleNs/Reference.cs index ac7cb91883d5..ede4f2afea15 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpRpcEncSingleNs/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpRpcEncSingleNs/Reference.cs @@ -259,6 +259,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Basic_ICalculatorRpcEnc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpRpcLitDualNs/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpRpcLitDualNs/Reference.cs index e17cfe7c2c0b..3b5ab95edd7d 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpRpcLitDualNs/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpRpcLitDualNs/Reference.cs @@ -256,6 +256,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Basic_ICalculatorRpcLit)) @@ -376,6 +383,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Basic_IHelloWorldRpcLit)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpRpcLitSingleNs/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpRpcLitSingleNs/Reference.cs index 1a9561d0d3fa..9b7f20cdc5a9 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpRpcLitSingleNs/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpRpcLitSingleNs/Reference.cs @@ -256,6 +256,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Basic_ICalculatorRpcLit)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpSoap/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpSoap/Reference.cs index 37c1ff084a0f..25f9d779e955 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpSoap/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttpSoap/Reference.cs @@ -213,6 +213,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Basic_IWcfSoapService)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttp_4_4_0/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttp_4_4_0/Reference.cs index f487135f0e2e..25b520dd5afd 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttp_4_4_0/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttp_4_4_0/Reference.cs @@ -256,6 +256,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Basic_IWcfService_4_4_0)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttps/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttps/Reference.cs index ec6e3259c566..8953a98781c8 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttps/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeBasicSvcs/BasicHttps/Reference.cs @@ -2647,6 +2647,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Text_IWcfService)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNetHttpSvcs/NetHttp/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNetHttpSvcs/NetHttp/Reference.cs index 59303f71608d..682c0494e015 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNetHttpSvcs/NetHttp/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNetHttpSvcs/NetHttp/Reference.cs @@ -616,8 +616,8 @@ public interface IWcfService System.Threading.Tasks.Task TestFaultIntAsync(int faultCode); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IWcfService/TestFaults", ReplyAction="http://tempuri.org/IWcfService/TestFaultsResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(NetHttp_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault", Name="FaultDetail", Namespace="http://www.contoso.com/wcfnamespace")] [System.ServiceModel.FaultContractAttribute(typeof(NetHttp_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault2", Name="FaultDetail2", Namespace="http://www.contoso.com/wcfnamespace")] + [System.ServiceModel.FaultContractAttribute(typeof(NetHttp_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault", Name="FaultDetail", Namespace="http://www.contoso.com/wcfnamespace")] [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task TestFaultsAsync(NetHttp_NS.TestFaultsRequest request); @@ -2647,6 +2647,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Binary_IWcfService)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNetHttpSvcs/NetHttpWebSockets/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNetHttpSvcs/NetHttpWebSockets/Reference.cs index a330f4275654..c0c7b33bfad3 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNetHttpSvcs/NetHttpWebSockets/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNetHttpSvcs/NetHttpWebSockets/Reference.cs @@ -616,8 +616,8 @@ public interface IWcfService System.Threading.Tasks.Task TestFaultIntAsync(int faultCode); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IWcfService/TestFaults", ReplyAction="http://tempuri.org/IWcfService/TestFaultsResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(NetHttpWebSockets_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault", Name="FaultDetail", Namespace="http://www.contoso.com/wcfnamespace")] [System.ServiceModel.FaultContractAttribute(typeof(NetHttpWebSockets_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault2", Name="FaultDetail2", Namespace="http://www.contoso.com/wcfnamespace")] + [System.ServiceModel.FaultContractAttribute(typeof(NetHttpWebSockets_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault", Name="FaultDetail", Namespace="http://www.contoso.com/wcfnamespace")] [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task TestFaultsAsync(NetHttpWebSockets_NS.TestFaultsRequest request); @@ -2654,6 +2654,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.NetHttpWebSockets_IWcfService)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNetHttpSvcs/NetHttps/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNetHttpSvcs/NetHttps/Reference.cs index 86e29cb35978..81a8d75d5513 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNetHttpSvcs/NetHttps/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNetHttpSvcs/NetHttps/Reference.cs @@ -616,8 +616,8 @@ public interface IWcfService System.Threading.Tasks.Task TestFaultIntAsync(int faultCode); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IWcfService/TestFaults", ReplyAction="http://tempuri.org/IWcfService/TestFaultsResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(NetHttps_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault", Name="FaultDetail", Namespace="http://www.contoso.com/wcfnamespace")] [System.ServiceModel.FaultContractAttribute(typeof(NetHttps_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault2", Name="FaultDetail2", Namespace="http://www.contoso.com/wcfnamespace")] + [System.ServiceModel.FaultContractAttribute(typeof(NetHttps_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault", Name="FaultDetail", Namespace="http://www.contoso.com/wcfnamespace")] [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task TestFaultsAsync(NetHttps_NS.TestFaultsRequest request); @@ -2647,6 +2647,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Binary_IWcfService)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNetHttpSvcs/NetHttpsWebSockets/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNetHttpSvcs/NetHttpsWebSockets/Reference.cs index 8aa3493be702..8d12654c3969 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNetHttpSvcs/NetHttpsWebSockets/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNetHttpSvcs/NetHttpsWebSockets/Reference.cs @@ -616,8 +616,8 @@ public interface IWcfService System.Threading.Tasks.Task TestFaultIntAsync(int faultCode); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IWcfService/TestFaults", ReplyAction="http://tempuri.org/IWcfService/TestFaultsResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(NetHttpsWebSockets_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault", Name="FaultDetail", Namespace="http://www.contoso.com/wcfnamespace")] [System.ServiceModel.FaultContractAttribute(typeof(NetHttpsWebSockets_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault2", Name="FaultDetail2", Namespace="http://www.contoso.com/wcfnamespace")] + [System.ServiceModel.FaultContractAttribute(typeof(NetHttpsWebSockets_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault", Name="FaultDetail", Namespace="http://www.contoso.com/wcfnamespace")] [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task TestFaultsAsync(NetHttpsWebSockets_NS.TestFaultsRequest request); @@ -2654,6 +2654,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.NetHttpsWebSockets_IWcfService)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNettcpTransSecMessCredsUserName/TcpTransSecMessCredsUserName/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNettcpTransSecMessCredsUserName/TcpTransSecMessCredsUserName/Reference.cs index d0955d67e3cc..bae74506a00f 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNettcpTransSecMessCredsUserName/TcpTransSecMessCredsUserName/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeNettcpTransSecMessCredsUserName/TcpTransSecMessCredsUserName/Reference.cs @@ -616,8 +616,8 @@ public interface IWcfService System.Threading.Tasks.Task TestFaultIntAsync(int faultCode); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IWcfService/TestFaults", ReplyAction="http://tempuri.org/IWcfService/TestFaultsResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(TcpTransSecMessCredsUserName_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault", Name="FaultDetail", Namespace="http://www.contoso.com/wcfnamespace")] [System.ServiceModel.FaultContractAttribute(typeof(TcpTransSecMessCredsUserName_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault2", Name="FaultDetail2", Namespace="http://www.contoso.com/wcfnamespace")] + [System.ServiceModel.FaultContractAttribute(typeof(TcpTransSecMessCredsUserName_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault", Name="FaultDetail", Namespace="http://www.contoso.com/wcfnamespace")] [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task TestFaultsAsync(TcpTransSecMessCredsUserName_NS.TestFaultsRequest request); @@ -2654,6 +2654,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.Tcp_message_credentials_username_IWcfService)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeReliableSessionSvc/ReliableSessionService/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeReliableSessionSvc/ReliableSessionService/Reference.cs index 6aa2107b5f73..010c337b37bf 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeReliableSessionSvc/ReliableSessionService/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WcfRuntimeReliableSessionSvc/ReliableSessionService/Reference.cs @@ -81,6 +81,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.NetHttpOrdered_WSReliableMessaging11_IWcfReliableService)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/WsHttpBindingAndws2007HttpBindingTransSecMessCredsUserName/HttpsTransSecMessCredsUserName/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/WsHttpBindingAndws2007HttpBindingTransSecMessCredsUserName/HttpsTransSecMessCredsUserName/Reference.cs index f6926cfe49a2..6fc316e09815 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/WsHttpBindingAndws2007HttpBindingTransSecMessCredsUserName/HttpsTransSecMessCredsUserName/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/WsHttpBindingAndws2007HttpBindingTransSecMessCredsUserName/HttpsTransSecMessCredsUserName/Reference.cs @@ -616,8 +616,8 @@ public interface IWcfService System.Threading.Tasks.Task TestFaultIntAsync(int faultCode); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IWcfService/TestFaults", ReplyAction="http://tempuri.org/IWcfService/TestFaultsResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(HttpsTransSecMessCredsUserName_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault", Name="FaultDetail", Namespace="http://www.contoso.com/wcfnamespace")] [System.ServiceModel.FaultContractAttribute(typeof(HttpsTransSecMessCredsUserName_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault2", Name="FaultDetail2", Namespace="http://www.contoso.com/wcfnamespace")] + [System.ServiceModel.FaultContractAttribute(typeof(HttpsTransSecMessCredsUserName_NS.FaultDetail), Action="http://tempuri.org/IWcfService/TestFaultFaultDetailFault", Name="FaultDetail", Namespace="http://www.contoso.com/wcfnamespace")] [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] System.Threading.Tasks.Task TestFaultsAsync(HttpsTransSecMessCredsUserName_NS.TestFaultsRequest request); @@ -2647,6 +2647,13 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } + #if !NET6_0_OR_GREATER + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.https_message_credentials_username_IWcfService))