Skip to content

Commit 23a19be

Browse files
authored
Merge pull request #157 from acjh/patch-13
Update to use Abp.AspNetCore.SignalR package
2 parents 24f3995 + a813437 commit 23a19be

File tree

16 files changed

+64
-39
lines changed

16 files changed

+64
-39
lines changed

aspnet-core/src/AbpCompanyName.AbpProjectName.Application/AbpCompanyName.AbpProjectName.Application.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</PropertyGroup>
1818

1919
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
20-
<DefineConstants>FEATURE_SIGNALR;FEATURE_SIGNALR_ASPNETCORE</DefineConstants>
20+
<DefineConstants>FEATURE_SIGNALR_ASPNETCORE</DefineConstants>
2121
</PropertyGroup>
2222

2323
<ItemGroup>

aspnet-core/src/AbpCompanyName.AbpProjectName.Application/SignalR/SignalRFeature.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ public static bool IsAvailable
88
{
99
#if FEATURE_SIGNALR
1010
return true;
11+
#elif FEATURE_SIGNALR_ASPNETCORE
12+
return true;
1113
#else
1214
return false;
1315
#endif

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Core/AbpCompanyName.AbpProjectName.Web.Core.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
</PropertyGroup>
1919

2020
<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
21-
<DefineConstants>FEATURE_SIGNALR;FEATURE_SIGNALR_OWIN</DefineConstants>
21+
<DefineConstants>FEATURE_SIGNALR</DefineConstants>
2222
</PropertyGroup>
2323

2424
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
25-
<DefineConstants>FEATURE_SIGNALR</DefineConstants>
25+
<DefineConstants>FEATURE_SIGNALR_ASPNETCORE</DefineConstants>
2626
</PropertyGroup>
2727

2828
<ItemGroup>
@@ -49,7 +49,7 @@
4949
</ItemGroup>
5050

5151
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
52-
<PackageReference Include="Abp.Web.SignalR.AspNetCore" Version="3.3.0" />
52+
<PackageReference Include="Abp.AspNetCore.SignalR" Version="3.3.0-preview1" />
5353
</ItemGroup>
5454

5555
</Project>

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Core/AbpProjectNameWebCoreModule.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
#if FEATURE_SIGNALR
1616
using Abp.Web.SignalR;
17+
#elif FEATURE_SIGNALR_ASPNETCORE
18+
using Abp.AspNetCore.SignalR;
1719
#endif
1820

1921
namespace AbpCompanyName.AbpProjectName
@@ -24,6 +26,8 @@ namespace AbpCompanyName.AbpProjectName
2426
typeof(AbpAspNetCoreModule)
2527
#if FEATURE_SIGNALR
2628
,typeof(AbpWebSignalRModule)
29+
#elif FEATURE_SIGNALR_ASPNETCORE
30+
,typeof(AbpAspNetCoreSignalRModule)
2731
#endif
2832
)]
2933
public class AbpProjectNameWebCoreModule : AbpModule

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Core/Owin/BuilderExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if FEATURE_SIGNALR_OWIN
1+
#if FEATURE_SIGNALR
22
using System;
33
using System.Collections.Generic;
44
using System.Threading.Tasks;

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Host/AbpCompanyName.AbpProjectName.Web.Host.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
</PropertyGroup>
1212

1313
<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
14-
<DefineConstants>FEATURE_SIGNALR;FEATURE_SIGNALR_OWIN</DefineConstants>
14+
<DefineConstants>FEATURE_SIGNALR</DefineConstants>
1515
</PropertyGroup>
1616

1717
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
18-
<DefineConstants>FEATURE_SIGNALR;FEATURE_SIGNALR_ASPNETCORE</DefineConstants>
18+
<DefineConstants>FEATURE_SIGNALR_ASPNETCORE</DefineConstants>
1919
</PropertyGroup>
2020

2121
<ItemGroup>

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Host/Startup/Startup.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,14 @@
1515
using AbpCompanyName.AbpProjectName.Configuration;
1616
using AbpCompanyName.AbpProjectName.Identity;
1717

18-
#if FEATURE_SIGNALR_OWIN
18+
#if FEATURE_SIGNALR
1919
using Microsoft.AspNet.SignalR;
2020
using Microsoft.Owin.Cors;
2121
using Owin;
2222
using Abp.Owin;
2323
using AbpCompanyName.AbpProjectName.Owin;
24-
#endif
25-
26-
#if FEATURE_SIGNALR_ASPNETCORE
27-
using Abp.Web.SignalR.Hubs;
24+
#elif FEATURE_SIGNALR_ASPNETCORE
25+
using Abp.AspNetCore.SignalR.Hubs;
2826
#endif
2927

