Class SilverbackContextStorageExtensions
Adds the storage-specific methods to the ISilverbackContext.
Inherited Members
Namespace: Silverback.Storage
Assembly: Silverback.Integration.dll
Syntax
public static class SilverbackContextStorageExtensions
Methods
ClearStorageTransaction(ISilverbackContext)
Clears the storage transaction.
Declaration
public static void ClearStorageTransaction(this ISilverbackContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISilverbackContext | context | The ISilverbackContext. |
EnlistTransaction(ISilverbackContext, IStorageTransaction)
Specifies the transaction to be used for storage operations.
Declaration
public static void EnlistTransaction(this ISilverbackContext context, IStorageTransaction transaction)
Parameters
| Type | Name | Description |
|---|---|---|
| ISilverbackContext | context | The ISilverbackContext. |
| IStorageTransaction | transaction | The transaction. |
GetStorageTransaction(ISilverbackContext)
Gets the current storage transaction.
Declaration
public static IStorageTransaction? GetStorageTransaction(this ISilverbackContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| ISilverbackContext | context | The ISilverbackContext. |
Returns
| Type | Description |
|---|---|
| IStorageTransaction | The current IStorageTransaction or |
TryGetStorageTransaction(ISilverbackContext, out IStorageTransaction?)
Checks whether a storage transaction is set and returns it.
Declaration
public static bool TryGetStorageTransaction(this ISilverbackContext context, out IStorageTransaction? transaction)
Parameters
| Type | Name | Description |
|---|---|---|
| ISilverbackContext | context | The ISilverbackContext. |
| IStorageTransaction | transaction | The transaction. |
Returns
| Type | Description |
|---|---|
| bool | A value indicating whether the transaction was found. |