-
Notifications
You must be signed in to change notification settings - Fork 933
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Async Before-/AfterTransactionCompletionProcess (#1452)
* Replace TransactionCompletion delegates with interfaces Co-authored-by: Alexander Zaytsev <[email protected]>
- Loading branch information
Showing
22 changed files
with
500 additions
and
140 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
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
14 changes: 14 additions & 0 deletions
14
src/NHibernate/Action/IAfterTransactionCompletionProcess.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,14 @@ | ||
namespace NHibernate.Action | ||
{ | ||
/// <summary> | ||
/// Contract representing some process that needs to occur during after transaction completion. | ||
/// </summary> | ||
public partial interface IAfterTransactionCompletionProcess | ||
{ | ||
/// <summary> | ||
/// Perform whatever processing is encapsulated here after completion of the transaction. | ||
/// </summary> | ||
/// <param name="success">Did the transaction complete successfully? True means it did.</param> | ||
void ExecuteAfterTransactionCompletion(bool success); | ||
} | ||
} |
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,20 @@ | ||
namespace NHibernate.Action | ||
{ | ||
/// <summary> | ||
/// An extension to <see cref="IExecutable"/> which allows async cleanup operations to be | ||
/// scheduled on transaction completion. | ||
/// </summary> | ||
//6.0 TODO: Merge into IExecutable | ||
public interface IAsyncExecutable : IExecutable | ||
{ | ||
/// <summary> | ||
/// Get the before-transaction-completion process, if any, for this action. | ||
/// </summary> | ||
new IBeforeTransactionCompletionProcess BeforeTransactionCompletionProcess { get; } | ||
|
||
/// <summary> | ||
/// Get the after-transaction-completion process, if any, for this action. | ||
/// </summary> | ||
new IAfterTransactionCompletionProcess AfterTransactionCompletionProcess { get; } | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/NHibernate/Action/IBeforeTransactionCompletionProcess.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,13 @@ | ||
namespace NHibernate.Action | ||
{ | ||
/// <summary> | ||
/// Contract representing some process that needs to occur during before transaction completion. | ||
/// </summary> | ||
public partial interface IBeforeTransactionCompletionProcess | ||
{ | ||
/// <summary> | ||
/// Perform whatever processing is encapsulated here before completion of the transaction. | ||
/// </summary> | ||
void ExecuteBeforeTransactionCompletion(); | ||
} | ||
} |
Oops, something went wrong.