8using Microsoft.Maui.Controls.Shapes;
20 private Task<Token?>? tokenParseTask;
43 StringBuilder Xml =
new();
45 this.TokenXml = Xml.ToString();
92 this.tokenParseTask =
null;
98 StringBuilder Xml =
new();
100 this.TokenXml = Xml.ToString();
111 if (this.token is not
null)
114 if (
string.IsNullOrEmpty(this.
TokenXml))
117 if (this.tokenParseTask is
null)
118 this.tokenParseTask = this.ParseTokenAsync();
120 Token? ParsedToken = await this.tokenParseTask;
121 if (ParsedToken is not
null)
122 this.token = ParsedToken;
127 private async Task<Token?> ParseTokenAsync()
129 if (
string.IsNullOrEmpty(this.
TokenXml))
132 XmlDocument Doc =
new()
134 PreserveWhitespace =
true
160 return Task.FromResult(this.
TokenId ??
string.Empty);
166 public override async Task
Open()
168 if (
string.IsNullOrEmpty(this.
TokenId))
Abstract base class for token notification events.
string? TokenCategory
Category of token
TokenNotificationEvent(TokenEventArgs e)
Abstract base class for token notification events.
string? TokenXml
XML of token.
override async Task Open()
Opens the event.
override Task< Geometry > GetCategoryIcon()
Gets an icon for the category of event.
async Task< Token?> GetTokenAsync()
Gets the parsed token asynchronously, using cached XML if available.
TokenNotificationEvent(StateMachineEventArgs e)
Abstract base class for token notification events.
TokenNotificationEvent()
Abstract base class for token notification events.
string? FriendlyName
Friendly Name of token
override Task< string > GetDescription()
Gets a descriptive text for the event.
Abstract base class for wallet notification events.
Base class that references services in the app.
static INavigationService NavigationService
The navigation service for navigating between pages.
static INotificationService NotificationService
Service for managing notifications for the user.
static IXmppService XmppService
The XMPP service for XMPP communication.
Static class containing SVG Paths for symbols used in the app.
static readonly Geometry TokenIconPath
Token symbol for QR codes
Encapsulates a Token object.
Holds navigation parameters specific to a token.
A page that allows the user to view information about a token.
Event arguments for state-machine events.
Event arguments for token events.
string Category
A category for the token.
static async Task< Token > TryParse(XmlElement Xml)
Tries to parse a Token.
string FriendlyName
A friendly name for the token.
void Serialize(StringBuilder Xml)
Serializes the Token, in normalized form.
Task GoToAsync(string Route)
Navigates to the specified route and pushes the page onto the navigation stack.
abstract class NotificationEvent()
Abstract base class of notification events.
NotificationEventType
Button on which event is to be displayed.
BackMethod
Navigation Back Method