3using System.Threading.Tasks;
70 public override async Task
Parse(XmlElement Xml)
72 this.ResponseVariable =
XML.
Attribute(Xml,
"responseVariable");
74 await base.Parse(Xml);
94 base.OnChildNodesUpdated();
96 this.resource = this.GetValueElement<Resource>();
97 this.content = this.GetValueElement<Notes.Content>();
98 this.headers = this.GetChildElements<Header>();
108 Uri ResourceUri =
new Uri(
Resource);
111 List<KeyValuePair<string, string>>
Headers =
new List<KeyValuePair<string, string>>();
113 if (!(this.headers is
null))
117 Headers.Add(
new KeyValuePair<string, string>(
127 throw Response.
Error;
Contains information about a response to a content request.
bool HasError
If an error occurred.
object Decoded
Decoded object.
Exception Error
Error response.
Static class managing encoding and decoding of internet content.
static Task< ContentResponse > 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.
Static class managing the runtime environment of the IoT Gateway.
static X509Certificate2 Certificate
Domain certificate.
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.