protected StatusQueue queueStatus; //微博队列引用 //构造函数,需要传入相应的新浪微博API和主界面 public RobotBase(SysArgFor robotType) { crawler = new SinaMBCrawler(robotType); api = GlobalPool.GetAPI(robotType); switch (robotType) { case SysArgFor.USER_INFO: if (iMinSleep < GlobalPool.MinSleepMsForUserInfo) { iMinSleep = GlobalPool.MinSleepMsForUserInfo; } break; case SysArgFor.USER_TAG: if (iMinSleep < GlobalPool.MinSleepMsForUserTag) { iMinSleep = GlobalPool.MinSleepMsForUserTag; } break; case SysArgFor.STATUS: if (iMinSleep < GlobalPool.MinSleepMsForStatus) { iMinSleep = GlobalPool.MinSleepMsForStatus; } break; case SysArgFor.COMMENT: if (iMinSleep < GlobalPool.MinSleepMsForComment) { iMinSleep = GlobalPool.MinSleepMsForComment; } break; default: if (iMinSleep < GlobalPool.MinSleepMsForUserRelation) { iMinSleep = GlobalPool.MinSleepMsForUserRelation; } break; } AdjustRealFreq(); }
protected StatusQueue queueStatus; //微博队列引用 //构造函数,需要传入相应的新浪微博API和主界面 public RobotBase(SysArgFor robotType) { crawler = new SinaMBCrawler(robotType); api = GlobalPool.GetAPI(robotType); switch (robotType) { case SysArgFor.USER_INFO: if (iMinSleep < GlobalPool.MinSleepMsForUserInfo) iMinSleep = GlobalPool.MinSleepMsForUserInfo; break; case SysArgFor.USER_TAG: if (iMinSleep < GlobalPool.MinSleepMsForUserTag) iMinSleep = GlobalPool.MinSleepMsForUserTag; break; case SysArgFor.STATUS: if (iMinSleep < GlobalPool.MinSleepMsForStatus) iMinSleep = GlobalPool.MinSleepMsForStatus; break; case SysArgFor.COMMENT: if (iMinSleep < GlobalPool.MinSleepMsForComment) iMinSleep = GlobalPool.MinSleepMsForComment; break; default: if (iMinSleep < GlobalPool.MinSleepMsForUserRelation) iMinSleep = GlobalPool.MinSleepMsForUserRelation; break; } AdjustRealFreq(); }
public SinaMBCrawler(SysArgFor crawlerType) { api = GlobalPool.GetAPI(crawlerType); }