public static DataEngine GetInstance(Parser parser) { if (parser == null) { throw new CannotLoadDataPoolException("Parser can not be null."); } _parser = parser; return _dataEngine; }
public CoreEngine(AutoConfig config, Parser parser) { if (config == null || parser == null) { throw new ArgumentNullException("AutoConfig and/or KeywordParser can not be null."); } this._autoConfig = config; this._parser = parser; this.OnNewMessage += new _frameworkInfoDelegate(WriteMsgToConsole); }
/* void InitProject() * Init AutoConfig and Parser to parse config file and driver file. * */ private void InitProject() { _autoConfig = AutoConfig.GetInstance(); _autoConfig.ProjectConfigFile = this._projectConfigFile; //if user input the framework config file, we will use it, // or we will search the framework config file in current folder. if (!String.IsNullOrEmpty(this._frameworkConfigFile)) { _autoConfig.FrameworkConfigFile = this._frameworkConfigFile; } _autoConfig.ParseConfigFile(); _autoConfig.Close(); _parser = Parser.GetInstance(); _parser.AutoConfig = _autoConfig; _parser.ParseDriveFile(); _parser.Close(); }
public static SubEngine GetInstance(Parser parser) { if (parser == null) { throw new CannotLoadSubException("Parser can not be null."); } _parser = parser; return _subEngine; }