public static CodeDomProvider GenerateCodeDomProvider(ProjectLanguage projectLanguage) { if (projectLanguage == null) { throw new ArgumentNullException("projectLanguage"); } if (!CodeDomProvider.IsDefinedLanguage(projectLanguage.ToString())) { throw new InvalidOperationException("The project language is not supported."); } return(CodeDomProvider.CreateProvider(projectLanguage.ToString())); }
public static CodeDomProvider GenerateCodeDomProvider(ProjectLanguage projectLanguage) { if (projectLanguage == null) { throw new ArgumentNullException("projectLanguage"); } if (!CodeDomProvider.IsDefinedLanguage(projectLanguage.ToString())) { throw new InvalidOperationException(Resources.ScaffoldLanguageNotSupported); } return(CodeDomProvider.CreateProvider(projectLanguage.ToString())); }
public static CodeDomProvider GenerateCodeDomProvider(ProjectLanguage projectLanguage) { if (projectLanguage == null) { throw new ArgumentNullException("projectLanguage"); } if (!CodeDomProvider.IsDefinedLanguage(projectLanguage.ToString())) { throw new InvalidOperationException(Resources.ScaffoldLanguageNotSupported); } return CodeDomProvider.CreateProvider(projectLanguage.ToString()); }
public static bool CreateNewProject(string path, string projectFilePath, ProjectType type, ProjectLanguage lang, bool overwrite) { string command = string.Format("\"{0}\" {1} \"{2}\" {3} {4} {5}", Path.Combine(path, ComName), "/newproject", projectFilePath, (type == ProjectType.simple ? "" : " -type " + type.ToString()), " -lang " + lang.ToString(), (overwrite ? " -overwrite" : "")); var result = ShellCommandExecutor.ExecuteSynchronous(command); return(CheckForError(result)); }