2using System.Collections.Generic;
3using System.Threading.Tasks;
69 public override async Task
Parse(XmlElement Xml)
71 this.ResponseVariable =
XML.
Attribute(Xml,
"responseVariable");
73 await base.Parse(Xml);
93 base.OnChildNodesUpdated();
95 this.resource = this.GetValueElement<Resource>();
96 this.content = this.GetValueElement<Notes.Content>();
97 this.headers = this.GetChildElements<Header>();
107 Uri ResourceUri =
new Uri(
Resource);
110 List<KeyValuePair<string, string>>
Headers =
new List<KeyValuePair<string, string>>();
112 if (!(this.headers is
null))
116 Headers.Add(
new KeyValuePair<string, string>(
125 Arguments.
Variables[
this.ResponseVariable] = Response;
Static class managing encoding and decoding of internet content.
static Task< object > PostAsync(Uri Uri, object Data, params KeyValuePair< string, string >[] Headers)
Posts to a resource, using a Uniform Resource Identifier (or Locator).
Helps with common XML-related tasks.
static string Attribute(XmlElement E, string Name)
Gets the value of an XML attribute.
Abstract base class for State-Machine action nodes.
Defines a HTTP POST action
Notes.Content Content
Content value
Header[] Headers
HTTP Headers
HttpPost()
Defines a HTTP POST action
string ResponseVariable
Optional response variable.
override string LocalName
Local name
override void OnChildNodesUpdated()
Method called whenever ChildNodes is updated.
override async Task Execute(EvaluationArguments Arguments)
Evaluates the action node
override async Task Parse(XmlElement Xml)
Parses the State-machine node.
override IStateMachineNode Create()
Creates a new node of the corresponding type.
Contains information required for evaluating script in a state-machine.
Variables Variables
Current set of variables.
void ConvertValueAttributesToElements(XmlElement Xml, Type[] ValueTypes, bool[] Required)
Converts value attributes to parsed elements. The XML definition has to be parsed before,...
Task< object > Evaluate(EvaluationArguments Arguments)
Evaluates the value node.
Interface for State-Machine nodes
delegate string ToString(IElement Element)
Delegate for callback methods that convert an element value to a string.