2using System.Collections.Generic;
3using System.Threading.Tasks;
39 if (!(this.transaction is
null))
56 ObjectId = this.
Uri.
Id,
58 Processed = DateTime.UtcNow,
61 To = this.Uri.To.IsEmpty ? CaseInsensitiveString.Empty : this.
Uri.
To.
Address,
62 ToType = this.Uri.To.IsEmpty ? EntityType.NetworkJid : this.
Uri.
ToType,
66 Uri = this.Uri.UriString
101 new KeyValuePair<string, object>(
"Amount",
this.transaction.Amount),
102 new KeyValuePair<string, object>(
"Currency",
this.transaction.Currency.Value),
103 new KeyValuePair<string, object>(
"RefId",
this.transaction.ObjectId.ToString()),
104 new KeyValuePair<string, object>(
"Sender",
this.transaction.Sender.Value),
105 new KeyValuePair<string, object>(
"From",
this.transaction.From.Value),
106 new KeyValuePair<string, object>(
"To",
this.transaction.To.Value),
107 new KeyValuePair<string, object>(
"Uri",
this.transaction.Uri));
109 this.
LogEvent(this.transaction.To,
this.transaction.From,
110 this.transaction.Amount,
this.transaction.Currency, Tags);
123 protected abstract void LogEvent(
string To,
string From, decimal Amount,
string Currency,
124 KeyValuePair<string, object>[] Tags);
132 if (!(this.transaction is
null))
135 this.transaction =
null;
Static class managing the application event log. Applications and services log events on this static ...
static void Exception(Exception Exception, string Object, string Actor, string EventId, EventLevel Level, string Facility, string Module, params KeyValuePair< string, object >[] Tags)
Logs an exception. Event type will be determined by the severity of the exception.
Contains information about one XMPP address.
CaseInsensitiveString Address
XMPP Address
CaseInsensitiveString BareJid
Bare JID
Static interface for database persistence. In order to work, a database provider has to be assigned t...
static async Task Delete(object Object)
Deletes an object in the database.
static async Task Insert(object Object)
Inserts an object into the default collection of the database.
static Task< object > TryLoadObject(string CollectionName, object ObjectId)
Tries to load an object given its Object ID ObjectId and its collection name CollectionName .
An attempt to insert a key was done, but the key was already there.
Transaction()
Abstract base class for transactions.
Class that monitors login events, and help applications determine malicious intent....
static async Task< KeyValuePair< string, object >[]> Annotate(string RemoteEndpoint, params KeyValuePair< string, object >[] Tags)
Annotates a remote endpoint.
Abstract base class for primary transaction objects (i.e. objects that control the transaction).
override async Task< bool > DoRollback()
Performs actual rollback.
override async Task< bool > DoCommit()
Performs actual commit.
abstract void LogEvent(string To, string From, decimal Amount, string Currency, KeyValuePair< string, object >[] Tags)
Logs an event corresponding to the transaction.
EDalerPrimaryTransaction(EDalerUri Uri)
Abstract base class for primary transaction objects (i.e. objects that control the transaction).
override async Task< bool > DoExecute()
Performs actual execution.
override async Task< bool > DoPrepare()
Performs actual preparation.
Abstract base class for eDaler transactions.
Abstract base class for eDaler URIs
EntityType ToType
Type of recipient.
EntityType FromType
Type of sender
EDalerUriState State
URI State object.
DateTime Created
When URI was created
decimal TotalAmount
Total amount: Amount+AmountExtra
virtual void Error(EDalerUriErrorType ErrorType, string ErrorMessage, bool LogAsNotice)
Reports an error with the URI
virtual CaseInsensitiveString OriginalSender
Who the original sender of the URI is.
virtual void Result(string Xml)
Reports a positive result.
EDalerUriErrorType
Type of URI Error