public string[] GetEditors() { List <string> eds = (from e in Editors select e.EditorName).ToList(); UserFunctionsList ufl = new UserFunctionsList(); eds.AddRange(ufl.GetFunctions()); return(eds.ToArray()); }
public EditorDescription Help(string[] arguments) { if (arguments.Length > 1) { ClipEditor = (from e in Editors where e.EditorName.Equals(arguments[1], StringComparison.CurrentCultureIgnoreCase) select e).FirstOrDefault(); if (ClipEditor == null) { EditorDescription foundEditors = new EditorDescription(); foreach (IClipEditor ci in (from e in Editors where e.EditorName.ToLower().Contains(arguments[1].ToLower()) || arguments[1].ToLower().Contains(e.EditorName.ToLower()) || e.LongDescription.Contains(arguments[1].ToLower()) select e)) { foundEditors.Append(EditorDescription.Category.Emphasized, ci.EditorName); foundEditors.AppendLine(EditorDescription.Category.PlainText, String.Concat(" - ", ci.ShortDescription)); } return(foundEditors); } return(ClipEditor.LongDescription); } var allEditors = new EditorDescription(); allEditors.AppendLine(EditorDescription.Category.Warning, Disclaimer); foreach (IClipEditor ce in Editors) { allEditors.Append(EditorDescription.Category.Emphasized, ce.EditorName); allEditors.AppendLine(EditorDescription.Category.PlainText, String.Concat(" - ", ce.ShortDescription)); } allEditors.AppendLine("---------------------"); allEditors.AppendLine("User Defined"); allEditors.AppendLine("---------------------"); UserFunctionsList ufl = new UserFunctionsList(); ufl.DescribeFunctions(allEditors); return(allEditors); }