-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix:isolation * fix:oss isolation and event dispatcher order * fix:code smell
- Loading branch information
Showing
13 changed files
with
129 additions
and
45 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/BuildingBlocks/Isolation/Masa.BuildingBlocks.Isolation/Internal/ComponentConfigUtils.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
9 changes: 9 additions & 0 deletions
9
src/BuildingBlocks/StackSdks/Masa.BuildingBlocks.StackSdks.Isolation/DccConsts.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,9 @@ | ||
// Copyright (c) MASA Stack All rights reserved. | ||
// Licensed under the MIT License. See LICENSE.txt in the project root for license information. | ||
|
||
namespace Masa.BuildingBlocks.StackSdks.Isolation; | ||
|
||
public static class DccConsts | ||
{ | ||
public const string PUBLIC_ID = "public-$Config"; | ||
} |
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
2 changes: 1 addition & 1 deletion
2
src/Contrib/Dispatcher/Masa.Contrib.Dispatcher.Events/Internal/Dispatch/LocalEventBus.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
2 changes: 1 addition & 1 deletion
2
...patcher/Tests/Masa.Contrib.Dispatcher.Events.Tests/EventHandlers/MarketingEventHandler.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
9 changes: 9 additions & 0 deletions
9
...dWriteSplitting/Tests/Masa.Contrib.ReadWriteSplitting.Cqrs.Tests/Commands/OrderCommand.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,9 @@ | ||
// Copyright (c) MASA Stack All rights reserved. | ||
// Licensed under the MIT License. See LICENSE.txt in the project root for license information. | ||
|
||
namespace Masa.Contrib.ReadWriteSplitting.Cqrs.Tests.Commands; | ||
|
||
internal record OrderCommand(bool Cancel) : Command | ||
{ | ||
public int Count { get; set; } | ||
} |
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
43 changes: 43 additions & 0 deletions
43
...eadWriteSplitting/Tests/Masa.Contrib.ReadWriteSplitting.Cqrs.Tests/OrderCommandHandler.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,43 @@ | ||
// Copyright (c) MASA Stack All rights reserved. | ||
// Licensed under the MIT License. See LICENSE.txt in the project root for license information. | ||
|
||
namespace Masa.Contrib.ReadWriteSplitting.Cqrs.Tests; | ||
|
||
#pragma warning disable CA1822 | ||
internal class OrderCommandHandler | ||
{ | ||
[EventHandler] | ||
public void Handler(OrderCommand command) | ||
{ | ||
command.Count = int.MaxValue; | ||
if (command.Cancel) | ||
{ | ||
throw new Exception("cancel"); | ||
} | ||
} | ||
|
||
[EventHandler(1)] | ||
public void Handler1(OrderCommand command) | ||
{ | ||
command.Count = 1; | ||
} | ||
|
||
[EventHandler(2)] | ||
public void Handler2(OrderCommand command) | ||
{ | ||
command.Count = 2; | ||
} | ||
|
||
[EventHandler(1, IsCancel = true)] | ||
public void HandlerCancel1(OrderCommand command) | ||
{ | ||
command.Count = 0; | ||
} | ||
|
||
[EventHandler(2, IsCancel = true)] | ||
public void HandlerCancel2(OrderCommand command) | ||
{ | ||
command.Count = 1; | ||
} | ||
} | ||
#pragma warning restore CA1822 |
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