public static HaxeProject Load(string path) { string ext = Path.GetExtension(path).ToLower(); if (ext == ".hxml") { HaxeProject hxproj = new HaxeProject(path); hxproj.RawHXML = File.ReadAllLines(path); return(hxproj); } else if (ext == ".nmml") { HaxeProject hxproj = new HaxeProject(path); hxproj.MovieOptions.Platform = HaxeMovieOptions.NME_PLATFORM; hxproj.OutputType = OutputType.Application; hxproj.OutputPath = hxproj.GetRelativePath(path); return(hxproj); } HaxeProjectReader reader = new HaxeProjectReader(path); try { return(reader.ReadProject()); } 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(); } }
public static HaxeProject Load(string path) { string ext = Path.GetExtension(path).ToLower(); if (ext == ".hxml") { HaxeProject hxproj = new HaxeProject(path); hxproj.RawHXML = File.ReadAllLines(path); return(hxproj); } HaxeProjectReader reader = new HaxeProjectReader(path); try { return(reader.ReadProject()); } catch (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(); } }
public static HaxeProject Load(string path) { HaxeProjectReader reader = new HaxeProjectReader(path); try { return(reader.ReadProject()); } 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(); } }
public static HaxeProject Load(string path) { string ext = Path.GetExtension(path).ToLower(); if (ext == ".hxml") { HaxeProject hxproj = new HaxeProject(path); hxproj.RawHXML = File.ReadAllLines(path); return hxproj; } else if (ext == ".nmml") { HaxeProject hxproj = new HaxeProject(path); hxproj.MovieOptions.Platform = HaxeMovieOptions.NME_PLATFORM; hxproj.OutputType = OutputType.Application; hxproj.OutputPath = hxproj.GetRelativePath(path); return hxproj; } HaxeProjectReader reader = new HaxeProjectReader(path); try { return reader.ReadProject(); } 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(); } }
public static HaxeProject Load(string path) { string ext = Path.GetExtension(path).ToLower(); if (ext == ".hxml") { HaxeProject hxproj = new HaxeProject(path); hxproj.RawHXML = File.ReadAllLines(path); return hxproj; } HaxeProjectReader reader = new HaxeProjectReader(path); try { return reader.ReadProject(); } catch (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(); } }
public static HaxeProject Load(string path) { HaxeProjectReader reader = new HaxeProjectReader(path); try { return reader.ReadProject(); } 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(); } }