Exemplo n.º 1
0
        public static AS3Project Load(string path)
        {
            ProjectReader reader;

            if (FileInspector.IsFlexBuilderProject(path))
            {
                reader = new FlexProjectReader(path);
            }
            else
            {
                reader = new AS3ProjectReader(path);
            }

            try
            {
                return(reader.ReadProject() as AS3Project);
            }
            catch (System.Xml.XmlException exception)
            {
                string format = string.Format("Error in XML Document line {0}, position {1}.",
                                              exception.LineNumber, exception.LinePosition);
                throw new Exception(format, exception);
            }
            finally { reader.Close(); }
        }
Exemplo n.º 2
0
        public static AS3Project Load(string path)
        {
            ProjectReader reader;
            if (FileInspector.IsFlexBuilderProject(path)) reader = new FlexProjectReader(path);
            else reader = new AS3ProjectReader(path);

            try
            {
                return reader.ReadProject() as AS3Project;
            }
            catch (System.Xml.XmlException exception)
            {
                string format = string.Format("Error in XML Document line {0}, position {1}.",
                    exception.LineNumber, exception.LinePosition);
                throw new Exception(format, exception);
            }
            finally { reader.Close(); }
        }