3using System.Threading.Tasks;
13 [CollectionName(
"SignatureRequests")]
15 [Index(
"Signed",
"Received")]
16 [Index(
"ContractId",
"Role",
"Received")]
19 private string objectId =
null;
21 private DateTime received = DateTime.MinValue;
22 private DateTime?
signed =
null;
23 private string contractXml =
string.Empty;
24 private string contractId =
string.Empty;
25 private string role =
string.Empty;
26 private string module =
string.Empty;
27 private string provider =
string.Empty;
28 private string purpose =
string.Empty;
44 set => this.objectId = value;
53 if (this.contract is
null)
55 XmlDocument Doc =
new XmlDocument()
57 PreserveWhitespace =
true
59 Doc.LoadXml(this.contractXml);
74 StringBuilder Xml =
new StringBuilder();
75 this.contract.
Serialize(Xml,
true,
true,
true,
true,
true,
true,
true);
76 this.contractXml = Xml.ToString();
82 [DefaultValueStringEmpty]
85 get => this.contractXml;
88 this.contractXml = value;
99 set => this.received = value;
108 set => this.signed = value;
116 get => this.contractId;
117 set => this.contractId = value;
126 set => this.role = value;
132 [DefaultValueStringEmpty]
136 set => this.module = value;
142 [DefaultValueStringEmpty]
145 get => this.provider;
146 set => this.provider = value;
152 [DefaultValueStringEmpty]
156 set => this.purpose = value;
Static class managing the runtime environment of the IoT Gateway.
static ContractsClient ContractsClient
XMPP Contracts Client, if such a compoent is available on the XMPP broker.
Contains information about a contract signature request.
ContractSignatureRequest()
Contains information about a contract signature request.
DateTime Received
When request was received.
DateTime? Signed
When contract was signed.
string Purpose
Purpose for signing the contract.
string ContractXml
XML of contract to sign.
string Module
Module making the request.
string ContractId
Contract ID
string Provider
Provider of the contract.
async Task< Contract > GetContract()
Gets the parsed contract.
void SetContract(Contract Contract)
Sets a parsed contract.
Contains the definition of a contract
static Task< ParsedContract > Parse(XmlDocument Xml)
Validates a contract XML Document, and returns the contract definition in it.
void Serialize(StringBuilder Xml, bool IncludeNamespace, bool IncludeIdAttribute, bool IncludeClientSignatures, bool IncludeAttachments, bool IncludeStatus, bool IncludeServerSignature, bool IncludeAttachmentReferences)
Serializes the Contract, in normalized form.
Contains information about a parsed contract.
Contract Contract
Contract object
TypeNameSerialization
How the type name should be serialized.