-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from viazure/feature_接入消息通知服务
Feature 接入消息通知服务
- Loading branch information
Showing
23 changed files
with
445 additions
and
123 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" /> | ||
<PackageVersion Include="Serilog.Extensions.Hosting" Version="8.0.0" /> | ||
<PackageVersion Include="Serilog.Settings.Configuration" Version="8.0.0" /> | ||
<PackageVersion Include="Serilog.Sinks.Console" Version="5.0.1" /> | ||
<PackageVersion Include="Serilog.Sinks.File" Version="5.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" /> | ||
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" /> | ||
<PackageVersion Include="AngleSharp" Version="1.1.2" /> | ||
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" /> | ||
<PackageVersion Include="Moq" Version="4.20.70" /> | ||
<PackageVersion Include="MSTest.TestAdapter" Version="3.2.2" /> | ||
<PackageVersion Include="MSTest.TestFramework" Version="3.2.2" /> | ||
<PackageVersion Include="coverlet.collector" Version="6.0.1"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageVersion> | ||
<PackageVersion Include="xunit" Version="2.7.0" /> | ||
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageVersion> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" /> | ||
<PackageVersion Include="Serilog.Extensions.Hosting" Version="8.0.0" /> | ||
<PackageVersion Include="Serilog.Settings.Configuration" Version="8.0.2" /> | ||
<PackageVersion Include="Serilog.Sinks.Console" Version="6.0.0" /> | ||
<PackageVersion Include="Serilog.Sinks.File" Version="6.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" /> | ||
<PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" /> | ||
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" /> | ||
<PackageVersion Include="AngleSharp" Version="1.1.2" /> | ||
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" /> | ||
<PackageVersion Include="Moq" Version="4.20.72" /> | ||
<PackageVersion Include="MSTest.TestAdapter" Version="3.6.1" /> | ||
<PackageVersion Include="MSTest.TestFramework" Version="3.6.1" /> | ||
<PackageVersion Include="coverlet.collector" Version="6.0.2"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageVersion> | ||
<PackageVersion Include="xunit" Version="2.9.2" /> | ||
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageVersion> | ||
</ItemGroup> | ||
</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
21 changes: 21 additions & 0 deletions
21
src/EudicSyncToMaiMemo.Infrastructure/Exceptions/ConfigurationException.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
namespace EudicSyncToMaiMemo.Infrastructure.Exceptions | ||
{ | ||
/// <summary> | ||
/// 配置信息异常 | ||
/// </summary> | ||
[Serializable] | ||
public class ConfigurationException : Exception | ||
{ | ||
public ConfigurationException() | ||
{ | ||
} | ||
|
||
public ConfigurationException(string? message) : base(message) | ||
{ | ||
} | ||
|
||
public ConfigurationException(string? message, Exception? innerException) : base(message, innerException) | ||
{ | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/EudicSyncToMaiMemo.Infrastructure/Exceptions/NotificationException.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
namespace EudicSyncToMaiMemo.Infrastructure.Exceptions | ||
{ | ||
/// <summary> | ||
/// 消息通知异常 | ||
/// </summary> | ||
[Serializable] | ||
public class NotificationException : Exception | ||
{ | ||
public NotificationException() | ||
{ | ||
} | ||
|
||
public NotificationException(string? message) : base(message) | ||
{ | ||
} | ||
|
||
public NotificationException(string? message, Exception? innerException) : base(message, innerException) | ||
{ | ||
} | ||
} | ||
} |
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
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
17 changes: 17 additions & 0 deletions
17
src/EudicSyncToMaiMemo.Models/DTOs/Notification/NotificationMessageDto.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace EudicSyncToMaiMemo.Models.DTOs.Notification | ||
{ | ||
/// <summary> | ||
/// 消息通知 DTO | ||
/// </summary> | ||
public class NotificationMessageDto | ||
{ | ||
/// <summary> | ||
/// 通知消息内容 | ||
/// </summary> | ||
public string Message { get; set; } = string.Empty; | ||
/// <summary> | ||
/// 同步的单词总数量 | ||
/// </summary> | ||
public int Total { get; set; } | ||
} | ||
} |
Oops, something went wrong.