Skip to content

Commit 6c3ccc7

Browse files
authored
Remove Remoting V1 (#399)
- Remove obsolete types and members implementing Remoting V1 - Bump major version from 8 to 9 to reflect the breaking changes
1 parent 52c83f4 commit 6c3ccc7

File tree

101 files changed

+432
-7761
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+432
-7761
lines changed

Diff for: properties/service_fabric_common.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222

2323
<!-- Version for binaries, nuget packages generated from this repo. -->
2424
<!-- TODO: Versions numbers are changed here manually for now, Integrate this with GitVersion. -->
25-
<MajorVersion>8</MajorVersion>
25+
<MajorVersion>9</MajorVersion>
2626
<MinorVersion>0</MinorVersion>
27-
<BuildVersion>13</BuildVersion>
27+
<BuildVersion>0</BuildVersion>
2828
<Revision>0</Revision>
2929

3030
</PropertyGroup>

Diff for: src/FabActUtil/Generator/ManifestGenerator.cs

+15-33
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
44
// ------------------------------------------------------------
55

6+
using System;
7+
using System.Collections.Generic;
8+
using System.Fabric.Management.ServiceModel;
9+
using System.Globalization;
10+
using System.IO;
11+
using System.Linq;
12+
using System.Reflection;
13+
using System.Xml;
14+
using Microsoft.ServiceFabric.Actors.Generator;
15+
using Microsoft.ServiceFabric.Actors.Runtime;
16+
using Microsoft.ServiceFabric.Services.Remoting;
17+
using StartupServicesModel;
18+
619
namespace FabActUtil.Generator
720
{
8-
using System;
9-
using System.Collections.Generic;
10-
using System.Fabric.Management.ServiceModel;
11-
using System.Globalization;
12-
using System.IO;
13-
using System.Linq;
14-
using System.Reflection;
15-
using System.Xml;
16-
using Microsoft.ServiceFabric.Actors.Generator;
17-
using Microsoft.ServiceFabric.Actors.Runtime;
18-
using Microsoft.ServiceFabric.Services.Remoting;
19-
using StartupServicesModel;
20-
2121
/// <summary>
2222
/// ServiceManifestEntryPointType decides which kind of service manifest exe host is generated. By default the existing behavior of serviceName.exe will be used.
2323
/// </summary>
@@ -560,14 +560,7 @@ private static ServiceTypeType CreateServiceTypeType(
560560
private static Dictionary<string, Func<ActorTypeInformation, string>> GetGeneratedNameFunctionForServiceEndpoint(ActorTypeInformation actorTypeInfo)
561561
{
562562
var generatedNameFunctions = new Dictionary<string, Func<ActorTypeInformation, string>>();
563-
#if !DotNetCoreClr
564-
#pragma warning disable 618
565-
if (Helper.IsRemotingV1(actorTypeInfo.RemotingListenerVersion))
566-
{
567-
generatedNameFunctions.Add(GeneratedServiceEndpointName, GetFabricServiceEndpointName);
568-
}
569-
#pragma warning restore 618
570-
#endif
563+
571564
if (Helper.IsRemotingV2(actorTypeInfo.RemotingListenerVersion))
572565
{
573566
generatedNameFunctions.Add(GeneratedServiceEndpointV2Name, GetFabricServiceV2EndpointName);
@@ -584,18 +577,7 @@ private static Dictionary<string, Func<ActorTypeInformation, string>> GetGenerat
584577
private static List<EndpointType> CreateEndpointResourceBasedOnRemotingServer(ActorTypeInformation actorTypeInfo)
585578
{
586579
var endpoints = new List<EndpointType>();
587-
#if !DotNetCoreClr
588-
#pragma warning disable 618
589-
if (Helper.IsRemotingV1(actorTypeInfo.RemotingListenerVersion))
590-
{
591-
endpoints.Add(
592-
new EndpointType()
593-
{
594-
Name = GetFabricServiceEndpointName(actorTypeInfo),
595-
});
596-
}
597-
#pragma warning restore 618
598-
#endif
580+
599581
if (Helper.IsRemotingV2(actorTypeInfo.RemotingListenerVersion))
600582
{
601583
endpoints.Add(

Diff for: src/Microsoft.ServiceFabric.Actors.Wcf/Remoting/V1/Wcf/Client/WcfActorRemotingClientFactory.cs

-94
This file was deleted.

Diff for: src/Microsoft.ServiceFabric.Actors.Wcf/Remoting/V1/Wcf/Runtime/WcfActorServiceRemotingListener.cs

-81
This file was deleted.

Diff for: src/Microsoft.ServiceFabric.Actors.Wcf/WcfActorRemotingProviderAttribute.cs

+11-58
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
44
// ------------------------------------------------------------
55

6+
using System;
7+
using System.Collections.Generic;
8+
using Microsoft.ServiceFabric.Actors.Client;
9+
using Microsoft.ServiceFabric.Actors.Remoting.V2.Wcf.Client;
10+
using Microsoft.ServiceFabric.Actors.Runtime;
11+
using Microsoft.ServiceFabric.Services.Communication.Wcf;
12+
using Microsoft.ServiceFabric.Services.Remoting.Runtime;
13+
using Microsoft.ServiceFabric.Services.Remoting.V2.Client;
14+
615
namespace Microsoft.ServiceFabric.Actors.Remoting.Wcf
716
{
8-
using System;
9-
using System.Collections.Generic;
10-
using Microsoft.ServiceFabric.Actors.Client;
11-
using Microsoft.ServiceFabric.Actors.Remoting.V1.Wcf.Client;
12-
using Microsoft.ServiceFabric.Actors.Runtime;
13-
using Microsoft.ServiceFabric.Services.Communication.Wcf;
14-
using Microsoft.ServiceFabric.Services.Remoting.Runtime;
15-
using Microsoft.ServiceFabric.Services.Remoting.V2.Client;
16-
1717
/// <summary>
1818
/// Sets WCF as the default remoting provider for actors.
1919
/// </summary>
@@ -71,30 +71,6 @@ public long CloseTimeoutInMilliSeconds
7171
set;
7272
}
7373

74-
/// <summary>
75-
/// Creates a service remoting client factory to connect to the remoted actor interfaces.
76-
/// </summary>
77-
/// <param name="callbackClient">
78-
/// Client implementation where the callbacks should be dispatched.
79-
/// </param>
80-
/// <returns>
81-
/// A <see cref="Microsoft.ServiceFabric.Actors.Remoting.V1.Wcf.Client.WcfActorRemotingClientFactory"/>
82-
/// as <see cref="Microsoft.ServiceFabric.Services.Remoting.V1.Client.IServiceRemotingClientFactory"/>
83-
/// that can be used with <see cref="ActorProxyFactory"/> to
84-
/// generate actor proxy to talk to the actor over remoted actor interface.
85-
/// </returns>
86-
[Obsolete(Services.Remoting.DeprecationMessage.RemotingV1)]
87-
public override Microsoft.ServiceFabric.Services.Remoting.V1.Client.IServiceRemotingClientFactory CreateServiceRemotingClientFactory(
88-
Microsoft.ServiceFabric.Services.Remoting.V1.IServiceRemotingCallbackClient callbackClient)
89-
{
90-
return new Microsoft.ServiceFabric.Actors.Remoting.V1.Wcf.Client.WcfActorRemotingClientFactory(
91-
WcfUtility.CreateTcpClientBinding(
92-
maxMessageSize: this.GetMaxMessageSize(),
93-
openTimeout: this.GetOpenTimeout(),
94-
closeTimeout: this.GetCloseTimeout()),
95-
callbackClient);
96-
}
97-
9874
/// <summary>
9975
/// Creates a V2 service remoting listener for remoting the actor interfaces.
10076
/// </summary>
@@ -126,44 +102,21 @@ public override Dictionary<string, Func<ActorService, IServiceRemotingListener>>
126102
/// </param>
127103
/// <returns>
128104
/// A <see cref="WcfActorRemotingClientFactory"/>
129-
/// as <see cref="Microsoft.ServiceFabric.Services.Remoting.V2.Client.IServiceRemotingClientFactory"/>
105+
/// as <see cref="IServiceRemotingClientFactory"/>
130106
/// that can be used with <see cref="ActorProxyFactory"/> to
131107
/// generate actor proxy to talk to the actor over remoted actor interface.
132108
/// </returns>
133109
public override IServiceRemotingClientFactory CreateServiceRemotingClientFactory(
134110
IServiceRemotingCallbackMessageHandler callbackMessageHandler)
135111
{
136-
return new Microsoft.ServiceFabric.Actors.Remoting.V2.Wcf.Client.WcfActorRemotingClientFactory(
112+
return new WcfActorRemotingClientFactory(
137113
WcfUtility.CreateTcpClientBinding(
138114
maxMessageSize: this.GetMaxMessageSize(),
139115
openTimeout: this.GetOpenTimeout(),
140116
closeTimeout: this.GetCloseTimeout()),
141117
callbackMessageHandler);
142118
}
143119

144-
/// <summary>
145-
/// Creates a service remoting listener for remoting the actor interfaces.
146-
/// </summary>
147-
/// <param name="actorService">
148-
/// The implementation of the actor service that hosts the actors whose interfaces
149-
/// needs to be remoted.
150-
/// </param>
151-
/// <returns>
152-
/// An <see cref="IServiceRemotingListener"/>
153-
/// for the specified actor service.
154-
/// </returns>
155-
[Obsolete(Services.Remoting.DeprecationMessage.RemotingV1)]
156-
public override IServiceRemotingListener CreateServiceRemotingListener(
157-
ActorService actorService)
158-
{
159-
return new Actors.Remoting.V1.Wcf.Runtime.WcfActorServiceRemotingListener(
160-
actorService,
161-
WcfUtility.CreateTcpListenerBinding(
162-
maxMessageSize: this.GetMaxMessageSize(),
163-
openTimeout: this.GetOpenTimeout(),
164-
closeTimeout: this.GetCloseTimeout()));
165-
}
166-
167120
private long GetMaxMessageSize()
168121
{
169122
return (this.MaxMessageSize > 0) ? this.MaxMessageSize : DefaultMaxMessageSize;

0 commit comments

Comments
 (0)