Esempio n. 1
0
        public Context(GlobalSettings globalSettings, Account account, IWebDriver driver, IList<Domain> domains, ISessionFactory nhibernateSessionFactory, Provider provider, IList<string> accountFolderNames, EngagementSession engagementSession, IServerStatusService serverStatusService)
        {
            GlobalSettings = globalSettings;
            Account = account;
            Driver = driver;
            NhibernateSessionFactory = nhibernateSessionFactory;
            this.provider = provider;
            ManualReset = new ManualResetEvent(false);
            AccountFolderNames = accountFolderNames;
            InboxEngageCounts = new Dictionary<string, int>();
            JunkEngageCounts = new Dictionary<string, int>();
            EngagementSession = engagementSession;
            _serverStatusService = serverStatusService;

            foreach (var domain in domains)
            {
                domain.GenerateBernoullis();
            }
            Domains = domains;
        }
Esempio n. 2
0
        protected EngagementSession CreateNewEngagementSession(ISession session, Account account)
        {
            var engagementSession = new EngagementSession(account);

            session.Save(engagementSession);

            return engagementSession;
        }