Skip to content

Commit bb9d5aa

Browse files
committed
#265: working on removing Abp.Web.SignalR
1 parent 6745e78 commit bb9d5aa

File tree

15 files changed

+24
-222
lines changed

15 files changed

+24
-222
lines changed

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@
1212
<RootNamespace>AbpCompanyName.AbpProjectName</RootNamespace>
1313
</PropertyGroup>
1414

15-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
16-
<DefineConstants>FEATURE_SIGNALR</DefineConstants>
17-
</PropertyGroup>
18-
19-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
20-
<DefineConstants>FEATURE_SIGNALR_ASPNETCORE</DefineConstants>
21-
</PropertyGroup>
22-
2315
<ItemGroup>
2416
<ProjectReference Include="..\AbpCompanyName.AbpProjectName.Core\AbpCompanyName.AbpProjectName.Core.csproj" />
2517
</ItemGroup>

aspnet-core/src/AbpCompanyName.AbpProjectName.Application/Sessions/SessionAppService.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Threading.Tasks;
33
using Abp.Auditing;
44
using AbpCompanyName.AbpProjectName.Sessions.Dto;
5-
using AbpCompanyName.AbpProjectName.SignalR;
65

76
namespace AbpCompanyName.AbpProjectName.Sessions
87
{
@@ -17,11 +16,7 @@ public async Task<GetCurrentLoginInformationsOutput> GetCurrentLoginInformations
1716
{
1817
Version = AppVersionHelper.Version,
1918
ReleaseDate = AppVersionHelper.ReleaseDate,
20-
Features = new Dictionary<string, bool>
21-
{
22-
{ "SignalR", SignalRFeature.IsAvailable },
23-
{ "SignalR.AspNetCore", SignalRFeature.IsAspNetCore }
24-
}
19+
Features = new Dictionary<string, bool>()
2520
}
2621
};
2722

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

Lines changed: 0 additions & 31 deletions
This file was deleted.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
</ItemGroup>
1919

2020
<ItemGroup>
21-
<PackageReference Include="Abp.AutoMapper" Version="3.7.0" />
22-
<PackageReference Include="Abp.ZeroCore.EntityFrameworkCore" Version="3.7.0" />
21+
<PackageReference Include="Abp.AutoMapper" Version="3.7.2" />
22+
<PackageReference Include="Abp.ZeroCore.EntityFrameworkCore" Version="3.7.2" />
2323
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.1.0" />
2424
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.0" />
2525
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="2.1.0" />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</ItemGroup>
1919

2020
<ItemGroup>
21-
<PackageReference Include="Abp.Castle.Log4Net" Version="3.7.0" />
21+
<PackageReference Include="Abp.Castle.Log4Net" Version="3.7.2" />
2222
</ItemGroup>
2323

2424
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">

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

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,39 +17,24 @@
1717
<RootNamespace>AbpCompanyName.AbpProjectName</RootNamespace>
1818
</PropertyGroup>
1919

20-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
21-
<DefineConstants>FEATURE_SIGNALR</DefineConstants>
22-
</PropertyGroup>
23-
24-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
25-
<DefineConstants>FEATURE_SIGNALR_ASPNETCORE</DefineConstants>
26-
</PropertyGroup>
27-
28-
<ItemGroup>
20+
<ItemGroup>
2921
<ProjectReference Include="..\AbpCompanyName.AbpProjectName.Application\AbpCompanyName.AbpProjectName.Application.csproj" />
3022
<ProjectReference Include="..\AbpCompanyName.AbpProjectName.EntityFrameworkCore\AbpCompanyName.AbpProjectName.EntityFrameworkCore.csproj" />
3123
</ItemGroup>
3224

3325
<ItemGroup>
3426
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
3527
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.0" />
36-
<PackageReference Include="Microsoft.AspNetCore.Owin" Version="2.1.0" />
3728
<PackageReference Include="Swashbuckle.AspNetCore" Version="2.5.0" />
38-
<PackageReference Include="Abp.AspNetCore" Version="3.7.0" />
39-
<PackageReference Include="Abp.ZeroCore" Version="3.7.0" />
29+
<PackageReference Include="Abp.AspNetCore" Version="3.7.2" />
30+
<PackageReference Include="Abp.ZeroCore" Version="3.7.2" />
4031
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.0" />
32+
<PackageReference Include="Abp.AspNetCore.SignalR" Version="3.7.2" />
4133
</ItemGroup>
4234

4335
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
4436
<Reference Include="System" />
4537
<Reference Include="Microsoft.CSharp" />
46-
47-
<PackageReference Include="Abp.Web.SignalR" Version="3.7.0" />
48-
<PackageReference Include="Abp.Owin" Version="3.7.0" />
49-
</ItemGroup>
50-
51-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
52-
<PackageReference Include="Abp.AspNetCore.SignalR" Version="3.7.0" />
5338
</ItemGroup>
5439

5540
</Project>

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,21 @@
55
using Microsoft.IdentityModel.Tokens;
66
using Abp.AspNetCore;
77
using Abp.AspNetCore.Configuration;
8+
using Abp.AspNetCore.SignalR;
89
using Abp.Modules;
910
using Abp.Reflection.Extensions;
1011
using Abp.Zero.Configuration;
1112
using AbpCompanyName.AbpProjectName.Authentication.JwtBearer;
1213
using AbpCompanyName.AbpProjectName.Configuration;
1314
using AbpCompanyName.AbpProjectName.EntityFrameworkCore;
1415

