Beispiel #1
0
        public ISession CreateSession()
        {
            var agenda          = new Agenda();
            var workingMemory   = new WorkingMemory();
            var eventAggregator = new EventAggregator(_eventAggregator);
            var actionExecutor  = new ActionExecutor();
            var session         = new Session(_network, agenda, workingMemory, eventAggregator, actionExecutor, DependencyResolver, ActionInterceptor);

            return(session);
        }
Beispiel #2
0
        public ISession CreateSession(Action <ISession> initializationAction)
        {
            var agenda          = CreateAgenda();
            var workingMemory   = new WorkingMemory();
            var eventAggregator = new EventAggregator(_eventAggregator);
            var actionExecutor  = new ActionExecutor();
            var session         = new Session(_network, agenda, workingMemory, eventAggregator, actionExecutor, DependencyResolver, ActionInterceptor);

            initializationAction?.Invoke(session);
            session.Activate();
            return(session);
        }