-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
41 changed files
with
21,597 additions
and
8,446 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<Project> | ||
<PropertyGroup> | ||
|
||
<AbpVersion>8.3.2</AbpVersion> | ||
<EasyAbpAbpTencentCloudModuleVersion>1.18.0</EasyAbpAbpTencentCloudModuleVersion> | ||
<AbpVersion>9.0.2</AbpVersion> | ||
<EasyAbpAbpTencentCloudModuleVersion>1.19.0</EasyAbpAbpTencentCloudModuleVersion> | ||
|
||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 41 additions & 36 deletions
77
host/EasyAbp.Abp.Sms.TencentCloud.HttpApi.Host/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,56 @@ | ||
using System; | ||
using System.IO; | ||
using Microsoft.AspNetCore.Hosting; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Builder; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Extensions.Hosting; | ||
using Serilog; | ||
using Serilog.Events; | ||
|
||
namespace EasyAbp.Abp.Sms.TencentCloud | ||
namespace EasyAbp.Abp.Sms.TencentCloud; | ||
|
||
public class Program | ||
{ | ||
public class Program | ||
public async static Task<int> Main(string[] args) | ||
{ | ||
public static int Main(string[] args) | ||
{ | ||
Log.Logger = new LoggerConfiguration() | ||
Log.Logger = new LoggerConfiguration() | ||
#if DEBUG | ||
.MinimumLevel.Debug() | ||
.MinimumLevel.Debug() | ||
#else | ||
.MinimumLevel.Information() | ||
.MinimumLevel.Information() | ||
#endif | ||
.MinimumLevel.Override("Microsoft", LogEventLevel.Information) | ||
.Enrich.FromLogContext() | ||
.WriteTo.File("Logs/logs.txt") | ||
.CreateLogger(); | ||
.MinimumLevel.Override("Microsoft", LogEventLevel.Information) | ||
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning) | ||
.Enrich.FromLogContext() | ||
.WriteTo.Async(c => c.File("Logs/logs.txt")) | ||
.WriteTo.Async(c => c.Console()) | ||
.CreateLogger(); | ||
|
||
try | ||
{ | ||
Log.Information("Starting web host."); | ||
CreateHostBuilder(args).Build().Run(); | ||
return 0; | ||
} | ||
catch (Exception ex) | ||
{ | ||
Log.Fatal(ex, "Host terminated unexpectedly!"); | ||
return 1; | ||
} | ||
finally | ||
try | ||
{ | ||
Log.Information("Starting web host."); | ||
var builder = WebApplication.CreateBuilder(args); | ||
builder.Host.AddAppSettingsSecretsJson() | ||
.UseAutofac() | ||
.UseSerilog(); | ||
await builder.AddApplicationAsync<TencentCloudHttpApiHostModule>(); | ||
var app = builder.Build(); | ||
await app.InitializeApplicationAsync(); | ||
await app.RunAsync(); | ||
return 0; | ||
} | ||
catch (Exception ex) | ||
{ | ||
if (ex is HostAbortedException) | ||
{ | ||
Log.CloseAndFlush(); | ||
throw; | ||
} | ||
} | ||
|
||
internal static IHostBuilder CreateHostBuilder(string[] args) => | ||
Host.CreateDefaultBuilder(args) | ||
.ConfigureWebHostDefaults(webBuilder => | ||
{ | ||
webBuilder.UseStartup<Startup>(); | ||
}) | ||
.UseAutofac() | ||
.UseSerilog(); | ||
Log.Fatal(ex, "Host terminated unexpectedly!"); | ||
return 1; | ||
} | ||
finally | ||
{ | ||
Log.CloseAndFlush(); | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 6 additions & 5 deletions
11
...bp.Abp.Sms.TencentCloud.IdentityServer/EasyAbp.Abp.Sms.TencentCloud.IdentityServer.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.