-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplified source generation using attribute
- Loading branch information
Showing
59 changed files
with
130 additions
and
11 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
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
namespace Cleipnir.Flows; | ||
|
||
[System.AttributeUsage(System.AttributeTargets.Class)] | ||
public class GenerateFlowsAttribute : System.Attribute; |
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
3 changes: 1 addition & 2 deletions
3
...s/Cleipnir.Flows.Sample.Presentation.AspNet/Flows/MessageDriven/MessageDrivenOrderFlow.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
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
1 change: 1 addition & 0 deletions
1
Samples/Cleipnir.Flows.Sample.Presentation/A_OrderFlowRpc/OrderFlow.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
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
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
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
1 change: 1 addition & 0 deletions
1
Samples/Cleipnir.Flows.Sample.Presentation/E_CustomerSignup/SignupFlow.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
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
1 change: 1 addition & 0 deletions
1
Samples/Cleipnir.Flows.Sample.Presentation/G_SupportTicket/SupportTicketFlow.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
29 changes: 29 additions & 0 deletions
29
Samples/Cleipnir.Flows.Sample.Presentation/H_BankTransfer/Example.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,29 @@ | ||
using Cleipnir.ResilientFunctions.PostgreSQL; | ||
|
||
namespace Cleipnir.Flows.Sample.Presentation.H_BankTransfer; | ||
|
||
public static class Example | ||
{ | ||
public static async Task Perform() | ||
{ | ||
var serviceCollection = new ServiceCollection(); | ||
serviceCollection.AddTransient<TransferFlow>(); | ||
|
||
var connStr = "Server=localhost;Database=presentation;User Id=postgres;Password=Pa55word!; Include Error Detail=true;"; | ||
await DatabaseHelper.CreateDatabaseIfNotExists(connStr); | ||
var store = new PostgreSqlFunctionStore(connStr); | ||
await store.Initialize(); | ||
|
||
var flowsContainer = new FlowsContainer( | ||
store, | ||
serviceCollection.BuildServiceProvider(), | ||
Options.Default | ||
); | ||
|
||
var transferFlows = new TransferFlows(flowsContainer); | ||
var transactionId = Guid.NewGuid(); | ||
await transferFlows.Run( | ||
transactionId.ToString(), new Transfer(transactionId, "FROM_ACC123", "TO_ACC456", Amount: 100) | ||
); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
Samples/Cleipnir.Flows.Sample.Presentation/H_BankTransfer/Solution/Example.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,29 @@ | ||
using Cleipnir.ResilientFunctions.PostgreSQL; | ||
|
||
namespace Cleipnir.Flows.Sample.Presentation.H_BankTransfer.Solution; | ||
|
||
public static class Example | ||
{ | ||
public static async Task Perform() | ||
{ | ||
var serviceCollection = new ServiceCollection(); | ||
serviceCollection.AddTransient<TransferFlow>(); | ||
|
||
var connStr = "Server=localhost;Database=presentation;User Id=postgres;Password=Pa55word!; Include Error Detail=true;"; | ||
await DatabaseHelper.CreateDatabaseIfNotExists(connStr); | ||
var store = new PostgreSqlFunctionStore(connStr); | ||
await store.Initialize(); | ||
|
||
var flowsContainer = new FlowsContainer( | ||
store, | ||
serviceCollection.BuildServiceProvider(), | ||
Options.Default | ||
); | ||
|
||
var transferFlows = new TransferFlows(flowsContainer); | ||
var transactionId = Guid.NewGuid(); | ||
await transferFlows.Run( | ||
transactionId.ToString(), new Transfer(transactionId, "FROM_ACC123", "TO_ACC456", Amount: 100) | ||
); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
Samples/Cleipnir.Flows.Sample.Presentation/H_BankTransfer/Solution/TransferFlow.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
1 change: 1 addition & 0 deletions
1
Samples/Cleipnir.Flows.Sample.Presentation/H_BankTransfer/TransferFlow.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
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
1 change: 1 addition & 0 deletions
1
Samples/Cleipnir.Flows.Sample.Presentation/Solutions/A_OrderFlowRpc/OrderFlow0.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
1 change: 1 addition & 0 deletions
1
Samples/Cleipnir.Flows.Sample.Presentation/Solutions/A_OrderFlowRpc/OrderFlow1.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
3 changes: 1 addition & 2 deletions
3
Samples/Cleipnir.Flows.Sample.Presentation/Solutions/A_OrderFlowRpc/OrderFlow2.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
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
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
Oops, something went wrong.