Skip to content

Commit 6b1b9c5

Browse files
committed
Fix test baseline due to prodcut upgrade and add netstandard20 typereuse test scenario.
1 parent 0f6889e commit 6b1b9c5

File tree

19 files changed

+294
-232
lines changed

19 files changed

+294
-232
lines changed

src/dotnet-svcutil/lib/src/Shared/TargetFrameworkHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Microsoft.Tools.ServiceModel.Svcutil
1313
{
1414
internal class TargetFrameworkHelper
1515
{
16-
internal static readonly List<string> s_currentSupportedVersions = new List<string>() { "8.0", "9.0" };
16+
internal static readonly List<string> s_currentSupportedVersions = new List<string>() { "8.0", "9.0", "10.0" };
1717
public static Version MinSupportedNetFxVersionForDotNet { get; } = new Version("4.5");
1818
public static Version MinSupportedNetStandardVersion { get; } = new Version("1.3");
1919
public static Version MinSupportedNetCoreAppVersion { get; } = new Version("1.0");

src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/urlNamespace/dotnet-svcutil.params.json

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"references": [
1313
"dotnet-svcutil-lib, {dotnet-svcutil-lib, 99.99.99}",
1414
"Microsoft.ApplicationInsights, {Microsoft.ApplicationInsights, 99.99.99}",
15-
"Microsoft.DotNet.InternalAbstractions, {Microsoft.DotNet.InternalAbstractions, 99.99.99}",
1615
"Microsoft.Extensions.DependencyModel, {Microsoft.Extensions.DependencyModel, 99.99.99}",
1716
"Newtonsoft.Json, {Newtonsoft.Json, 99.99.99}",
1817
"NuGet.Common, {NuGet.Common, 99.99.99}",
@@ -24,33 +23,8 @@
2423
"NuGet.ProjectModel, {NuGet.ProjectModel, 99.99.99}",
2524
"NuGet.Protocol, {NuGet.Protocol, 99.99.99}",
2625
"NuGet.Versioning, {NuGet.Versioning, 99.99.99}",
27-
"System.AppContext, {System.AppContext, 99.99.99}",
28-
"System.Collections, {System.Collections, 99.99.99}",
29-
"System.Diagnostics.Debug, {System.Diagnostics.Debug, 99.99.99}",
30-
"System.Diagnostics.DiagnosticSource, {System.Diagnostics.DiagnosticSource, 99.99.99}",
31-
"System.Dynamic.Runtime, {System.Dynamic.Runtime, 99.99.99}",
32-
"System.IO, {System.IO, 99.99.99}",
33-
"System.IO.FileSystem, {System.IO.FileSystem, 99.99.99}",
34-
"System.IO.FileSystem.Primitives, {System.IO.FileSystem.Primitives, 99.99.99}",
35-
"System.Linq, {System.Linq, 99.99.99}",
36-
"System.Linq.Expressions, {System.Linq.Expressions, 99.99.99}",
37-
"System.ObjectModel, {System.ObjectModel, 99.99.99}",
38-
"System.Reflection, {System.Reflection, 99.99.99}",
39-
"System.Reflection.Emit, {System.Reflection.Emit, 99.99.99}",
40-
"System.Reflection.Emit.ILGeneration, {System.Reflection.Emit.ILGeneration, 99.99.99}",
41-
"System.Reflection.Primitives, {System.Reflection.Primitives, 99.99.99}",
42-
"System.Reflection.TypeExtensions, {System.Reflection.TypeExtensions, 99.99.99}",
43-
"System.Runtime, {System.Runtime, 99.99.99}",
44-
"System.Runtime.Extensions, {System.Runtime.Extensions, 99.99.99}",
45-
"System.Runtime.Handles, {System.Runtime.Handles, 99.99.99}",
46-
"System.Runtime.InteropServices, {System.Runtime.InteropServices, 99.99.99}",
47-
"System.Runtime.InteropServices.RuntimeInformation, {System.Runtime.InteropServices.RuntimeInformation, 99.99.99}",
48-
"System.Runtime.Loader, {System.Runtime.Loader, 99.99.99}",
49-
"System.Security.Cryptography.Cng, {System.Security.Cryptography.Cng, 99.99.99}",
5026
"System.Security.Cryptography.Pkcs, {System.Security.Cryptography.Pkcs, 99.99.99}",
51-
"System.Security.Cryptography.ProtectedData, {System.Security.Cryptography.ProtectedData, 99.99.99}",
52-
"System.Text.Encoding, {System.Text.Encoding, 99.99.99}",
53-
"System.Threading.Tasks, {System.Threading.Tasks, 99.99.99}"
27+
"System.Security.Cryptography.ProtectedData, {System.Security.Cryptography.ProtectedData, 99.99.99}"
5428
],
5529
"targetFramework": "N.N",
5630
"typeReuseMode": "All"

src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/wildcardNamespace/dotnet-svcutil.params.json

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"references": [
1313
"dotnet-svcutil-lib, {dotnet-svcutil-lib, 99.99.99}",
1414
"Microsoft.ApplicationInsights, {Microsoft.ApplicationInsights, 99.99.99}",
15-
"Microsoft.DotNet.InternalAbstractions, {Microsoft.DotNet.InternalAbstractions, 99.99.99}",
1615
"Microsoft.Extensions.DependencyModel, {Microsoft.Extensions.DependencyModel, 99.99.99}",
1716
"Newtonsoft.Json, {Newtonsoft.Json, 99.99.99}",
1817
"NuGet.Common, {NuGet.Common, 99.99.99}",
@@ -24,33 +23,8 @@
2423
"NuGet.ProjectModel, {NuGet.ProjectModel, 99.99.99}",
2524
"NuGet.Protocol, {NuGet.Protocol, 99.99.99}",
2625
"NuGet.Versioning, {NuGet.Versioning, 99.99.99}",
27-
"System.AppContext, {System.AppContext, 99.99.99}",
28-
"System.Collections, {System.Collections, 99.99.99}",
29-
"System.Diagnostics.Debug, {System.Diagnostics.Debug, 99.99.99}",
30-
"System.Diagnostics.DiagnosticSource, {System.Diagnostics.DiagnosticSource, 99.99.99}",
31-
"System.Dynamic.Runtime, {System.Dynamic.Runtime, 99.99.99}",
32-
"System.IO, {System.IO, 99.99.99}",
33-
"System.IO.FileSystem, {System.IO.FileSystem, 99.99.99}",
34-
"System.IO.FileSystem.Primitives, {System.IO.FileSystem.Primitives, 99.99.99}",
35-
"System.Linq, {System.Linq, 99.99.99}",
36-
"System.Linq.Expressions, {System.Linq.Expressions, 99.99.99}",
37-
"System.ObjectModel, {System.ObjectModel, 99.99.99}",
38-
"System.Reflection, {System.Reflection, 99.99.99}",
39-
"System.Reflection.Emit, {System.Reflection.Emit, 99.99.99}",
40-
"System.Reflection.Emit.ILGeneration, {System.Reflection.Emit.ILGeneration, 99.99.99}",
41-
"System.Reflection.Primitives, {System.Reflection.Primitives, 99.99.99}",
42-
"System.Reflection.TypeExtensions, {System.Reflection.TypeExtensions, 99.99.99}",
43-
"System.Runtime, {System.Runtime, 99.99.99}",
44-
"System.Runtime.Extensions, {System.Runtime.Extensions, 99.99.99}",
45-
"System.Runtime.Handles, {System.Runtime.Handles, 99.99.99}",
46-
"System.Runtime.InteropServices, {System.Runtime.InteropServices, 99.99.99}",
47-
"System.Runtime.InteropServices.RuntimeInformation, {System.Runtime.InteropServices.RuntimeInformation, 99.99.99}",
48-
"System.Runtime.Loader, {System.Runtime.Loader, 99.99.99}",
49-
"System.Security.Cryptography.Cng, {System.Security.Cryptography.Cng, 99.99.99}",
5026
"System.Security.Cryptography.Pkcs, {System.Security.Cryptography.Pkcs, 99.99.99}",
51-
"System.Security.Cryptography.ProtectedData, {System.Security.Cryptography.ProtectedData, 99.99.99}",
52-
"System.Text.Encoding, {System.Text.Encoding, 99.99.99}",
53-
"System.Threading.Tasks, {System.Threading.Tasks, 99.99.99}"
27+
"System.Security.Cryptography.ProtectedData, {System.Security.Cryptography.ProtectedData, 99.99.99}"
5428
],
5529
"targetFramework": "N.N",
5630
"typeReuseMode": "All"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
//
5+
// Changes to this file may cause incorrect behavior and will be lost if
6+
// the code is regenerated.
7+
// </auto-generated>
8+
//------------------------------------------------------------------------------
9+
10+
namespace ServiceReference
11+
{
12+
using System.Runtime.Serialization;
13+
14+
15+
[System.Diagnostics.DebuggerStepThroughAttribute()]
16+
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "99.99.99")]
17+
[System.Runtime.Serialization.DataContractAttribute(Name="TypeReuseCompositeType", Namespace="http://schemas.datacontract.org/2004/07/TypesLib")]
18+
public partial class TypeReuseCompositeType : object
19+
{
20+
21+
private bool BoolValueField;
22+
23+
private string StringValueField;
24+
25+
[System.Runtime.Serialization.DataMemberAttribute()]
26+
public bool BoolValue
27+
{
28+
get
29+
{
30+
return this.BoolValueField;
31+
}
32+
set
33+
{
34+
this.BoolValueField = value;
35+
}
36+
}
37+
38+
[System.Runtime.Serialization.DataMemberAttribute()]
39+
public string StringValue
40+
{
41+
get
42+
{
43+
return this.StringValueField;
44+
}
45+
set
46+
{
47+
this.StringValueField = value;
48+
}
49+
}
50+
}
51+
52+
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "99.99.99")]
53+
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="ServiceReference.ITypeReuseSvc")]
54+
public interface ITypeReuseSvc
55+
{
56+
57+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ITypeReuseSvc/GetData", ReplyAction="http://tempuri.org/ITypeReuseSvc/GetDataResponse")]
58+
System.Threading.Tasks.Task<BinLib.BinLibrary> GetDataAsync(int value);
59+
60+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ITypeReuseSvc/GetDataUsingDataContract", ReplyAction="http://tempuri.org/ITypeReuseSvc/GetDataUsingDataContractResponse")]
61+
System.Threading.Tasks.Task<ServiceReference.TypeReuseCompositeType> GetDataUsingDataContractAsync(ServiceReference.TypeReuseCompositeType composite);
62+
}
63+
64+
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "99.99.99")]
65+
public interface ITypeReuseSvcChannel : ServiceReference.ITypeReuseSvc, System.ServiceModel.IClientChannel
66+
{
67+
}
68+
69+
[System.Diagnostics.DebuggerStepThroughAttribute()]
70+
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "99.99.99")]
71+
public partial class TypeReuseSvcClient : System.ServiceModel.ClientBase<ServiceReference.ITypeReuseSvc>, ServiceReference.ITypeReuseSvc
72+
{
73+
74+
/// <summary>
75+
/// Implement this partial method to configure the service endpoint.
76+
/// </summary>
77+
/// <param name="serviceEndpoint">The endpoint to configure</param>
78+
/// <param name="clientCredentials">The client credentials</param>
79+
static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
80+
81+
public TypeReuseSvcClient() :
82+
base(TypeReuseSvcClient.GetDefaultBinding(), TypeReuseSvcClient.GetDefaultEndpointAddress())
83+
{
84+
this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc.ToString();
85+
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
86+
}
87+
88+
public TypeReuseSvcClient(EndpointConfiguration endpointConfiguration) :
89+
base(TypeReuseSvcClient.GetBindingForEndpoint(endpointConfiguration), TypeReuseSvcClient.GetEndpointAddress(endpointConfiguration))
90+
{
91+
this.Endpoint.Name = endpointConfiguration.ToString();
92+
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
93+
}
94+
95+
public TypeReuseSvcClient(EndpointConfiguration endpointConfiguration, string remoteAddress) :
96+
base(TypeReuseSvcClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
97+
{
98+
this.Endpoint.Name = endpointConfiguration.ToString();
99+
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
100+
}
101+
102+
public TypeReuseSvcClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
103+
base(TypeReuseSvcClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
104+
{
105+
this.Endpoint.Name = endpointConfiguration.ToString();
106+
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
107+
}
108+
109+
public TypeReuseSvcClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
110+
base(binding, remoteAddress)
111+
{
112+
}
113+
114+
public System.Threading.Tasks.Task<BinLib.BinLibrary> GetDataAsync(int value)
115+
{
116+
return base.Channel.GetDataAsync(value);
117+
}
118+
119+
public System.Threading.Tasks.Task<ServiceReference.TypeReuseCompositeType> GetDataUsingDataContractAsync(ServiceReference.TypeReuseCompositeType composite)
120+
{
121+
return base.Channel.GetDataUsingDataContractAsync(composite);
122+
}
123+
124+
public virtual System.Threading.Tasks.Task OpenAsync()
125+
{
126+
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
127+
}
128+
129+
#if !NET6_0_OR_GREATER
130+
public virtual System.Threading.Tasks.Task CloseAsync()
131+
{
132+
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndClose));
133+
}
134+
#endif
135+
136+
private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
137+
{
138+
if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc))
139+
{
140+
System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
141+
result.MaxBufferSize = int.MaxValue;
142+
result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
143+
result.MaxReceivedMessageSize = int.MaxValue;
144+
result.AllowCookies = true;
145+
return result;
146+
}
147+
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
148+
}
149+
150+
private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
151+
{
152+
if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc))
153+
{
154+
return new System.ServiceModel.EndpointAddress("http://localhost:51074/TypeReuseSvc.svc");
155+
}
156+
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
157+
}
158+
159+
private static System.ServiceModel.Channels.Binding GetDefaultBinding()
160+
{
161+
return TypeReuseSvcClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc);
162+
}
163+
164+
private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
165+
{
166+
return TypeReuseSvcClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc);
167+
}
168+
169+
public enum EndpointConfiguration
170+
{
171+
172+
BasicHttpBinding_ITypeReuseSvc,
173+
}
174+
}
175+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"providerId": "Microsoft.Tools.ServiceModel.Svcutil",
3+
"version": "99.99.99",
4+
"options": {
5+
"inputs": [
6+
"$testCasesPath$/wsdl/TypeReuseSvc.wsdl"
7+
],
8+
"namespaceMappings": [
9+
"*, ServiceReference"
10+
],
11+
"outputFile": "Reference.cs",
12+
"references": [
13+
"$TEMP$NetStandard20TypeReuse//TypeReuseClient//bin//Debug//netstandard2.0//BinLib.dll"
14+
],
15+
"targetFramework": "netstandard2.0",
16+
"typeReuseMode": "All"
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project Sdk="Microsoft.NET.Sdk">
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
</PropertyGroup>
6+
<ItemGroup>
7+
<Reference Include="BinLib">
8+
<HintPath>../BinLib/BinLib.dll</HintPath>
9+
</Reference>
10+
</ItemGroup>
11+
<ItemGroup>
12+
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
13+
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
14+
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
15+
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
16+
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
17+
</ItemGroup>
18+
</Project>

src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/Reference.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,13 @@ public virtual System.Threading.Tasks.Task OpenAsync()
148148
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
149149
}
150150

151+
#if !NET6_0_OR_GREATER
152+
public virtual System.Threading.Tasks.Task CloseAsync()
153+
{
154+
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndClose));
155+
}
156+
#endif
157+
151158
private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
152159
{
153160
if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc))

src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/elm.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,5 @@
1010
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
1111
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
1212
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
13-
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
14-
<PackageReference Include="System.ServiceModel.*", Version="N.N.N">
15-
<PackageReference Include="System.Web.Services.Description", Version="N.N.N">
1613
</ItemGroup>
1714
</Project>

src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/Reference.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ public virtual System.Threading.Tasks.Task OpenAsync()
8888
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
8989
}
9090

91+
#if !NET6_0_OR_GREATER
92+
public virtual System.Threading.Tasks.Task CloseAsync()
93+
{
94+
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndClose));
95+
}
96+
#endif
97+
9198
private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
9299
{
93100
if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc))

0 commit comments

Comments
 (0)