Class TransactionManager<TInterface>
Manages database transactions.
Inheritance
InterfaceInterceptor<TInterface>
AspectInterceptor<TInterface>
TransactionManager<TInterface>
Implements
IProxyAccess<TInterface>
Inherited Members
Namespace: Solti.Utils.Rpc.Aspects
Assembly: Solti.Utils.Rpc.Server.dll
Syntax
public class TransactionManager<TInterface> : AspectInterceptor<TInterface>, IHasTarget<TInterface>, IProxyAccess<TInterface> where TInterface : class
Type Parameters
Name | Description |
---|---|
TInterface |
Constructors
TransactionManager(TInterface, Lazy<IDbConnection>)
Creates a new TransactionManager<TInterface> instance.
Declaration
public TransactionManager(TInterface target, Lazy<IDbConnection> dbConn)
Parameters
Type | Name | Description |
---|---|---|
TInterface | target | |
Lazy<IDbConnection> | dbConn |
Properties
Connection
The underlying DB connection
Declaration
public IDbConnection Connection { get; }
Property Value
Type | Description |
---|---|
IDbConnection |
Methods
Decorator(InvocationContext, Func<Object>)
The decorator function.
Declaration
protected override object Decorator(InvocationContext context, Func<object> callNext)
Parameters
Type | Name | Description |
---|---|---|
InvocationContext | context | |
Func<Object> | callNext |
Returns
Type | Description |
---|---|
Object |
Overrides
Solti.Utils.Rpc.Internals.AspectInterceptor<TInterface>.Decorator(Solti.Utils.Proxy.InvocationContext, System.Func<System.Object>)
DecoratorAsync(InvocationContext, Func<Task>)
The decorator function.
Declaration
protected override async Task<Task> DecoratorAsync(InvocationContext context, Func<Task> callNext)
Parameters
Type | Name | Description |
---|---|---|
InvocationContext | context | |
Func<Task> | callNext |
Returns
Type | Description |
---|---|
Task<Task> |
Overrides
Solti.Utils.Rpc.Internals.AspectInterceptor<TInterface>.DecoratorAsync(Solti.Utils.Proxy.InvocationContext, System.Func<System.Threading.Tasks.Task>)