public IRobotSession CreateSession() { var beginLifetimeScope = Container.BeginLifetimeScope(MahuaGlobal.LifeTimeScopes.RobotSession); var re = new RobotSession(beginLifetimeScope, Container); re.Init(_qqProvider.DefaultQqProvider); return(re); }
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); }