diff --git a/Microsoft.AspNetCore.Sockets.sln b/Microsoft.AspNetCore.Sockets.sln index 8684880b97..7a41563b70 100644 --- a/Microsoft.AspNetCore.Sockets.sln +++ b/Microsoft.AspNetCore.Sockets.sln @@ -27,6 +27,10 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Extensions.WebSoc EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Extensions.WebSockets.Internal.Tests", "test\Microsoft.Extensions.WebSockets.Internal.Tests\Microsoft.Extensions.WebSockets.Internal.Tests.xproj", "{A7050BAE-3DB9-4FB3-A49D-303201415B13}" EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.SignalR", "src\Microsoft.AspNetCore.SignalR\Microsoft.AspNetCore.SignalR.xproj", "{42E76F87-92B6-45AB-BF07-6B811C0F2CAC}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.SignalR.Redis", "src\Microsoft.AspNetCore.SignalR.Redis\Microsoft.AspNetCore.SignalR.Redis.xproj", "{59319B72-38BE-4041-8E5C-FF6938874CE8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -57,6 +61,14 @@ Global {A7050BAE-3DB9-4FB3-A49D-303201415B13}.Debug|Any CPU.Build.0 = Debug|Any CPU {A7050BAE-3DB9-4FB3-A49D-303201415B13}.Release|Any CPU.ActiveCfg = Release|Any CPU {A7050BAE-3DB9-4FB3-A49D-303201415B13}.Release|Any CPU.Build.0 = Release|Any CPU + {42E76F87-92B6-45AB-BF07-6B811C0F2CAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42E76F87-92B6-45AB-BF07-6B811C0F2CAC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42E76F87-92B6-45AB-BF07-6B811C0F2CAC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42E76F87-92B6-45AB-BF07-6B811C0F2CAC}.Release|Any CPU.Build.0 = Release|Any CPU + {59319B72-38BE-4041-8E5C-FF6938874CE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59319B72-38BE-4041-8E5C-FF6938874CE8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59319B72-38BE-4041-8E5C-FF6938874CE8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59319B72-38BE-4041-8E5C-FF6938874CE8}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -68,5 +80,7 @@ Global {AAD719D5-5E31-4ED1-A60F-6EB92EFA66D9} = {6A35B453-52EC-48AF-89CA-D4A69800F131} {5D9DA986-2EAB-4C6D-BF15-9A4BDD4DE775} = {DA69F624-5398-4884-87E4-B816698CDE65} {A7050BAE-3DB9-4FB3-A49D-303201415B13} = {6A35B453-52EC-48AF-89CA-D4A69800F131} + {42E76F87-92B6-45AB-BF07-6B811C0F2CAC} = {DA69F624-5398-4884-87E4-B816698CDE65} + {59319B72-38BE-4041-8E5C-FF6938874CE8} = {DA69F624-5398-4884-87E4-B816698CDE65} EndGlobalSection EndGlobal diff --git a/samples/SocketsSample/FormatterExtensions.cs b/samples/SocketsSample/FormatterExtensions.cs index 8ce97b33ae..402f3d31ff 100644 --- a/samples/SocketsSample/FormatterExtensions.cs +++ b/samples/SocketsSample/FormatterExtensions.cs @@ -1,5 +1,6 @@ using System; using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.DependencyInjection; namespace SocketsSample diff --git a/samples/SocketsSample/Hubs/Chat.cs b/samples/SocketsSample/Hubs/Chat.cs index fea75e62e0..e9735b7c15 100644 --- a/samples/SocketsSample/Hubs/Chat.cs +++ b/samples/SocketsSample/Hubs/Chat.cs @@ -1,5 +1,6 @@ using System; using System.Threading.Tasks; +using Microsoft.AspNetCore.SignalR; namespace SocketsSample.Hubs { diff --git a/samples/SocketsSample/JSonInvocationAdapter.cs b/samples/SocketsSample/JSonInvocationAdapter.cs index c14d576e53..4f983cbbaf 100644 --- a/samples/SocketsSample/JSonInvocationAdapter.cs +++ b/samples/SocketsSample/JSonInvocationAdapter.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Threading.Tasks; +using Microsoft.AspNetCore.SignalR; using Newtonsoft.Json; namespace SocketsSample diff --git a/samples/SocketsSample/LineInvocationAdapter.cs b/samples/SocketsSample/LineInvocationAdapter.cs index e079c6d79a..15ede4b2c2 100644 --- a/samples/SocketsSample/LineInvocationAdapter.cs +++ b/samples/SocketsSample/LineInvocationAdapter.cs @@ -3,6 +3,7 @@ using System; using System.IO; using System.Linq; using System.Threading.Tasks; +using Microsoft.AspNetCore.SignalR; namespace SocketsSample { diff --git a/samples/SocketsSample/Protobuf/ProtobufInvocationAdapter.cs b/samples/SocketsSample/Protobuf/ProtobufInvocationAdapter.cs index 3e438ee1a9..e6740d615d 100644 --- a/samples/SocketsSample/Protobuf/ProtobufInvocationAdapter.cs +++ b/samples/SocketsSample/Protobuf/ProtobufInvocationAdapter.cs @@ -2,6 +2,7 @@ using System.IO; using System.Threading.Tasks; using Google.Protobuf; +using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.DependencyInjection; namespace SocketsSample.Protobuf diff --git a/samples/SocketsSample/Startup.cs b/samples/SocketsSample/Startup.cs index 14a32e9843..c2cd314ed0 100644 --- a/samples/SocketsSample/Startup.cs +++ b/samples/SocketsSample/Startup.cs @@ -1,8 +1,8 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.SignalR; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using SocketsSample.EndPoints.Hubs; using SocketsSample.Hubs; namespace SocketsSample @@ -15,10 +15,7 @@ namespace SocketsSample { services.AddRouting(); - services.AddSingleton(typeof(HubLifetimeManager<>), typeof(DefaultHubLifetimeManager<>)); - // services.AddSingleton(typeof(HubLifetimeManager<>), typeof(RedisHubLifetimeManager<>)); - services.AddSingleton(typeof(HubEndPoint<>), typeof(HubEndPoint<>)); - services.AddSingleton(typeof(RpcEndpoint<>), typeof(RpcEndpoint<>)); + services.AddSignalR(); services.AddSingleton(); services.AddSingleton(); diff --git a/samples/SocketsSample/project.json b/samples/SocketsSample/project.json index ba340722f5..8d4206376c 100644 --- a/samples/SocketsSample/project.json +++ b/samples/SocketsSample/project.json @@ -1,5 +1,8 @@ { "dependencies": { + "Microsoft.AspNetCore.SignalR": { + "target": "project" + }, "Microsoft.AspNetCore.Sockets": { "target": "project" }, @@ -8,7 +11,6 @@ "type": "platform" }, "Newtonsoft.Json": "9.0.1", - "StackExchange.Redis": "1.1.*", "Microsoft.AspNetCore.Diagnostics": "1.1.0-*", "Microsoft.AspNetCore.StaticFiles": "1.1.0-*", "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0-*", diff --git a/src/Microsoft.AspNetCore.SignalR.Redis/Microsoft.AspNetCore.SignalR.Redis.xproj b/src/Microsoft.AspNetCore.SignalR.Redis/Microsoft.AspNetCore.SignalR.Redis.xproj new file mode 100644 index 0000000000..d8256d00d8 --- /dev/null +++ b/src/Microsoft.AspNetCore.SignalR.Redis/Microsoft.AspNetCore.SignalR.Redis.xproj @@ -0,0 +1,21 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + 59319b72-38be-4041-8e5c-ff6938874ce8 + Microsoft.AspNetCore.SignalR.Redis + .\obj + .\bin\ + v4.5.2 + + + + 2.0 + + + diff --git a/src/Microsoft.AspNetCore.SignalR.Redis/Properties/AssemblyInfo.cs b/src/Microsoft.AspNetCore.SignalR.Redis/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..c0cb44b30d --- /dev/null +++ b/src/Microsoft.AspNetCore.SignalR.Redis/Properties/AssemblyInfo.cs @@ -0,0 +1,19 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Microsoft.AspNetCore.SignalR.Redis")] +[assembly: AssemblyTrademark("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("59319b72-38be-4041-8e5c-ff6938874ce8")] diff --git a/samples/SocketsSample/EndPoints/Hubs/RedisHubLifetimeManager.cs b/src/Microsoft.AspNetCore.SignalR.Redis/RedisHubLifetimeManager.cs similarity index 99% rename from samples/SocketsSample/EndPoints/Hubs/RedisHubLifetimeManager.cs rename to src/Microsoft.AspNetCore.SignalR.Redis/RedisHubLifetimeManager.cs index e168275b53..bc1ccf3216 100644 --- a/samples/SocketsSample/EndPoints/Hubs/RedisHubLifetimeManager.cs +++ b/src/Microsoft.AspNetCore.SignalR.Redis/RedisHubLifetimeManager.cs @@ -10,7 +10,7 @@ using Microsoft.AspNetCore.Sockets; using Microsoft.Extensions.Logging; using StackExchange.Redis; -namespace SocketsSample.EndPoints.Hubs +namespace Microsoft.AspNetCore.SignalR.Redis { public class RedisHubLifetimeManager : HubLifetimeManager, IDisposable { diff --git a/src/Microsoft.AspNetCore.SignalR.Redis/project.json b/src/Microsoft.AspNetCore.SignalR.Redis/project.json new file mode 100644 index 0000000000..f9f71c70d6 --- /dev/null +++ b/src/Microsoft.AspNetCore.SignalR.Redis/project.json @@ -0,0 +1,14 @@ +{ + "version": "1.0.0-*", + + "dependencies": { + "Microsoft.AspNetCore.SignalR": { + "target": "project" + }, + "StackExchange.Redis": "1.1.*" + }, + + "frameworks": { + "netstandard1.6": {} + } +} diff --git a/samples/SocketsSample/EndPoints/Hubs/DefaultHubLifetimeManager.cs b/src/Microsoft.AspNetCore.SignalR/DefaultHubLifetimeManager.cs similarity index 98% rename from samples/SocketsSample/EndPoints/Hubs/DefaultHubLifetimeManager.cs rename to src/Microsoft.AspNetCore.SignalR/DefaultHubLifetimeManager.cs index 081884dd07..a16becd557 100644 --- a/samples/SocketsSample/EndPoints/Hubs/DefaultHubLifetimeManager.cs +++ b/src/Microsoft.AspNetCore.SignalR/DefaultHubLifetimeManager.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using Channels; using Microsoft.AspNetCore.Sockets; -namespace SocketsSample.EndPoints.Hubs +namespace Microsoft.AspNetCore.SignalR { public class DefaultHubLifetimeManager : HubLifetimeManager { diff --git a/src/Microsoft.AspNetCore.SignalR/DependencyInjectionExtensions.cs b/src/Microsoft.AspNetCore.SignalR/DependencyInjectionExtensions.cs new file mode 100644 index 0000000000..c12234a1d1 --- /dev/null +++ b/src/Microsoft.AspNetCore.SignalR/DependencyInjectionExtensions.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; + +namespace Microsoft.AspNetCore.SignalR +{ + public static class DependencyInjectionExtensions + { + // TODO: We might need a builder here for things like scaleout + public static IServiceCollection AddSignalR(this IServiceCollection services) + { + services.AddSingleton(typeof(HubLifetimeManager<>), typeof(DefaultHubLifetimeManager<>)); + // services.AddSingleton(typeof(HubLifetimeManager<>), typeof(RedisHubLifetimeManager<>)); + services.AddSingleton(typeof(HubEndPoint<>), typeof(HubEndPoint<>)); + services.AddSingleton(typeof(RpcEndpoint<>), typeof(RpcEndpoint<>)); + + return services; + } + } +} diff --git a/samples/SocketsSample/Hubs/Hub.cs b/src/Microsoft.AspNetCore.SignalR/Hub.cs similarity index 97% rename from samples/SocketsSample/Hubs/Hub.cs rename to src/Microsoft.AspNetCore.SignalR/Hub.cs index 6bb677eae7..74b20d280f 100644 --- a/samples/SocketsSample/Hubs/Hub.cs +++ b/src/Microsoft.AspNetCore.SignalR/Hub.cs @@ -1,7 +1,7 @@ using System; using System.Threading.Tasks; -namespace SocketsSample.Hubs +namespace Microsoft.AspNetCore.SignalR { public class Hub : IDisposable { diff --git a/samples/SocketsSample/EndPoints/Hubs/HubCallerContext.cs b/src/Microsoft.AspNetCore.SignalR/HubCallerContext.cs similarity index 92% rename from samples/SocketsSample/EndPoints/Hubs/HubCallerContext.cs rename to src/Microsoft.AspNetCore.SignalR/HubCallerContext.cs index 794b6f445a..6afc486f00 100644 --- a/samples/SocketsSample/EndPoints/Hubs/HubCallerContext.cs +++ b/src/Microsoft.AspNetCore.SignalR/HubCallerContext.cs @@ -1,7 +1,7 @@ using System.Security.Claims; using Microsoft.AspNetCore.Sockets; -namespace SocketsSample.Hubs +namespace Microsoft.AspNetCore.SignalR { public class HubCallerContext { diff --git a/samples/SocketsSample/EndPoints/HubEndPoint.cs b/src/Microsoft.AspNetCore.SignalR/HubEndPoint.cs similarity index 97% rename from samples/SocketsSample/EndPoints/HubEndPoint.cs rename to src/Microsoft.AspNetCore.SignalR/HubEndPoint.cs index 827425e554..c2758b6137 100644 --- a/samples/SocketsSample/EndPoints/HubEndPoint.cs +++ b/src/Microsoft.AspNetCore.SignalR/HubEndPoint.cs @@ -3,10 +3,8 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Sockets; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using SocketsSample.EndPoints.Hubs; -using SocketsSample.Hubs; -namespace SocketsSample +namespace Microsoft.AspNetCore.SignalR { public class HubEndPoint : RpcEndpoint, IHubConnectionContext where THub : Hub { diff --git a/samples/SocketsSample/EndPoints/Hubs/HubLifetimeManager.cs b/src/Microsoft.AspNetCore.SignalR/HubLifetimeManager.cs similarity index 95% rename from samples/SocketsSample/EndPoints/Hubs/HubLifetimeManager.cs rename to src/Microsoft.AspNetCore.SignalR/HubLifetimeManager.cs index d60bc544b4..87255ef4ca 100644 --- a/samples/SocketsSample/EndPoints/Hubs/HubLifetimeManager.cs +++ b/src/Microsoft.AspNetCore.SignalR/HubLifetimeManager.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Sockets; -namespace SocketsSample.EndPoints.Hubs +namespace Microsoft.AspNetCore.SignalR { public abstract class HubLifetimeManager { diff --git a/samples/SocketsSample/EndPoints/Hubs/IClientProxy.cs b/src/Microsoft.AspNetCore.SignalR/IClientProxy.cs similarity index 93% rename from samples/SocketsSample/EndPoints/Hubs/IClientProxy.cs rename to src/Microsoft.AspNetCore.SignalR/IClientProxy.cs index d2f180a7cd..12749c84fe 100644 --- a/samples/SocketsSample/EndPoints/Hubs/IClientProxy.cs +++ b/src/Microsoft.AspNetCore.SignalR/IClientProxy.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace SocketsSample.Hubs +namespace Microsoft.AspNetCore.SignalR { public interface IClientProxy { diff --git a/samples/SocketsSample/EndPoints/Hubs/IGroupManager.cs b/src/Microsoft.AspNetCore.SignalR/IGroupManager.cs similarity index 75% rename from samples/SocketsSample/EndPoints/Hubs/IGroupManager.cs rename to src/Microsoft.AspNetCore.SignalR/IGroupManager.cs index 12ca3c714e..98e10eb5dc 100644 --- a/samples/SocketsSample/EndPoints/Hubs/IGroupManager.cs +++ b/src/Microsoft.AspNetCore.SignalR/IGroupManager.cs @@ -1,4 +1,4 @@ -namespace SocketsSample.Hubs +namespace Microsoft.AspNetCore.SignalR { public interface IGroupManager { diff --git a/samples/SocketsSample/EndPoints/Hubs/IHubConnectionContext.cs b/src/Microsoft.AspNetCore.SignalR/IHubConnectionContext.cs similarity index 84% rename from samples/SocketsSample/EndPoints/Hubs/IHubConnectionContext.cs rename to src/Microsoft.AspNetCore.SignalR/IHubConnectionContext.cs index ee25ac84ed..9a7048e52e 100644 --- a/samples/SocketsSample/EndPoints/Hubs/IHubConnectionContext.cs +++ b/src/Microsoft.AspNetCore.SignalR/IHubConnectionContext.cs @@ -1,4 +1,4 @@ -namespace SocketsSample.Hubs +namespace Microsoft.AspNetCore.SignalR { public interface IHubConnectionContext { diff --git a/samples/SocketsSample/IInvocationAdapter.cs b/src/Microsoft.AspNetCore.SignalR/IInvocationAdapter.cs similarity index 91% rename from samples/SocketsSample/IInvocationAdapter.cs rename to src/Microsoft.AspNetCore.SignalR/IInvocationAdapter.cs index 2f4436e245..727c839684 100644 --- a/samples/SocketsSample/IInvocationAdapter.cs +++ b/src/Microsoft.AspNetCore.SignalR/IInvocationAdapter.cs @@ -2,7 +2,7 @@ using System.IO; using System.Threading.Tasks; -namespace SocketsSample +namespace Microsoft.AspNetCore.SignalR { public interface IInvocationAdapter { diff --git a/samples/SocketsSample/SocketFormatters.cs b/src/Microsoft.AspNetCore.SignalR/InvocationAdapterRegistry.cs similarity index 84% rename from samples/SocketsSample/SocketFormatters.cs rename to src/Microsoft.AspNetCore.SignalR/InvocationAdapterRegistry.cs index 344c9b55b8..d8f1846f11 100644 --- a/samples/SocketsSample/SocketFormatters.cs +++ b/src/Microsoft.AspNetCore.SignalR/InvocationAdapterRegistry.cs @@ -1,9 +1,7 @@ using System; using System.Collections.Generic; -using Microsoft.AspNetCore.Sockets; -using Microsoft.Extensions.DependencyInjection; -namespace SocketsSample +namespace Microsoft.AspNetCore.SignalR { public class InvocationAdapterRegistry { diff --git a/samples/SocketsSample/InvocationDescriptor.cs b/src/Microsoft.AspNetCore.SignalR/InvocationDescriptor.cs similarity index 89% rename from samples/SocketsSample/InvocationDescriptor.cs rename to src/Microsoft.AspNetCore.SignalR/InvocationDescriptor.cs index c19c30851e..e9eb979f37 100644 --- a/samples/SocketsSample/InvocationDescriptor.cs +++ b/src/Microsoft.AspNetCore.SignalR/InvocationDescriptor.cs @@ -1,6 +1,6 @@ using System; -namespace SocketsSample +namespace Microsoft.AspNetCore.SignalR { public class InvocationDescriptor { diff --git a/samples/SocketsSample/InvocationResultDescriptor.cs b/src/Microsoft.AspNetCore.SignalR/InvocationResultDescriptor.cs similarity index 88% rename from samples/SocketsSample/InvocationResultDescriptor.cs rename to src/Microsoft.AspNetCore.SignalR/InvocationResultDescriptor.cs index ef513bf47e..f32b94ee07 100644 --- a/samples/SocketsSample/InvocationResultDescriptor.cs +++ b/src/Microsoft.AspNetCore.SignalR/InvocationResultDescriptor.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -namespace SocketsSample +namespace Microsoft.AspNetCore.SignalR { public class InvocationResultDescriptor { diff --git a/src/Microsoft.AspNetCore.SignalR/Microsoft.AspNetCore.SignalR.xproj b/src/Microsoft.AspNetCore.SignalR/Microsoft.AspNetCore.SignalR.xproj new file mode 100644 index 0000000000..57086c8c46 --- /dev/null +++ b/src/Microsoft.AspNetCore.SignalR/Microsoft.AspNetCore.SignalR.xproj @@ -0,0 +1,21 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + 42e76f87-92b6-45ab-bf07-6b811c0f2cac + Microsoft.AspNetCore.SignalR + .\obj + .\bin\ + v4.5.2 + + + + 2.0 + + + diff --git a/src/Microsoft.AspNetCore.SignalR/Properties/AssemblyInfo.cs b/src/Microsoft.AspNetCore.SignalR/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..2fd952238e --- /dev/null +++ b/src/Microsoft.AspNetCore.SignalR/Properties/AssemblyInfo.cs @@ -0,0 +1,19 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Microsoft.AspNetCore.SignalR")] +[assembly: AssemblyTrademark("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("42e76f87-92b6-45ab-bf07-6b811c0f2cac")] diff --git a/samples/SocketsSample/EndPoints/Hubs/Proxies.cs b/src/Microsoft.AspNetCore.SignalR/Proxies.cs similarity index 97% rename from samples/SocketsSample/EndPoints/Hubs/Proxies.cs rename to src/Microsoft.AspNetCore.SignalR/Proxies.cs index 8f534fa85c..b945444957 100644 --- a/samples/SocketsSample/EndPoints/Hubs/Proxies.cs +++ b/src/Microsoft.AspNetCore.SignalR/Proxies.cs @@ -2,9 +2,8 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Sockets; -using SocketsSample.Hubs; -namespace SocketsSample.EndPoints.Hubs +namespace Microsoft.AspNetCore.SignalR { public class UserProxy : IClientProxy { diff --git a/samples/SocketsSample/EndPoints/RpcEndpoint.cs b/src/Microsoft.AspNetCore.SignalR/RpcEndpoint.cs similarity index 98% rename from samples/SocketsSample/EndPoints/RpcEndpoint.cs rename to src/Microsoft.AspNetCore.SignalR/RpcEndpoint.cs index 8896bae96f..c7fdef4dd7 100644 --- a/samples/SocketsSample/EndPoints/RpcEndpoint.cs +++ b/src/Microsoft.AspNetCore.SignalR/RpcEndpoint.cs @@ -8,8 +8,9 @@ using Microsoft.AspNetCore.Sockets; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -namespace SocketsSample +namespace Microsoft.AspNetCore.SignalR { + // REVIEW: Should there be an RPC package? public class RpcEndpoint : EndPoint where T : class { private readonly Dictionary> _callbacks diff --git a/src/Microsoft.AspNetCore.SignalR/project.json b/src/Microsoft.AspNetCore.SignalR/project.json new file mode 100644 index 0000000000..120263a02e --- /dev/null +++ b/src/Microsoft.AspNetCore.SignalR/project.json @@ -0,0 +1,14 @@ +{ + "version": "1.0.0-*", + + "dependencies": { + "Microsoft.AspNetCore.Sockets": { + "target": "project" + } + }, + + "frameworks": { + "netstandard1.6": { + } + } +}