Exemplo n.º 1
0
        public Parser()
        {
            _pool = new ParserWrapperPool();
            ParserWrapper pw = _pool.GetParserWrapper();

            supportedExtensions = pw.GetParserIDs();
            _pool.ReleaseParserWrapper(pw);
        }
Exemplo n.º 2
0
        public TreeManager(string ParsersPath = "")
        {
            //if (ParsersPath == "")
                parserWrapper = new ParserWrapperPool();
            //else
            //parserWrapper = new ParserWrapper(Environment.CurrentDirectory);

            ParserWrapper pw = parserWrapper.GetParserWrapper();
            parserIDs = pw.GetParserIDs();
            parserWrapper.ReleaseParserWrapper(pw);
        }
Exemplo n.º 3
0
        public TreeManager(string ParsersPath = "")
        {
            //if (ParsersPath == "")
            parserWrapper = new ParserWrapperPool();
            //else
            //parserWrapper = new ParserWrapper(Environment.CurrentDirectory);

            ParserWrapper pw = parserWrapper.GetParserWrapper();

            parserIDs = pw.GetParserIDs();
            parserWrapper.ReleaseParserWrapper(pw);
        }
Exemplo n.º 4
0
        internal PointOfInterest Parse(string FileName)
        {
            ParserWrapper   pw       = _pool.GetParserWrapper();
            PointOfInterest TreeRoot = null;

            try
            {
                TreeRoot = pw.ParseFile(FileName);
            }
            catch (Exception e)
            {
                Console.WriteLine(FileName + " " + e.Message);
            }
            _pool.ReleaseParserWrapper(pw);
            return(TreeRoot);
        }
Exemplo n.º 5
0
 public ParserWrapper GetParserWrapper()
 {
     return(parserWrapper.GetParserWrapper());
 }