3028
namespace AbpCompanyName.AbpProjectName.Web.Host.Startup
@@ -112,12 +110,10 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
112110

113111
app.UseAbpRequestLocalization();
114112

115-
#if FEATURE_SIGNALR_OWIN
113+
#if FEATURE_SIGNALR
116114
// Integrate with OWIN
117115
app.UseAppBuilder(ConfigureOwinServices);
118-
#endif
119-
120-
#if FEATURE_SIGNALR_ASPNETCORE
116+
#elif FEATURE_SIGNALR_ASPNETCORE
121117
app.UseSignalR(routes =>
122118
{
123119
routes.MapHub<AbpCommonHub>("/signalr");
@@ -146,7 +142,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
146142
}); // URL: /swagger
147143
}
148144

149-
#if FEATURE_SIGNALR_OWIN
145+
#if FEATURE_SIGNALR
150146
private static void ConfigureOwinServices(IAppBuilder app)
151147
{
152148
app.Properties["host.AppName"] = "AbpProjectName";

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/AbpCompanyName.AbpProjectName.Web.Mvc.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
</PropertyGroup>
1313

1414
<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
15-
<DefineConstants>FEATURE_SIGNALR;FEATURE_SIGNALR_OWIN</DefineConstants>
15+
<DefineConstants>FEATURE_SIGNALR</DefineConstants>
1616
</PropertyGroup>
1717

1818
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
19-
<DefineConstants>FEATURE_SIGNALR;FEATURE_SIGNALR_ASPNETCORE</DefineConstants>
19+
<DefineConstants>FEATURE_SIGNALR_ASPNETCORE</DefineConstants>
2020
</PropertyGroup>
2121

2222
<ItemGroup>

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Startup/Startup.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@
1313
using AbpCompanyName.AbpProjectName.Identity;
1414
using AbpCompanyName.AbpProjectName.Web.Resources;
1515

16-
#if FEATURE_SIGNALR_OWIN
16+
#if FEATURE_SIGNALR
1717
using Owin;
1818
using Abp.Owin;
1919
using AbpCompanyName.AbpProjectName.Owin;
20-
#endif
21-
22-
#if FEATURE_SIGNALR_ASPNETCORE
23-
using Abp.Web.SignalR.Hubs;
20+
#elif FEATURE_SIGNALR_ASPNETCORE
21+
using Abp.AspNetCore.SignalR.Hubs;
2422
#endif
2523

2624
namespace AbpCompanyName.AbpProjectName.Web.Startup
@@ -78,12 +76,10 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
7876

7977
app.UseJwtTokenMiddleware();
8078

81-
#if FEATURE_SIGNALR_OWIN
79+
#if FEATURE_SIGNALR
8280
// Integrate with OWIN
8381
app.UseAppBuilder(ConfigureOwinServices);
84-
#endif
85-
86-
#if FEATURE_SIGNALR_ASPNETCORE
82+
#elif FEATURE_SIGNALR_ASPNETCORE
8783
app.UseSignalR(routes =>
8884
{
8985
routes.MapHub<AbpCommonHub>("/signalr");
@@ -102,7 +98,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
10298
});
10399
}
104100

105-
#if FEATURE_SIGNALR_OWIN
101+
#if FEATURE_SIGNALR
106102
private static void ConfigureOwinServices(IAppBuilder app)
107103
{
108104
app.Properties["host.AppName"] = "AbpProjectName";

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/wwwroot/lib/abp-web-resources/.bower.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"authors": [
55
"Halil İbrahim Kalkan"
66
],
7-
"version": "3.2.3",
7+
"version": "3.3.0",
88
"description": "Script and style resources for ASP.NET Boilerplate based web projects.",
99
"main": "Abp/Framework/scripts/abp.js",
1010
"moduleType": [],
@@ -25,10 +25,10 @@
2525
".nuget",
2626
"packages"
2727
],
28-
"_release": "3.2.3",
28+
"_release": "3.3.0",
2929
"_resolution": {
3030
"type": "version",
31-
"tag": "v3.2.3",
31+
"tag": "v3.3.0",
3232
"commit": "5a6ff004cd1a55384dc8697dee3f06009d72e4ae"
3333
},
3434
"_source": "https://github.com/aspnetboilerplate/bower-abp-resources.git",

0 commit comments

Comments
 (0)