Skip to content

Commit 073f42a

Browse files
committed
添加注释和修复一点可空
1 parent a06b265 commit 073f42a

File tree

6 files changed

+21
-6
lines changed

6 files changed

+21
-6
lines changed

src/PipeMvc/dotnetCampus.Ipc.PipeMvcShare/HttpResponseMessageSerializeContent.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public HttpResponseMessageSerializeContent(HttpResponseMessage message) : base(m
1313
ContentHeaders = message.Content?.Headers;
1414
}
1515
public HttpResponseHeaders Headers { get; set; }
16+
#nullable enable
1617
public HttpContentHeaders? ContentHeaders { get; set; }
1718
}
1819
}

src/dotnetCampus.Ipc/Context/IpcClientRequestArgs.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public class IpcClientRequestArgs : EventArgs
1414
/// </summary>
1515
/// <param name="messageId"></param>
1616
/// <param name="ipcBufferMessage"></param>
17+
/// <param name="messageCommandType">消息命令类型</param>
1718
internal IpcClientRequestArgs(in IpcClientRequestMessageId messageId, in IpcMessageBody ipcBufferMessage, IpcMessageCommandType messageCommandType)
1819
{
1920
MessageId = messageId;

src/dotnetCampus.Ipc/Context/IpcConfigurationExtensions.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,17 @@
33

44
namespace dotnetCampus.Ipc.Context;
55

6+
/// <summary>
7+
/// IPC 配置扩展
8+
/// </summary>
69
public static class IpcConfigurationExtensions
710
{
11+
/// <summary>
12+
/// 使用 Newtonsoft.Json 作为 IPC 对象序列化器
13+
/// </summary>
14+
/// <param name="configuration"></param>
15+
/// <param name="jsonSerializer"></param>
16+
/// <returns></returns>
817
public static IpcConfiguration UseNewtonsoftJsonIpcObjectSerializer(this IpcConfiguration configuration, JsonSerializer? jsonSerializer)
918
{
1019
if (jsonSerializer is null)
@@ -20,6 +29,12 @@ public static IpcConfiguration UseNewtonsoftJsonIpcObjectSerializer(this IpcConf
2029
}
2130

2231
#if NET6_0_OR_GREATER
32+
/// <summary>
33+
/// 使用 System.Text.Json 作为 IPC 对象序列化器
34+
/// </summary>
35+
/// <param name="configuration"></param>
36+
/// <param name="context"></param>
37+
/// <returns></returns>
2338
public static IpcConfiguration UseSystemJsonIpcObjectSerializer(this IpcConfiguration configuration,
2439
System.Text.Json.Serialization.JsonSerializerContext context)
2540
{

tests/dotnetCampus.Ipc.Tests/CompilerServices/Fake/FakeIpcObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public FakeIpcObject(INestedFakeIpcArgumentOrReturn jointSideObject)
3131
public string? NullableStringProperty { get; set; } = "Title";
3232
#nullable restore
3333

34-
#nullable disable
34+
#nullable enable
3535
public string? NonNullableStringProperty { get; set; } = "Description";
3636
#nullable restore
3737

tests/dotnetCampus.Ipc.Tests/CompilerServices/Fake/IFakeIpcObjectBase.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22
{
33
internal interface IFakeIpcObjectBase
44
{
5-
#nullable enable
65
string? NullableStringProperty { get; set; }
7-
#nullable restore
8-
#nullable disable
6+
97
string? NonNullableStringProperty { get; set; }
10-
#nullable restore
118
}
129
}

tests/dotnetCampus.Ipc.Tests/CompilerServices/GeneratedProxies/NotGeneratedTestOnlyFakeIpcObjectIpcShape.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Reflection;
1+
#nullable disable
2+
using System.Reflection;
23
using dotnetCampus.Ipc.CompilerServices.Attributes;
34
using dotnetCampus.Ipc.Tests.CompilerServices.Fake;
45

0 commit comments

Comments
 (0)