public static ScriptElementDescriptor GetScriptElement(string elementName) { if (String.IsNullOrWhiteSpace(elementName)) { return(null); } ScriptElementDescriptor d = null; ScriptElements.TryGetValue(elementName, out d); return(d); }
public static string Complete(string prefix) { IDictionaryEnumerator elements = ScriptElements.GetEnumerator(); while (elements.MoveNext()) { ScriptElementDescriptor d = (ScriptElementDescriptor)elements.Value; string s = d.GetName(); if (s.StartsWith(prefix)) { if (s.Length > prefix.Length) { return(s.Substring(prefix.Length)); } } } return(Scripts.Complete(prefix)); }
public static bool IsFunctionName(string name) { ScriptElementDescriptor d = GetScriptElement(name); return((d != null) && d.GetIsFunc()); }