/// <summary> /// Instantiates a new instance of <see cref="EventService{TAuthenticationToken}"/>. /// </summary> protected EventService(IEventStore <TAuthenticationToken> eventStore, ILogger logger, ICorrelationIdHelper correlationIdHelper, IAuthenticationTokenHelper <TAuthenticationToken> authenticationTokenHelper) { EventStore = eventStore; Logger = logger; CorrelationIdHelper = correlationIdHelper; AuthenticationTokenHelper = authenticationTokenHelper; }
/// <summary> /// Instantiates a new instance of <see cref="BusActor"/>. /// </summary> public BusActor(IAkkaEventPublisher <TAuthenticationToken> eventHandlerResolver, ICorrelationIdHelper correlationIdHelper, IAuthenticationTokenHelper <TAuthenticationToken> authenticationTokenHelper) { EventHandlerResolver = eventHandlerResolver; CorrelationIdHelper = correlationIdHelper; AuthenticationTokenHelper = authenticationTokenHelper; Receive <IEvent <TAuthenticationToken> >(@event => ExecuteReceive(@event)); }
public Repository(IAggregateFactory aggregateFactory, IEventStore <TAuthenticationToken> eventStore, IEventPublisher <TAuthenticationToken> publisher, ICorrelationIdHelper correlationIdHelper) { EventStore = eventStore; Publisher = publisher; CorrelationIdHelper = correlationIdHelper; AggregateFactory = aggregateFactory; }
public BusActor(IAkkaCommandSender <TAuthenticationToken> commandHandlerResolver, ICorrelationIdHelper correlationIdHelper, IAuthenticationTokenHelper <TAuthenticationToken> authenticationTokenHelper) { CommandHandlerResolver = commandHandlerResolver; CorrelationIdHelper = correlationIdHelper; AuthenticationTokenHelper = authenticationTokenHelper; Receive <ICommand <TAuthenticationToken> >(command => ExecuteReceive(command)); }
public AuthenticationController(ILogger logger, ICorrelationIdHelper correlationIdHelper, IConfigurationManager configurationManager, IAuthenticationTokenHelper <Guid> authenticationTokenHelper, IQueryFactory queryFactory, ICredentialRepository credentialRepository, IAuthenticationHashHelper authenticationHashHelper) : base(logger, correlationIdHelper, configurationManager, authenticationTokenHelper) { QueryFactory = queryFactory; CredentialRepository = credentialRepository; AuthenticationHashHelper = authenticationHashHelper; }
/// <summary> /// Instantiate a new instance of the <see cref="AuthenticationService"/> class. /// </summary> public AuthenticationService(IEventStore <Guid> eventStore, ILogger logger, ICorrelationIdHelper correlationIdHelper, IAuthenticationTokenHelper <Guid> authenticationTokenHelper, IQueryFactory queryFactory, ICredentialRepository credentialRepository, IAuthenticationHashHelper authenticationHashHelper, ICommandPublisher <Guid> commandPublisher) : base(eventStore, logger, correlationIdHelper, authenticationTokenHelper) { CredentialRepository = credentialRepository; QueryFactory = queryFactory; AuthenticationHashHelper = authenticationHashHelper; CommandPublisher = commandPublisher; }
public InProcessBus(IAuthenticationTokenHelper <TAuthenticationToken> authenticationTokenHelper, ICorrelationIdHelper correlationIdHelper, IDependencyResolver dependencyResolver, ILogger logger, IConfigurationManager configurationManager) { AuthenticationTokenHelper = authenticationTokenHelper; CorrelationIdHelper = correlationIdHelper; DependencyResolver = dependencyResolver; Logger = logger; ConfigurationManager = configurationManager; }
/// <summary> /// Instantiates a new instance of <see cref="SagaRepository{TAuthenticationToken}"/> /// </summary> public SagaRepository(IAggregateFactory sagaFactory, IEventStore <TAuthenticationToken> eventStore, IEventPublisher <TAuthenticationToken> publisher, ICommandPublisher <TAuthenticationToken> commandPublisher, ICorrelationIdHelper correlationIdHelper) { EventStore = eventStore; Publisher = publisher; CorrelationIdHelper = correlationIdHelper; CommandPublisher = commandPublisher; SagaFactory = sagaFactory; }
/// <summary> /// Instantiate a new instance of the <see cref="ConversationService"/> class. /// </summary> public ConversationService(IEventStore <Guid> eventStore, ILogger logger, ICorrelationIdHelper correlationIdHelper, IAuthenticationTokenHelper <Guid> authenticationTokenHelper, IConversationSummaryRepository conversationSummaryRepository, IQueryFactory queryFactory, IMessageRepository messageRepository, ICommandPublisher <Guid> commandPublisher) : base(eventStore, logger, correlationIdHelper, authenticationTokenHelper) { ConversationSummaryRepository = conversationSummaryRepository; QueryFactory = queryFactory; MessageRepository = messageRepository; CommandPublisher = commandPublisher; }
/// <summary> /// Instantiates a new instance of the <see cref="DatabaseLogger"/> class calling the constructor on <see cref="DatabaseLogger"/>. /// This will attempt to create the table in the database if not yet created and <paramref name="createTable"/> is true. /// </summary> public SqlLogger(ILoggerSettings loggerSettings, ICorrelationIdHelper correlationIdHelper, bool createTable) : this(loggerSettings, correlationIdHelper) { if (createTable) { CreateTable(); } }
/// <summary> /// Instantiate a new instance of the <see cref="SnapshotStore"/> class. /// </summary> protected SnapshotStore(IConfigurationManager configurationManager, ISnapshotDeserialiser eventDeserialiser, ISnapshotBuilder snapshotBuilder, ILogger logger, ICorrelationIdHelper correlationIdHelper) { ConfigurationManager = configurationManager; EventDeserialiser = eventDeserialiser; SnapshotBuilder = snapshotBuilder; Logger = logger; CorrelationIdHelper = correlationIdHelper; }
protected override void Application_BeginRequest(object sender, EventArgs e) { try { ICorrelationIdHelper correlationIdHelper = NinjectDependencyResolver.Current.Resolve <ICorrelationIdHelper>(); correlationIdHelper.SetCorrelationId(Guid.NewGuid()); } catch (NullReferenceException) { } }
public AccountService(ICommandSender <Cqrs.Authentication.ISingleSignOnToken> commandSender, IUnitOfWorkService unitOfWorkService, IQueryFactory queryFactory, IAuthenticationTokenHelper <Cqrs.Authentication.ISingleSignOnToken> authenticationTokenHelper, ICorrelationIdHelper correlationIdHelper, ILogger logger) { CommandSender = commandSender; UnitOfWorkService = unitOfWorkService; QueryFactory = queryFactory; AuthenticationTokenHelper = authenticationTokenHelper; CorrelationIdHelper = correlationIdHelper; Logger = logger; }
public ConversationsController(ILogger logger, ICorrelationIdHelper correlationIdHelper, IConfigurationManager configurationManager, IAuthenticationTokenHelper <Guid> authenticationTokenHelper, IQueryFactory queryFactory, IConversationSummaryRepository conversationSummaryRepository, IMessageRepository messageRepository, IAuthenticationHelper authenticationHelper, ICommandPublisher <Guid> commandPublisher) : base(logger, correlationIdHelper, configurationManager, authenticationTokenHelper) { QueryFactory = queryFactory; ConversationSummaryRepository = conversationSummaryRepository; MessageRepository = messageRepository; AuthenticationHelper = authenticationHelper; CommandPublisher = commandPublisher; }
protected AkkaAggregateRoot(IUnitOfWork <TAuthenticationToken> unitOfWork, ILogger logger, IAkkaAggregateRepository <TAuthenticationToken> repository, ICorrelationIdHelper correlationIdHelper, IAuthenticationTokenHelper <TAuthenticationToken> authenticationTokenHelper) { UnitOfWork = unitOfWork; Logger = logger; Repository = repository; CorrelationIdHelper = correlationIdHelper; AuthenticationTokenHelper = authenticationTokenHelper; Changes = new ReadOnlyCollection <IEvent <TAuthenticationToken> >(new List <IEvent <TAuthenticationToken> >()); }
protected QueuedCommandBusReceiver(IAuthenticationTokenHelper <TAuthenticationToken> authenticationTokenHelper, ICorrelationIdHelper correlationIdHelper, ILogger logger, IConfigurationManager configurationManager) { QueueTracker = new ConcurrentDictionary <string, ConcurrentQueue <ICommand <TAuthenticationToken> > >(); QueueTrackerLock = new ReaderWriterLockSlim(); AuthenticationTokenHelper = authenticationTokenHelper; CorrelationIdHelper = correlationIdHelper; Logger = logger; ConfigurationManager = configurationManager; }
public AkkaEventBus(IBusHelper busHelper, IAuthenticationTokenHelper <TAuthenticationToken> authenticationTokenHelper, ICorrelationIdHelper correlationIdHelper, ILogger logger, IEventPublisher <TAuthenticationToken> eventPublisher, IEventReceiver <TAuthenticationToken> eventReceiver) { BusHelper = busHelper; AuthenticationTokenHelper = authenticationTokenHelper; CorrelationIdHelper = correlationIdHelper; Logger = logger; EventPublisher = eventPublisher; EventReceiver = eventReceiver; }
public InventoryItemService(ICommandSender <ISingleSignOnToken> commandSender, IUnitOfWorkService unitOfWorkService, IQueryFactory queryFactory, IAuthenticationTokenHelper <ISingleSignOnToken> authenticationTokenHelper, ICorrelationIdHelper correlationIdHelper, IInventoryItemRepository inventoryItemRepository, IInventoryItemSummaryRepository inventoryItemSummaryRepository) { CommandSender = commandSender; UnitOfWorkService = unitOfWorkService; QueryFactory = queryFactory; AuthenticationTokenHelper = authenticationTokenHelper; CorrelationIdHelper = correlationIdHelper; InventoryItemRepository = inventoryItemRepository; InventoryItemSummaryRepository = inventoryItemSummaryRepository; }
public AzureBusHelper(IAuthenticationTokenHelper <TAuthenticationToken> authenticationTokenHelper, ICorrelationIdHelper correlationIdHelper, ILogger logger, IMessageSerialiser <TAuthenticationToken> messageSerialiser, IBusHelper busHelper, IConfigurationManager configurationManager, IDependencyResolver dependencyResolver) { AuthenticationTokenHelper = authenticationTokenHelper; CorrelationIdHelper = correlationIdHelper; Logger = logger; MessageSerialiser = messageSerialiser; BusHelper = busHelper; DependencyResolver = dependencyResolver; ConfigurationManager = configurationManager; }
public InProcessBus(IAuthenticationTokenHelper <TAuthenticationToken> authenticationTokenHelper, ICorrelationIdHelper correlationIdHelper, IDependencyResolver dependencyResolver, ILogger logger, IConfigurationManager configurationManager, IBusHelper busHelper) { AuthenticationTokenHelper = authenticationTokenHelper; CorrelationIdHelper = correlationIdHelper; DependencyResolver = dependencyResolver; Logger = logger; ConfigurationManager = configurationManager; BusHelper = busHelper; EventWaits = new ConcurrentDictionary <Guid, IList <IEvent <TAuthenticationToken> > >(); }
/// <summary> /// Instantiates a new instance of <see cref="AkkaSaga{TAuthenticationToken}"/> /// </summary> protected AkkaSaga(ISagaUnitOfWork <TAuthenticationToken> unitOfWork, ILogger logger, IAkkaSagaRepository <TAuthenticationToken> repository, ICorrelationIdHelper correlationIdHelper, IAuthenticationTokenHelper <TAuthenticationToken> authenticationTokenHelper, ICommandPublisher <TAuthenticationToken> commandPublisher) { UnitOfWork = unitOfWork; Logger = logger; Repository = repository; CorrelationIdHelper = correlationIdHelper; AuthenticationTokenHelper = authenticationTokenHelper; CommandPublisher = commandPublisher; Changes = new ReadOnlyCollection <ISagaEvent <TAuthenticationToken> >(new List <ISagaEvent <TAuthenticationToken> >()); }
public AkkaCommandBus(IHandlerResolver concurrentEventBusProxy, IBusHelper busHelper, IAuthenticationTokenHelper <TAuthenticationToken> authenticationTokenHelper, ICorrelationIdHelper correlationIdHelper, IDependencyResolver dependencyResolver, ILogger logger) { ConcurrentEventBusProxy = concurrentEventBusProxy; Logger = logger; BusHelper = busHelper; AuthenticationTokenHelper = authenticationTokenHelper; CorrelationIdHelper = correlationIdHelper; DependencyResolver = dependencyResolver; EventWaits = new ConcurrentDictionary <Guid, IList <IEvent <TAuthenticationToken> > >(); }
public AkkaCommandBus(IBusHelper busHelper, IAuthenticationTokenHelper <TAuthenticationToken> authenticationTokenHelper, ICorrelationIdHelper correlationIdHelper, IDependencyResolver dependencyResolver, ILogger logger, ICommandPublisher <TAuthenticationToken> commandPublisher, ICommandReceiver <TAuthenticationToken> commandReceiver) { Logger = logger; BusHelper = busHelper; AuthenticationTokenHelper = authenticationTokenHelper; CorrelationIdHelper = correlationIdHelper; DependencyResolver = dependencyResolver; EventWaits = new ConcurrentDictionary <Guid, IList <IEvent <TAuthenticationToken> > >(); CommandPublisher = commandPublisher; CommandReceiver = commandReceiver; }
public OrderService(ICommandSender <Cqrs.Authentication.ISingleSignOnToken> commandSender, IUnitOfWorkService unitOfWorkService, IQueryFactory queryFactory, IAuthenticationTokenHelper <Cqrs.Authentication.ISingleSignOnToken> authenticationTokenHelper, ICorrelationIdHelper correlationIdHelper, IOrderRepository orderRepository, ILogger logger, IEventStore <Cqrs.Authentication.ISingleSignOnToken> eventStore) : base(eventStore, logger, correlationIdHelper, authenticationTokenHelper) { CommandSender = commandSender; UnitOfWorkService = unitOfWorkService; QueryFactory = queryFactory; AuthenticationTokenHelper = authenticationTokenHelper; CorrelationIdHelper = correlationIdHelper; OrderRepository = orderRepository; Logger = logger; }
public InProcessBus(IAuthenticationTokenHelper <TAuthenticationToken> authenticationTokenHelper, ICorrelationIdHelper correlationIdHelper, IDependencyResolver dependencyResolver, ILogger logger, IConfigurationManager configurationManager, IBusHelper busHelper) { AuthenticationTokenHelper = authenticationTokenHelper; CorrelationIdHelper = correlationIdHelper; DependencyResolver = dependencyResolver; Logger = logger; ConfigurationManager = configurationManager; BusHelper = busHelper; EventWaits = new ConcurrentDictionary <Guid, IList <IEvent <TAuthenticationToken> > >(); TelemetryHelper = configurationManager.CreateTelemetryHelper("Cqrs.InProcessBus.UseApplicationInsightTelemetryHelper", correlationIdHelper); }
public AkkaCommandBus(IConfigurationManager configurationManager, IBusHelper busHelper, IAuthenticationTokenHelper <TAuthenticationToken> authenticationTokenHelper, ICorrelationIdHelper correlationIdHelper, IDependencyResolver dependencyResolver, ILogger logger, IActorRef actorReference, ICommandSender <TAuthenticationToken> commandSender, ICommandReceiver <TAuthenticationToken> commandReceiver) { ConfigurationManager = configurationManager; Logger = logger; ActorReference = actorReference; CommandSender = commandSender; CommandReceiver = commandReceiver; AuthenticationTokenHelper = authenticationTokenHelper; CorrelationIdHelper = correlationIdHelper; DependencyResolver = dependencyResolver; BusHelper = busHelper; EventWaits = new ConcurrentDictionary <Guid, IList <IEvent <TAuthenticationToken> > >(); }
protected AzureBus(IConfigurationManager configurationManager, IMessageSerialiser <TAuthenticationToken> messageSerialiser, IAuthenticationTokenHelper <TAuthenticationToken> authenticationTokenHelper, ICorrelationIdHelper correlationIdHelper, ILogger logger, bool isAPublisher) { MessageSerialiser = messageSerialiser; AuthenticationTokenHelper = authenticationTokenHelper; CorrelationIdHelper = correlationIdHelper; Logger = logger; ConfigurationManager = configurationManager; ConnectionString = ConfigurationManager.GetSetting(MessageBusConnectionStringConfigurationKey); NamespaceManager namespaceManager = NamespaceManager.CreateFromConnectionString(ConnectionString); if (isAPublisher) { InstantiatePublishing(namespaceManager); } }
protected AzureBus(IConfigurationManager configurationManager, IBusHelper busHelper, IMessageSerialiser <TAuthenticationToken> messageSerialiser, IAuthenticationTokenHelper <TAuthenticationToken> authenticationTokenHelper, ICorrelationIdHelper correlationIdHelper, ILogger logger, bool isAPublisher) { EventWaits = new ConcurrentDictionary <Guid, IList <IEvent <TAuthenticationToken> > >(); MessageSerialiser = messageSerialiser; AuthenticationTokenHelper = authenticationTokenHelper; CorrelationIdHelper = correlationIdHelper; Logger = logger; BusHelper = busHelper; ConfigurationManager = configurationManager; ConnectionString = ConfigurationManager.GetSetting(MessageBusConnectionStringConfigurationKey); if (isAPublisher) { InstantiatePublishing(); } }
protected AzureBus(IConfigurationManager configurationManager, IMessageSerialiser <TAuthenticationToken> messageSerialiser, IAuthenticationTokenHelper <TAuthenticationToken> authenticationTokenHelper, ICorrelationIdHelper correlationIdHelper, ILogger logger, bool isAPublisher) { EventWaits = new ConcurrentDictionary <Guid, IList <IEvent <TAuthenticationToken> > >(); MessageSerialiser = messageSerialiser; AuthenticationTokenHelper = authenticationTokenHelper; CorrelationIdHelper = correlationIdHelper; Logger = logger; ConfigurationManager = configurationManager; // ReSharper disable DoNotCallOverridableMethodsInConstructor UpdateSettings(); if (isAPublisher) { InstantiatePublishing(); } // ReSharper restore DoNotCallOverridableMethodsInConstructor }
protected void Application_BeginRequest(object sender, EventArgs e) { try { ICorrelationIdHelper correlationIdHelper = NinjectDependencyResolver.Current.Resolve <ICorrelationIdHelper>(); correlationIdHelper.SetCorrelationId(Guid.NewGuid()); } catch (NullReferenceException) { } Context.Response.AddHeader("Access-Control-Allow-Origin", "*"); if (Context.Request.HttpMethod == "OPTIONS") { //These headers are handling the "pre-flight" OPTIONS call sent by the browser Context.Response.AddHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE"); Context.Response.AddHeader("Access-Control-Allow-Headers", "Content-Type, Accept"); Context.Response.AddHeader("Access-Control-Max-Age", "1728000"); Context.Response.End(); } }