Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
CreationAttributesEventArgs.cs
1
using
Waher.Content.Xml
;
2
using
Waher.Networking.XMPP.Events
;
3
4
namespace
NeuroFeatures.EventArguments
5
{
9
public
class
CreationAttributesEventArgs
:
IqResultEventArgs
10
{
11
private
readonly
string
currency;
12
private
readonly
string
trustProviderId;
13
private
readonly decimal commission;
14
19
public
CreationAttributesEventArgs
(
IqResultEventArgs
e)
20
: base(e)
21
{
22
if
(e.
Ok
)
23
{
24
this.currency =
XML
.
Attribute
(e.
FirstElement
,
"currency"
);
25
this.commission =
XML
.
Attribute
(e.
FirstElement
,
"commission"
, 0m);
26
this.trustProviderId =
XML
.
Attribute
(e.
FirstElement
,
"trustProvider"
);
27
}
28
else
29
{
30
this.currency =
null
;
31
this.commission = 0;
32
this.trustProviderId =
null
;
33
}
34
}
35
39
public
string
Currency
=> this.currency;
40
44
public
string
TrustProviderId
=> this.trustProviderId;
45
49
public
decimal
Commission
=> this.commission;
50
}
51
}
NeuroFeatures.EventArguments.CreationAttributesEventArgs
Event arguments for callback methods to token creation attributes queries.
Definition:
CreationAttributesEventArgs.cs:10
NeuroFeatures.EventArguments.CreationAttributesEventArgs.TrustProviderId
string TrustProviderId
Legal ID used by the trust provider to sign contracts.
Definition:
CreationAttributesEventArgs.cs:44
NeuroFeatures.EventArguments.CreationAttributesEventArgs.CreationAttributesEventArgs
CreationAttributesEventArgs(IqResultEventArgs e)
Event arguments for callback methods to token queries.
Definition:
CreationAttributesEventArgs.cs:19
NeuroFeatures.EventArguments.CreationAttributesEventArgs.Currency
string Currency
Default currency used by the broker
Definition:
CreationAttributesEventArgs.cs:39
NeuroFeatures.EventArguments.CreationAttributesEventArgs.Commission
decimal Commission
Minimum commission (in %) expected by the trust provider, in order to sign contract.
Definition:
CreationAttributesEventArgs.cs:49
Waher.Content.Xml.XML
Helps with common XML-related tasks.
Definition:
XML.cs:19
Waher.Content.Xml.XML.Attribute
static string Attribute(XmlElement E, string Name)
Gets the value of an XML attribute.
Definition:
XML.cs:914
Waher.Networking.XMPP.Events.IqResultEventArgs
Event arguments for responses to IQ queries.
Definition:
IqResultEventArgs.cs:11
Waher.Networking.XMPP.Events.IqResultEventArgs.Ok
bool Ok
If the response is an OK result response (true), or an error response (false).
Definition:
IqResultEventArgs.cs:189
Waher.Networking.XMPP.Events.IqResultEventArgs.FirstElement
XmlElement FirstElement
First child element of the Response element.
Definition:
IqResultEventArgs.cs:145
NeuroFeatures.EventArguments
Definition:
CreationAttributesEventArgs.cs:5
Waher.Content.Xml
Definition:
XmlCodec.cs:11
Waher.Networking.XMPP.Events
Definition:
CustomPresenceEventArgs.cs:5
Waher.Networking.XMPP.NeuroFeatures
EventArguments
CreationAttributesEventArgs.cs
Generated by
1.9.5