public static GetExtensionOfSourceFile ( string file ) : string | ||
file | string | |
리턴 | string |
internal static string GetNamespace(string file) { if (string.IsNullOrEmpty(file)) { throw new ArgumentException("Invalid file"); } string extensionOfSourceFile = ScriptCompilers.GetExtensionOfSourceFile(file); foreach (SupportedLanguage current in ScriptCompilers._supportedLanguages) { if (current.GetExtensionICanCompile() == extensionOfSourceFile) { return(current.GetNamespace(file)); } } throw new ApplicationException("Unable to find a suitable compiler"); }
internal static string GetNamespace(string file) { if (string.IsNullOrEmpty(file)) { throw new ArgumentException("Invalid file"); } string extensionOfSourceFile = ScriptCompilers.GetExtensionOfSourceFile(file); using (List <SupportedLanguage> .Enumerator enumerator = ScriptCompilers._supportedLanguages.GetEnumerator()) { while (enumerator.MoveNext()) { SupportedLanguage current = enumerator.Current; if (current.GetExtensionICanCompile() == extensionOfSourceFile) { return(current.GetNamespace(file)); } } } throw new ApplicationException("Unable to find a suitable compiler"); }
public string GetExtensionOfSourceFiles() { return((this._files.Length <= 0) ? "NA" : ScriptCompilers.GetExtensionOfSourceFile(this._files[0])); }
public string GetExtensionOfSourceFiles() { return(_files.Length > 0 ? ScriptCompilers.GetExtensionOfSourceFile(_files[0]) : "NA"); }