Skip to content

Commit

Permalink
Merge pull request #146 from dotnet-campus/t/bot/fix-codeformatting
Browse files Browse the repository at this point in the history
[Bot] Automated PR to fix formatting errors
  • Loading branch information
lindexi authored Jan 5, 2024
2 parents 4e31585 + 7186a95 commit c78cd40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,15 @@ protected override void OnHandleNotify(IpcDirectRoutedMessage message, PeerMessa
try
{
// 分为同步和异步两个版本,防止异步版本执行过程没有等待,导致原本期望顺序执行的业务变成了并发执行
if (handleNotify.SyncHandler is {} syncHandler)
if (handleNotify.SyncHandler is { } syncHandler)
{
// 不等了,也没啥业务
_ = IpcProvider.IpcContext.TaskPool.Run(() =>
{
syncHandler(stream, context);
});
}
else if (handleNotify.AsyncHandler is {} asyncHandler)
else if (handleNotify.AsyncHandler is { } asyncHandler)
{
// 不等了,也没啥业务
_ = IpcProvider.IpcContext.TaskPool.Run(async () =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ public void TestNotifyLocalOneByOne()
{
// 初始化服务端
var serverName = "JsonIpcDirectRoutedProviderTest_Test_NotifyLocalOneByOne_1";
var serverProvider = new JsonIpcDirectRoutedProvider(serverName,new IpcConfiguration()
var serverProvider = new JsonIpcDirectRoutedProvider(serverName, new IpcConfiguration()
{
IpcTaskScheduling = IpcTaskScheduling.LocalOneByOne,
});
Expand All @@ -454,7 +454,7 @@ public void TestNotifyLocalOneByOne()
serverProvider.AddNotifyHandler($"Foo{n}", async () =>
{
// 如果是按照顺序进来的,那就是按照数字顺序
Assert.AreEqual(n,count);
Assert.AreEqual(n, count);
count++;
// 模拟异步处理
await Task.Delay(100);
Expand Down

0 comments on commit c78cd40

Please sign in to comment.