Class UnitOfWorkService<TAuthenticationToken>
Provides a basic container to control how the IUnitOfWork<TAuthenticationToken> is accessed.
Inheritance
System.Object
UnitOfWorkService<TAuthenticationToken>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Cqrs.Services
Assembly: Cqrs.dll
Syntax
public class UnitOfWorkService<TAuthenticationToken> : IUnitOfWorkService
Type Parameters
Name | Description |
---|---|
TAuthenticationToken |
Constructors
UnitOfWorkService(IUnitOfWork<TAuthenticationToken>)
Instantiate a new instance of UnitOfWorkService<TAuthenticationToken>.
Declaration
public UnitOfWorkService(IUnitOfWork<TAuthenticationToken> unitOfWork)
Parameters
Type | Name | Description |
---|---|---|
IUnitOfWork<TAuthenticationToken> | unitOfWork |
Properties
Committer
Gets or set the object that wants to control the UnitOfWork.
Declaration
protected object Committer { get; }
Property Value
Type | Description |
---|---|
System.Object |
UnitOfWork
Gets or set the IUnitOfWork<TAuthenticationToken>.
Declaration
protected IUnitOfWork<TAuthenticationToken> UnitOfWork { get; }
Property Value
Type | Description |
---|---|
IUnitOfWork<TAuthenticationToken> |
Methods
Commit(Object)
Commits the UnitOfWork if the provided commiter
is the Committer.
Declaration
public bool Commit(object commiter)
Parameters
Type | Name | Description |
---|---|---|
System.Object | commiter |
Returns
Type | Description |
---|---|
System.Boolean | true if the provided |
Implements
SetCommitter(Object)
Informs the service of the object that will be committing the UnitOfWork.
Declaration
public bool SetCommitter(object commiter)
Parameters
Type | Name | Description |
---|---|---|
System.Object | commiter |
Returns
Type | Description |
---|---|
System.Boolean | true if the provided |