public static Project Load(string file) { string ext = Path.GetExtension(file).ToLower(); if (ProjectCreator.IsKnownProject(ext) || FileInspector.IsProject(file, ext)) { Type projectType = ProjectCreator.GetProjectType(ProjectCreator.KeyForProjectPath(file)); if (projectType != null) { object[] para = new object[1]; para[0] = file; return((Project)projectType.GetMethod("Load").Invoke(null, para)); } else { throw new Exception("Invalid project type: " + Path.GetFileName(file)); } } else { throw new Exception("Unknown project extension: " + Path.GetFileName(file)); } }
public static bool IsCustomProject(string path, string ext) { return((!IsAS2Project(path, ext) && !IsAS3Project(path, ext) && !IsHaxeProject(path, ext)) && ProjectCreator.IsKnownProject(ext)); }
public static bool IsProject(string path, string ext) { return(ProjectCreator.IsKnownProject(ext) || IsAS2Project(path, ext) || IsAS3Project(path, ext) || IsHaxeProject(path, ext)); }