Exemplo n.º 1
0
 void LoadingAttempted(ConfigLoader.ConfigStatus status)
 {
     switch (status)
     {
         case ConfigLoader.ConfigStatus.FileNotFound:
             Logger.LogError("config.conf not found.");
             break;
         case ConfigLoader.ConfigStatus.ParsingError:
             Logger.LogError("Parsing Config File.");
             break;
     }
 }
Exemplo n.º 2
0
        public Builder(string[] args)
        {
            loader = new ConfigLoader();
            loader.LoadingFailed += LoadingAttempted;
            opParser = new OperatorConfigParser();
            opParser.ParsedSuccesfully += OnParsedSuccesfully;
            sParser = new StatementConfigParser();
            sParser.ParsedSuccesfully += OnParsedSuccesfully;
            gParser = new GenericConfigParser();
            gParser.ParsedSuccesfully += OnParsedSuccesfully;
            loader.AttemptLoad(operatorFilePath,opParser);
            loader.AttemptLoad(statementFilePath, sParser);
            loader.AttemptLoad(genericsFilePath, gParser);
            if (args.Length > 0)
                this.args = args;

        }