2using System.Threading.Tasks;
44 StringBuilder Xml =
new StringBuilder();
45 TaskCompletionSource<bool> Result =
new TaskCompletionSource<bool>();
47 Xml.Append(
"<uri xmlns=\"");
49 Xml.Append(
"\" for=\"");
50 Xml.Append(
XML.
Encode(
this.Uri.State.Sender));
52 Xml.Append(
XML.
Encode(
this.Uri.UriString));
58 string.Empty, Xml.
ToString(), (sender2, e2) =>
63 this.Uri.State.Error(e2.ErrorType.ToString().ToLower(), string.Empty, this.Uri.PrincipalDomain +
" reports: " + e2.ErrorText);
65 Result.TrySetResult(e2.Ok);
67 return Task.CompletedTask;
75 return await Result.Task;
86 return Task.FromResult(
true);
96 return Task.FromResult(
true);
Helps with common XML-related tasks.
static string Encode(string s)
Encodes a string for use in XML.
XmppServer Server
XMPP Server.
Event arguments for responses to IQ queries.
XmlElement FirstElement
First child element of the Response element.
Contains information about one XMPP address.
override string ToString()
object.ToString()
Task< bool > SendIqRequest(string Type, string From, string To, string Language, string ContentXml, EventHandlerAsync< IqResultEventArgs > Callback, object State)
Sends an IQ stanza to a recipient.
CaseInsensitiveString Domain
Domain name.
async Task< CaseInsensitiveString > FindComponentAsync(CaseInsensitiveString Jid, CaseInsensitiveString Feature)
Finds a component having a specific feature, servicing a JID.
Represents a case-insensitive string.
Manages eDaler on accounts connected to the broker.
const string NamespaceEDaler
Namespace of eDaler component.
Abstract base class for eDaler transactions.
Relays processing of the URI to the principal domain.
RelayToPrimary(EDalerUri Uri)
Relays processing of the URI to the principal domain.
override Task< bool > DoCommit()
Performs actual commit.
override async Task< bool > DoExecute()
Performs actual execution.
override Task< bool > DoRollback()
Performs actual rollback.
override async Task< bool > DoPrepare()
Performs actual preparation.
Abstract base class for eDaler URIs
EDalerUriState State
URI State object.
EDalerComponent EDaler
eDaler component reference
CaseInsensitiveString PrincipalDomain
Principal domain (i.e domain controlling the execution of the transaction.)
virtual void Error(EDalerUriErrorType ErrorType, string ErrorMessage, bool LogAsNotice)
Reports an error with the URI
virtual void Result(string Xml)
Reports a positive result.
EDalerUriErrorType
Type of URI Error