Exemplo n.º 1
0
        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));
            }
        }
Exemplo n.º 2
0
 public static bool IsCustomProject(string path, string ext)
 {
     return((!IsAS2Project(path, ext) && !IsAS3Project(path, ext) &&
             !IsHaxeProject(path, ext)) && ProjectCreator.IsKnownProject(ext));
 }
Exemplo n.º 3
0
 public static bool IsProject(string path, string ext)
 {
     return(ProjectCreator.IsKnownProject(ext) || IsAS2Project(path, ext) || IsAS3Project(path, ext) || IsHaxeProject(path, ext));
 }