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

            re.Init(_qqProvider.DefaultQqProvider);
            return(re);
        }
예제 #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);
        }