Interface IAggregateFactory
A factory for creating instances of aggregates.
Namespace: Cqrs.Domain.Factories
Assembly: Cqrs.dll
Syntax
public interface IAggregateFactory
Methods
Create(Type, Nullable<Guid>, Boolean)
Creates instance of type aggregateType
Declaration
object Create(Type aggregateType, Guid? rsn = null, bool tryDependencyResolutionFirst = true)
Parameters
Type | Name | Description |
---|---|---|
System.Type | aggregateType | The System.Type of the aggregate to create. |
System.Nullable<System.Guid> | rsn | The identifier of the aggregate to create an instance of if an existing aggregate. |
System.Boolean | tryDependencyResolutionFirst | Indicates the use of IDependencyResolver should be tried first. |
Returns
Type | Description |
---|---|
System.Object |
Create<TAggregate>(Nullable<Guid>, Boolean)
Creates instance of TAggregate
.
Declaration
TAggregate Create<TAggregate>(Guid? rsn = null, bool tryDependencyResolutionFirst = true)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Guid> | rsn | The identifier of the aggregate to create an instance of if an existing aggregate. |
System.Boolean | tryDependencyResolutionFirst | Indicates the use of IDependencyResolver should be tried first. |
Returns
Type | Description |
---|---|
TAggregate |
Type Parameters
Name | Description |
---|---|
TAggregate | The System.Type of the aggregate to create. |