3using System.Threading.Tasks;
17 private readonly
string script;
27 this.script = Xml.InnerText;
39 object Obj = await this.parsed.EvaluateAsync(
Variables);
42 if (Obj is IEnumerable<KeyValuePair<string, object>> Options)
44 foreach (KeyValuePair<string, object> P
in Options)
45 Result.
Add(
new KeyValuePair<string, string>(P.Key, P.Value?.ToString() ??
string.Empty));
47 else if (Obj is IEnumerable<KeyValuePair<string, IElement>> Options2)
49 foreach (KeyValuePair<string, IElement> P
in Options2)
52 else if (Obj is IEnumerable Enumerable)
54 IEnumerator e = Enumerable.GetEnumerator();
58 object Item = e.Current;
60 if (Item is KeyValuePair<string, object> P)
61 Result.
Add(
new KeyValuePair<string, string>(P.Key, P.Value?.ToString() ??
string.Empty));
62 else if (Item is KeyValuePair<string, string> P2)
64 else if (Item is KeyValuePair<string, IElement> P3)
68 s = Item?.ToString() ??
string.Empty;
69 Result.
Add(
new KeyValuePair<string, string>(s, s));
76 Result.
Add(
new KeyValuePair<string, string>(s, s));
Represents a string-valued option.
async Task< KeyValuePair< string, string >[]> GetOptions(Variables Variables)
Gets the options for the parameter.
ParameterScriptOptions(XmlElement Xml)
Represents a string-valued option.
A chunked list is a linked list of chunks of objects of type T .
override string ToString()
void Add(T Item)
Adds an item to the collection.
T[] ToArray()
Returns an array containing all elements of the collection.
Class managing a script expression.
Base class for all nodes in a parsed script tree.
override string ToString()
Interface for classes implementing parameter options.