Example #1
0
        public IRobotSession CreateSession()
        {
            var beginLifetimeScope = Container.BeginLifetimeScope(MahuaGlobal.LifeTimeScopes.RobotSession);
            var re = new RobotSession(beginLifetimeScope, Container);

            re.Init(_qqProvider.DefaultQqProvider);
            return(re);
        }
Example #2
0
        public IRobotSession CreateSession(string qq)
        {
            if (!_qqProvider.CheckQq(qq))
            {
                throw new QqNotFoundException(qq);
            }
            var beginLifetimeScope = Container.BeginLifetimeScope(MahuaGlobal.LifeTimeScopes.RobotSession);
            var re = new RobotSession(beginLifetimeScope, Container);

            re.Init(qq);
            return(re);
        }