예제 #1
0
        public Parser()
        {
            _pool = new ParserWrapperPool();
            ParserWrapper pw = _pool.GetParserWrapper();

            supportedExtensions = pw.GetParserIDs();
            _pool.ReleaseParserWrapper(pw);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #5
0
 public ParserWrapper GetParserWrapper()
 {
     return(parserWrapper.GetParserWrapper());
 }