Skip to content

Commit

Permalink
Merging code for 2.8.211 nuget packages. (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
amanbha authored Oct 2, 2017
1 parent fd17cc9 commit 5bda86c
Show file tree
Hide file tree
Showing 321 changed files with 14,890 additions and 2,160 deletions.
2 changes: 1 addition & 1 deletion properties/service_fabric_managed_common.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<!-- Set Version numbers. These are used for generating Assemblies and Nuget packages. -->
<PropertyGroup>
<MajorVersion>2</MajorVersion>
<MinorVersion>7</MinorVersion>
<MinorVersion>8</MinorVersion>
<BuildVersion>0</BuildVersion>
<Revision>0</Revision>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions properties/service_fabric_nuproj.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<Tags>ServiceFabric Microsoft Azure Fabric</Tags>
<Language>en-US</Language>
<NupkgOutputDir>$(OutputRoot)\packages</NupkgOutputDir>
<FabricRuntimeNuGetPackageVersionOfficial>5.7.198</FabricRuntimeNuGetPackageVersionOfficial>
<FabricSdkNuGetPackageVersionOfficial>2.7.198</FabricSdkNuGetPackageVersionOfficial>
<FabricRuntimeNuGetPackageVersionOfficial>6.0.211</FabricRuntimeNuGetPackageVersionOfficial>
<FabricSdkNuGetPackageVersionOfficial>2.8.211</FabricSdkNuGetPackageVersionOfficial>
<FabricSdkNuGetPackageVersionOSS>$(MajorVersion).$(MinorVersion).$(BuildVersion)</FabricSdkNuGetPackageVersionOSS>

<!-- override version for nuget package-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,34 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.ServiceFabric.Internal, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\external\packages\Microsoft.ServiceFabric.5.7.198\lib\net45\Microsoft.ServiceFabric.Internal.dll</HintPath>
<Reference Include="Microsoft.ServiceFabric.Internal, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\external\packages\Microsoft.ServiceFabric.6.0.211\lib\net45\Microsoft.ServiceFabric.Internal.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.ServiceFabric.Internal.Strings, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\external\packages\Microsoft.ServiceFabric.5.7.198\lib\net45\Microsoft.ServiceFabric.Internal.Strings.dll</HintPath>
<Reference Include="Microsoft.ServiceFabric.Internal.Strings, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\external\packages\Microsoft.ServiceFabric.6.0.211\lib\net45\Microsoft.ServiceFabric.Internal.Strings.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.ServiceFabric.Preview, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\external\packages\Microsoft.ServiceFabric.5.7.198\lib\net45\Microsoft.ServiceFabric.Preview.dll</HintPath>
<Reference Include="Microsoft.ServiceFabric.Preview, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\external\packages\Microsoft.ServiceFabric.6.0.211\lib\net45\Microsoft.ServiceFabric.Preview.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Fabric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\external\packages\Microsoft.ServiceFabric.5.7.198\lib\net45\System.Fabric.dll</HintPath>
<Reference Include="System.Fabric, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\external\packages\Microsoft.ServiceFabric.6.0.211\lib\net45\System.Fabric.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Fabric.Management.ServiceModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\external\packages\Microsoft.ServiceFabric.5.7.198\lib\net45\System.Fabric.Management.ServiceModel.dll</HintPath>
<Reference Include="System.Fabric.Management.ServiceModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\external\packages\Microsoft.ServiceFabric.6.0.211\lib\net45\System.Fabric.Management.ServiceModel.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Fabric.Management.ServiceModel.XmlSerializers, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\external\packages\Microsoft.ServiceFabric.5.7.198\lib\net45\System.Fabric.Management.ServiceModel.XmlSerializers.dll</HintPath>
<Reference Include="System.Fabric.Management.ServiceModel.XmlSerializers, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\external\packages\Microsoft.ServiceFabric.6.0.211\lib\net45\System.Fabric.Management.ServiceModel.XmlSerializers.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Fabric.Strings, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\external\packages\Microsoft.ServiceFabric.5.7.198\lib\net45\System.Fabric.Strings.dll</HintPath>
<Reference Include="System.Fabric.Strings, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=AMD64">
<HintPath>..\..\external\packages\Microsoft.ServiceFabric.6.0.211\lib\net45\System.Fabric.Strings.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.Serialization" />
Expand All @@ -54,15 +54,17 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Remoting\V2\Wcf\Client\WcfActorRemotingClientFactory.cs" />
<Compile Include="Remoting\V2\Wcf\Runtime\WcfActorServiceRemotingListener.cs" />
<Compile Include="SR.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>SR.resx</DependentUpon>
</Compile>
<Compile Include="_friend.cs" />
<Compile Include="Remoting\Wcf\WcfActorRemotingProviderAttribute.cs" />
<Compile Include="Remoting\Wcf\Runtime\WcfActorServiceRemotingListener.cs" />
<Compile Include="Remoting\Wcf\Client\WcfActorRemotingClientFactory.cs" />
<Compile Include="WcfActorRemotingProviderAttribute.cs" />
<Compile Include="Remoting\V1\Wcf\Runtime\WcfActorServiceRemotingListener.cs" />
<Compile Include="Remoting\V1\Wcf\Client\WcfActorRemotingClientFactory.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.ServiceFabric.Actors\Microsoft.ServiceFabric.Actors.csproj">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
namespace Microsoft.ServiceFabric.Actors.Remoting.Wcf.Client
namespace Microsoft.ServiceFabric.Actors.Remoting.V1.Wcf.Client
{
using System.Collections.Generic;
using System.ServiceModel.Channels;
using Microsoft.ServiceFabric.Services.Remoting.V1;
using Microsoft.ServiceFabric.Services.Remoting.V1.Client;
using Microsoft.ServiceFabric.Actors.Remoting.Client;
using Microsoft.ServiceFabric.Services.Client;
using Microsoft.ServiceFabric.Services.Communication.Client;
using Microsoft.ServiceFabric.Services.Remoting;
using Microsoft.ServiceFabric.Services.Remoting.Wcf.Client;
using Microsoft.ServiceFabric.Services.Remoting.V1.Wcf.Client;

/// <summary>
/// An <see cref="Microsoft.ServiceFabric.Services.Remoting.Client.IServiceRemotingClientFactory"/> that uses
/// Windows Communication Foundation to create <see cref="Microsoft.ServiceFabric.Services.Remoting.Client.IServiceRemotingClient"/>
/// An <see cref="IServiceRemotingClientFactory"/> that uses
/// Windows Communication Foundation to create <see cref="IServiceRemotingClient"/>
/// to communicate with an actor service and actors hosted by it, using actor and service interfaces that are remoted via
/// <see cref="Microsoft.ServiceFabric.Actors.Remoting.Wcf.Runtime.WcfActorServiceRemotingListener"/>.
/// <see cref="Microsoft.ServiceFabric.Actors.Remoting.V1.Wcf.Runtime.WcfActorServiceRemotingListener"/>.
/// </summary>
public class WcfActorRemotingClientFactory : WcfServiceRemotingClientFactory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
namespace Microsoft.ServiceFabric.Actors.Remoting.Wcf.Runtime
namespace Microsoft.ServiceFabric.Actors.Remoting.V1.Wcf.Runtime
{
using System;
using System.Fabric;
using System.Fabric.Common;
using System.ServiceModel;
using System.ServiceModel.Channels;
using Microsoft.ServiceFabric.Actors.Generator;
using Microsoft.ServiceFabric.Actors.Remoting.Runtime;
using Microsoft.ServiceFabric.Services.Remoting.Runtime;
using Microsoft.ServiceFabric.Services.Remoting.Wcf.Runtime;
using Microsoft.ServiceFabric.Actors.Runtime;
using Microsoft.ServiceFabric.Actors.Remoting.V1.Runtime;
using Microsoft.ServiceFabric.Services.Remoting.Runtime;
using Microsoft.ServiceFabric.Services.Remoting.V1.Runtime;
using Microsoft.ServiceFabric.Services.Remoting.V1.Wcf.Runtime;

/// <summary>
/// An <see cref="Microsoft.ServiceFabric.Services.Remoting.Runtime.IServiceRemotingListener"/> that uses
/// An <see cref="IServiceRemotingListener"/> that uses
/// Windows Communication Foundation to provide interface remoting for actor services.
/// </summary>
public class WcfActorServiceRemotingListener : WcfServiceRemotingListener
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
namespace Microsoft.ServiceFabric.Actors.Remoting.V2.Wcf.Client
{
using System.Collections.Generic;
using System.ServiceModel.Channels;
using Microsoft.ServiceFabric.Actors.Remoting.Client;
using Microsoft.ServiceFabric.Actors.Remoting.V2.Wcf.Client;
using Microsoft.ServiceFabric.Actors.Remoting.V2;
using Microsoft.ServiceFabric.Services.Client;
using Microsoft.ServiceFabric.Services.Communication.Client;
using Microsoft.ServiceFabric.Services.Remoting.V2.Wcf.Client;
using Microsoft.ServiceFabric.Services.Remoting.V2;
using Microsoft.ServiceFabric.Services.Remoting.V2.Client;

/// <summary>
/// An <see cref="IServiceRemotingClientFactory"/> that uses
/// Windows Communication Foundation to create <see cref="IServiceRemotingClient"/>
/// to communicate with an actor service and actors hosted by it, using actor and service interfaces that are remoted via
/// <see cref="Microsoft.ServiceFabric.Actors.Remoting.V2.Wcf.Runtime.WcfActorServiceRemotingListener"/>.
/// </summary>
public class WcfActorRemotingClientFactory : WcfServiceRemotingClientFactory
{
/// <summary>
/// Constructs a WCF based actor remoting factory.
/// </summary>
/// <param name="callbackClient">
/// The callback client that receives the callbacks from the service.
/// </param>
public WcfActorRemotingClientFactory(
IServiceRemotingCallbackMessageHandler callbackClient)
: this(null, callbackClient)
{
}

/// <summary>
/// Constructs a WCF based actor remoting factory.
/// </summary>
/// <param name="clientBinding">
/// WCF binding to use for the client. If the client binding is null,
/// a default client binding is created using
/// <see cref="Microsoft.ServiceFabric.Services.Communication.Wcf.WcfUtility.CreateTcpClientBinding"/> method
/// which creates a <see cref="System.ServiceModel.NetTcpBinding"/> with no security.
/// </param>
/// <param name="callbackClient">
/// The callback client that receives the callbacks from the service.
/// </param>
/// <param name="exceptionHandlers">
/// Exception handlers to handle the exceptions encountered in communicating with the service.
/// </param>
/// <param name="servicePartitionResolver">
/// Service partition resolver to resolve the service endpoints. If not specified, a default
/// service partition resolver returned by <see cref="ServicePartitionResolver.GetDefault"/> is used.
/// </param>
/// <param name="traceId">
/// Id to use in diagnostics traces from this component.
/// </param>
/// <param name="serializationProvider"></param>
/// <remarks>
/// This factory uses <see cref="Microsoft.ServiceFabric.Services.Communication.Wcf.Client.WcfExceptionHandler"/>,
/// <see cref="Microsoft.ServiceFabric.Actors.Remoting.Client.ActorRemotingExceptionHandler"/>, in addition to the
/// exception handlers supplied to the constructor.
/// </remarks>
public WcfActorRemotingClientFactory(
Binding clientBinding,
IServiceRemotingCallbackMessageHandler callbackClient,
IEnumerable<IExceptionHandler> exceptionHandlers = null,
IServicePartitionResolver servicePartitionResolver = null,
string traceId = null,
IServiceRemotingMessageSerializationProvider serializationProvider=null) :
base(
new ActorRemotingSerializationManager(serializationProvider ?? new BasicDataContractSerializationProvider(),
new BasicDataContractActorHeaderSerializer()),
clientBinding,
callbackClient,
GetExceptionHandlers(exceptionHandlers),
servicePartitionResolver,
traceId)
{
}

private static IEnumerable<IExceptionHandler> GetExceptionHandlers(IEnumerable<IExceptionHandler> exceptionHandlers)
{
var handlers = new List<IExceptionHandler>();
if (exceptionHandlers != null)
{
handlers.AddRange(exceptionHandlers);
}
handlers.Add(new ActorRemotingExceptionHandler());
return handlers;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
namespace Microsoft.ServiceFabric.Actors.Remoting.V2.Wcf.Runtime
{
using System;
using System.Fabric;
using System.ServiceModel;
using System.ServiceModel.Channels;
using Microsoft.ServiceFabric.Actors.Generator;
using Microsoft.ServiceFabric.Actors.Runtime;
using Microsoft.ServiceFabric.Actors.Remoting.V2;
using Microsoft.ServiceFabric.Actors.Remoting.V2.Runtime;
using Microsoft.ServiceFabric.Services.Remoting.Runtime;
using Microsoft.ServiceFabric.Services.Remoting.V2;
using Microsoft.ServiceFabric.Services.Remoting.V2.Runtime;
using Microsoft.ServiceFabric.Services.Remoting.V2.Wcf.Runtime;

/// <summary>
/// An <see cref="IServiceRemotingListener"/> that uses
/// Windows Communication Foundation to provide interface remoting for actor services.
/// </summary>
public class WcfActorServiceRemotingListener : WcfServiceRemotingListener
{
/// <summary>
/// Constructs a WCF based actor remoting listener.
/// </summary>
/// <param name="listenerBinding">WCF binding to use for the listener. If the listener binding is not specified or null,
/// a default listener binding is created using <see cref="Microsoft.ServiceFabric.Services.Communication.Wcf.WcfUtility.CreateTcpListenerBinding"/> method which creates
/// a <see cref="System.ServiceModel.NetTcpBinding"/> with no security.
/// </param>
/// <param name="actorService">The actor service.</param>
public WcfActorServiceRemotingListener(
ActorService actorService,
Binding listenerBinding = null)
: base(
GetContext(actorService),
new ActorServiceRemotingDispatcher(actorService, new DataContractRemotingMessageFactory()),
new ActorRemotingSerializationManager(new BasicDataContractSerializationProvider(),
new BasicDataContractActorHeaderSerializer()),
listenerBinding,
ActorNameFormat.GetFabricServiceEndpointName(actorService.ActorTypeInformation.ImplementationType))
{
}

/// <summary>
/// Constructs a WCF based service remoting listener.
/// </summary>
/// <param name="serviceContext">The context of the service for which the remoting listener is being constructed.</param>
/// <param name="serviceRemotingMessageHandler">The handler for receiving and processing remoting messages. As the messages are received
/// the listener delivers the messages to the handler.
/// </param>
/// <param name="serializationProvider"></param>
/// <param name="listenerBinding">WCF binding to use for the listener. If the listener binding is not specified or null,
/// a default listener binding is created using <see cref="Microsoft.ServiceFabric.Services.Communication.Wcf.WcfUtility.CreateTcpListenerBinding"/> method.
/// </param>
/// <param name="address">The endpoint address to use for the WCF listener. If not specified or null, the endpoint
/// address is created using the default endpoint resource named "ServiceEndpoint" defined in the service manifest.
/// </param>
public WcfActorServiceRemotingListener(
ServiceContext serviceContext,
IServiceRemotingMessageHandler serviceRemotingMessageHandler,
IServiceRemotingMessageSerializationProvider serializationProvider,
Binding listenerBinding = null,
EndpointAddress address = null)
: base(
serviceContext,
serviceRemotingMessageHandler,
new ActorRemotingSerializationManager(serializationProvider ?? new BasicDataContractSerializationProvider(),
new BasicDataContractActorHeaderSerializer()),
listenerBinding,
address)
{
}

private static ServiceContext GetContext(ActorService actorService)
{
if (actorService == null)
{
throw new ArgumentNullException("actorService");
}

return actorService.Context;
}
}
}
Loading

0 comments on commit 5bda86c

Please sign in to comment.