Skip to content

Commit ebc64f8

Browse files
committed
update service hosts
1 parent 6d4fa39 commit ebc64f8

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/System.Private.ServiceModel/tools/IISHostedWcfService/App_code/testhosts/TcpDefaultResourceTestServiceHost.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ protected override IList<Binding> GetBindings()
2222
{
2323
var bindings = new List<Binding>();
2424
bindings.Add(GetNetTcpBinding());
25+
26+
#if !NET
2527
if (!HostingEnvironment.IsHosted)
2628
{
2729
bindings.Add(GetNetNamedPipeBinding());
2830
}
29-
31+
#endif
3032
return bindings;
3133
}
3234

@@ -35,10 +37,12 @@ private Binding GetNetTcpBinding()
3537
return new NetTcpBinding() { Name = "tcp-default" };
3638
}
3739

40+
#if !NET
3841
private Binding GetNetNamedPipeBinding()
3942
{
4043
return new NetNamedPipeBinding() { Name = "namedpipe-default" };
4144
}
45+
#endif
4246

4347
public TcpDefaultResourceTestServiceHost(params Uri[] baseAddresses)
4448
: base(typeof(WcfService), baseAddresses)

src/System.Private.ServiceModel/tools/IISHostedWcfService/App_code/testhosts/TcpNoSecurityTestServiceHost.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ protected override IList<Binding> GetBindings()
2222
{
2323
var bindings = new List<Binding>();
2424
bindings.Add(GetNetTcpBinding());
25+
26+
#if !NET
2527
if (!HostingEnvironment.IsHosted)
2628
{
2729
bindings.Add(GetNetNamedPipeBinding());
2830
}
29-
31+
#endif
3032
return bindings;
3133
}
3234

@@ -35,10 +37,12 @@ private Binding GetNetTcpBinding()
3537
return new NetTcpBinding(SecurityMode.None) { Name = "tcp-nosecurity" };
3638
}
3739

40+
#if !NET
3841
private Binding GetNetNamedPipeBinding()
3942
{
4043
return new NetNamedPipeBinding(NetNamedPipeSecurityMode.None) { Name = "namedpipe-nosecurity" };
4144
}
45+
#endif
4246

4347
public TcpNoSecurityTestServiceHost(params Uri[] baseAddresses)
4448
: base(typeof(WcfService), baseAddresses)

src/System.Private.ServiceModel/tools/IISHostedWcfService/App_code/testhosts/TestHostWebServiceHost.cs

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
#if NET
6-
using CoreWCF;
7-
#else
5+
#if !NET
86
using System;
97
using System.ServiceModel;
108
using System.ServiceModel.Activation;
119
using System.ServiceModel.Web;
12-
#endif
1310

1411
namespace WcfService
1512
{
@@ -31,3 +28,4 @@ public TestHostWebServiceHost(Type serviceType, params Uri[] baseAddresses)
3128
}
3229
}
3330
}
31+
#endif

src/System.Private.ServiceModel/tools/SelfHostedCoreWcfService/SelfHostedCoreWCFService.csproj

+1-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<IsPackable>false</IsPackable>
66
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
77
</PropertyGroup>
8-
8+
99
<ItemGroup>
1010
<Using Include="System.Runtime.Serialization" />
1111
<Using Include="Microsoft.Extensions.DependencyInjection.Extensions" />
@@ -32,11 +32,8 @@
3232
<Compile Remove="..\IISHostedWcfService\App_code\testhosts\ReliableSessionOneWayTestServiceHost.cs" />
3333
<Compile Remove="..\IISHostedWcfService\App_code\testhosts\ReliableSessionTestServiceHost.cs" />
3434
<Compile Remove="..\IISHostedWcfService\App_code\testhosts\Saml2IssuedTokenTestServiceHost.cs" />
35-
3635
<Compile Remove="..\IISHostedWcfService\App_code\testhosts\HttpsTransportSecurityMessageCredentialsCertTestServiceHost.cs" />
3736
<Compile Remove="..\IISHostedWcfService\App_code\testhosts\HttpsTransportSecurityMessageCredentialsUsernameTestServiceHost.cs" />
38-
<Compile Remove="..\IISHostedWcfService\App_code\testhosts\TcpDefaultResourceTestServiceHost.cs" />
39-
<Compile Remove="..\IISHostedWcfService\App_code\testhosts\TcpNoSecurityTestServiceHost.cs" />
4037
<Compile Remove="..\IISHostedWcfService\App_code\testhosts\TestHostWebServiceHost.cs" />
4138

4239
<None Include="..\IISHostedWcfService\App_code\testhosts\Federation\AcceptAnyUsernameSecurityTokenHandler.cs" />
@@ -47,11 +44,8 @@
4744
<None Include="..\IISHostedWcfService\App_code\testhosts\ReliableSessionOneWayTestServiceHost.cs" />
4845
<None Include="..\IISHostedWcfService\App_code\testhosts\ReliableSessionTestServiceHost.cs" />
4946
<None Include="..\IISHostedWcfService\App_code\testhosts\Saml2IssuedTokenTestServiceHost.cs" />
50-
5147
<None Include="..\IISHostedWcfService\App_code\testhosts\HttpsTransportSecurityMessageCredentialsCertTestServiceHost.cs" />
5248
<None Include="..\IISHostedWcfService\App_code\testhosts\HttpsTransportSecurityMessageCredentialsUsernameTestServiceHost.cs" />
53-
<None Include="..\IISHostedWcfService\App_code\testhosts\TcpDefaultResourceTestServiceHost.cs" />
54-
<None Include="..\IISHostedWcfService\App_code\testhosts\TcpNoSecurityTestServiceHost.cs" />
5549
<None Include="..\IISHostedWcfService\App_code\testhosts\TestHostWebServiceHost.cs" />
5650
</ItemGroup>
5751
<ItemGroup>

0 commit comments

Comments
 (0)