Exemple #1
0
        public TestContext(IDecomposer decomposer, AgentGatewayActorRepositoryStub agentGatewayActorRepositoryStub)
        {
            _taskRunRepository = new TaskRunRepository(decomposer);
            _taskRepository    = new TaskRepository();
            _agentRepository   = new AgentRepository(_taskRunRepository);

            var notificationRepository = new NotificationRepository();

            var actorRepositoryLocator = new ActorUnitOfWorkLocator(
                new UnitOfWork(ActorTypes.Agent, _agentRepository, notificationRepository),
                new UnitOfWork(ActorTypes.Task, _taskRepository, notificationRepository),
                new UnitOfWork(ActorTypes.TaskRun, _taskRunRepository, notificationRepository),
                new UnitOfWork(ActorTypes.AgentJobGateway, agentGatewayActorRepositoryStub, notificationRepository));

            _actorDispatcher = new ActorDispatcher(
                actorRepositoryLocator,
                CancellationToken.None);
        }
Exemple #2
0
 public ActorDispatcher(ActorUnitOfWorkLocator actoryRepositoryLocator, CancellationToken token)
 {
     _actorQueues             = new Dictionary <Tuple <string, Guid>, ActorQueue>();
     _actoryRepositoryLocator = actoryRepositoryLocator;
     _token = token;
 }