15-
#if FEATURE_SIGNALR
16-
using Abp.Web.SignalR;
17-
#elif FEATURE_SIGNALR_ASPNETCORE
18-
using Abp.AspNetCore.SignalR;
19-
#endif
20-
2116
namespace AbpCompanyName.AbpProjectName
2217
{
2318
[DependsOn(
2419
typeof(AbpProjectNameApplicationModule),
2520
typeof(AbpProjectNameEntityFrameworkModule),
2621
typeof(AbpAspNetCoreModule)
27-
#if FEATURE_SIGNALR
28-
,typeof(AbpWebSignalRModule)
29-
#elif FEATURE_SIGNALR_ASPNETCORE
3022
,typeof(AbpAspNetCoreSignalRModule)
31-
#endif
3223
)]
3324
public class AbpProjectNameWebCoreModule : AbpModule
3425
{

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

Lines changed: 0 additions & 38 deletions
This file was deleted.

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

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@
1010
<UserSecretsId>AbpCompanyName-AbpProjectName-56C2EF2F-ABD6-4EFC-AAF2-2E81C34E8FB1</UserSecretsId>
1111
</PropertyGroup>
1212

13-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
14-
<DefineConstants>FEATURE_SIGNALR</DefineConstants>
15-
</PropertyGroup>
16-
17-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
18-
<DefineConstants>FEATURE_SIGNALR_ASPNETCORE</DefineConstants>
19-
</PropertyGroup>
20-
2113
<ItemGroup>
2214
<Content Remove="wwwroot\swagger\ui\index.html" />
2315
</ItemGroup>
@@ -53,14 +45,12 @@
5345
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.1.0" />
5446
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.1.0" />
5547
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.0" />
56-
<PackageReference Include="Abp.Castle.Log4Net" Version="3.7.0" />
48+
<PackageReference Include="Abp.Castle.Log4Net" Version="3.7.2" />
5749
</ItemGroup>
5850

5951
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
6052
<Reference Include="System" />
6153
<Reference Include="Microsoft.CSharp" />
62-
63-
<PackageReference Include="Microsoft.Owin.Cors" Version="3.1.0" />
6454
</ItemGroup>
6555

6656
<ItemGroup>

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

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,7 @@
1616
using AbpCompanyName.AbpProjectName.Configuration;
1717
using AbpCompanyName.AbpProjectName.Identity;
1818

19-
#if FEATURE_SIGNALR
20-
using Microsoft.AspNet.SignalR;
21-
using Microsoft.Owin.Cors;
22-
using Owin;
23-
using Abp.Owin;
24-
using AbpCompanyName.AbpProjectName.Owin;
25-
#elif FEATURE_SIGNALR_ASPNETCORE
2619
using Abp.AspNetCore.SignalR.Hubs;
27-
#endif
2820

2921
namespace AbpCompanyName.AbpProjectName.Web.Host.Startup
3022
{
@@ -49,9 +41,7 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
4941
IdentityRegistrar.Register(services);
5042
AuthConfigurer.Configure(services, _appConfiguration);
5143

52-
#if FEATURE_SIGNALR_ASPNETCORE
5344
services.AddSignalR();
54-
#endif
5545

5646
// Configure CORS for angular2 UI
5747
services.AddCors(
@@ -67,9 +57,7 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
6757
)
6858
.AllowAnyHeader()
6959
.AllowAnyMethod()
70-
#if FEATURE_SIGNALR_ASPNETCORE
7160
.AllowCredentials()
72-
#endif
7361
)
7462
);
7563

@@ -112,15 +100,11 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
112100

113101
app.UseAbpRequestLocalization();
114102

115-
#if FEATURE_SIGNALR
116-
// Integrate with OWIN
117-
app.UseAppBuilder(ConfigureOwinServices);
118-
#elif FEATURE_SIGNALR_ASPNETCORE
103+
119104
app.UseSignalR(routes =>
120105
{
121106
routes.MapHub<AbpCommonHub>("/signalr");
122107
});
123-
#endif
124108

125109
app.UseMvc(routes =>
126110
{
@@ -143,24 +127,5 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
143127
.GetManifestResourceStream("AbpCompanyName.AbpProjectName.Web.Host.wwwroot.swagger.ui.index.html");
144128
}); // URL: /swagger
145129
}
146-
147-
#if FEATURE_SIGNALR
148-
private static void ConfigureOwinServices(IAppBuilder app)
149-
{
150-
app.Properties["host.AppName"] = "AbpProjectName";
151-
152-
app.UseAbp();
153-
154-
app.Map("/signalr", map =>
155-
{
156-
map.UseCors(CorsOptions.AllowAll);
157-
var hubConfiguration = new HubConfiguration
158-
{
159-
EnableJSONP = true
160-
};
161-
map.RunSignalR(hubConfiguration);
162-
});
163-
}
164-
#endif
165130
}
166131
}

0 commit comments

Comments
 (0)