/// <summary> /// Initializes a new instance of the <see cref="DocumentGenerator{T}"/> class. /// </summary> /// <param name="artifactMapper"><see cref="IArtifactMapper{T}"/> for mapping artifacts.</param> /// <param name="schemaRegistryFactory"><see cref="ISchemaRegistryFactory"/> for creating schemas.</param> public DocumentGenerator( IArtifactMapper <T> artifactMapper, ISchemaRegistryFactory schemaRegistryFactory) { _artifactMapper = artifactMapper; _schemaRegistry = schemaRegistryFactory.Create(); }
/// <summary> /// Initializes a new instance of the <see cref="EventsController"/> class. /// </summary> /// <param name="artifactTypes"><see cref="IArtifactMapper{T}"/> for mapping events.</param> /// <param name="objectFactory"><see cref="IObjectFactory"/> for creating instances of events.</param> /// <param name="eventInjector"><see cref="IEventInjector"/> for injecting events.</param> /// <param name="logger">The <see cref="ILogger"/> to use.</param> public EventsController( IArtifactMapper <IEvent> artifactTypes, IObjectFactory objectFactory, IEventInjector eventInjector, ILogger logger) : base(artifactTypes, objectFactory, logger) { _eventInjector = eventInjector; }
/// <summary> /// Initializes a new instance of the <see cref="ArtifactControllerBase{T}"/> class. /// </summary> /// <param name="artifactTypes"><see cref="IArtifactMapper{T}"/> for mapping artifacts.</param> /// <param name="objectFactory"><see cref="IObjectFactory"/> for creating instances of artifacts.</param> /// <param name="logger">The <see cref="ILogger"/> to use.</param> protected ArtifactControllerBase( IArtifactMapper <T> artifactTypes, IObjectFactory objectFactory, ILogger logger) { _artifactTypes = artifactTypes; _objectFactory = objectFactory; _logger = logger; }
/// <summary> /// Initializes a new instance of the <see cref="DebuggingHandler"/> class. /// </summary> /// <param name="events">The <see cref="IArtifactMapper{T}" /> for <see cref="IEvent" />.</param> /// <param name="eventStore">The <see cref="IEventStore" />..</param> public DebuggingHandler(IArtifactMapper <IEvent> events, IEventStore eventStore) { _eventStore = eventStore; foreach (var @event in events.Artifacts) { Artifacts.Add(events.GetPathFor(@event), @event); } }
/// <summary> /// Initializes a new instance of the <see cref="DebuggingHandler"/> class. /// </summary> /// <param name="queries">me the qwuer.</param> /// <param name="queryCoordinator">me thq qvuer cord.</param> public DebuggingHandler(IArtifactMapper <IQuery> queries, IQueryCoordinator queryCoordinator) { _queries = queries; _queryCoordinator = queryCoordinator; foreach (var query in _queries.Artifacts) { Artifacts.Add(_queries.GetPathFor(query), query); } }
/// <summary> /// Initializes a new instance of the <see cref="DebuggingHandler"/> class. /// </summary> /// <param name="commands">The <see cref="IArtifactMapper{ICommand}"/> that discovers and maps all <see cref="ICommand"/>.</param> /// <param name="commandCoordinator">write somethingehre.</param> public DebuggingHandler(IArtifactMapper <ICommand> commands, ICommandCoordinator commandCoordinator) { _commands = commands; _commandCoordinator = commandCoordinator; foreach (var command in _commands.Artifacts) { Artifacts.Add(_commands.GetPathFor(command), command); } }
/// <summary> /// Initializes a new instance of the <see cref="QueriesController"/> class. /// </summary> /// <param name="artifactTypes"><see cref="IArtifactMapper{T}"/> for mapping queries.</param> /// <param name="objectFactory"><see cref="IObjectFactory"/> for creating instances of queries.</param> /// <param name="artifactTypeMap"><see cref="IArtifactTypeMap"/> for mapping artifacts to types.</param> /// <param name="queryCoordinator"><see cref="IQueryCoordinator"/> for coordinating execution of queries.</param> /// <param name="serializer">JSON <see cref="ISerializer"/>.</param> /// <param name="logger">The <see cref="ILogger"/> to use.</param> public QueriesController( IArtifactMapper <IQuery> artifactTypes, IObjectFactory objectFactory, IArtifactTypeMap artifactTypeMap, IQueryCoordinator queryCoordinator, ISerializer serializer, ILogger logger) : base(artifactTypes, objectFactory, logger) { _artifactTypeMap = artifactTypeMap; _queryCoordinator = queryCoordinator; _serializer = serializer; }
/// <summary> /// Initializes a new instance of the <see cref="CommandsController"/> class. /// </summary> /// <param name="artifactTypes"><see cref="IArtifactMapper{T}"/> for mapping commands.</param> /// <param name="objectFactory"><see cref="IObjectFactory"/> for creating instances of commands.</param> /// <param name="artifactTypeMap"><see cref="IArtifactTypeMap"/> for mapping artifacts to types.</param> /// <param name="commandCoordinator"><see cref="ICommandCoordinator"/> for coordinating commands.</param> /// <param name="serializer">JSON <see cref="ISerializer"/>.</param> /// <param name="logger">The <see cref="ILogger"/> to use.</param> public CommandsController( IArtifactMapper <ICommand> artifactTypes, IObjectFactory objectFactory, IArtifactTypeMap artifactTypeMap, ICommandCoordinator commandCoordinator, ISerializer serializer, ILogger logger) : base(artifactTypes, objectFactory, logger) { _artifactTypeMap = artifactTypeMap; _commandCoordinator = commandCoordinator; _serializer = serializer; }