Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
RequestIdentityNotificationEvent.cs
1using System.Text;
6
8{
13 {
18 : base()
19 {
20 }
21
26 public RequestIdentityNotificationEvent(LegalIdentityPetitionEventArgs e)
27 : base(e)
28 {
29 }
30
34 public override async Task Open()
35 {
36 if (this.Identity is not null)
37 {
38 await ServiceRef.UiService.GoToAsync(nameof(PetitionIdentityPage), new PetitionIdentityNavigationArgs(
39 this.Identity, this.RequestorFullJid, this.SignatoryIdentityId, this.PetitionId, this.Purpose));
40 }
41 }
42
46 public override Task<string> GetDescription()
47 {
48 StringBuilder Result = new();
49
50 Result.Append(ServiceRef.Localizer[nameof(AppResources.RequestToAccessIdentity)]);
51
52 if (this.Identity is not null)
53 {
54 Result.Append(": ");
55 Result.Append(ContactInfo.GetFriendlyName(this.Identity));
56 }
57
58 Result.Append('.');
59
60 return Task.FromResult(Result.ToString());
61 }
62
63 }
64}
Contains information about a contact.
Definition: ContactInfo.cs:21
static async Task< string > GetFriendlyName(CaseInsensitiveString RemoteId)
Gets the friendly name of a remote identity (Legal ID or Bare JID).
Definition: ContactInfo.cs:257
RequestIdentityNotificationEvent(LegalIdentityPetitionEventArgs e)
Notification event for identity petitions.
override Task< string > GetDescription()
Gets a descriptive text for the category of event.
Base class that references services in the app.
Definition: ServiceRef.cs:31
static IUiService UiService
Service serializing and managing UI-related tasks.
Definition: ServiceRef.cs:55
static IStringLocalizer Localizer
Localization service
Definition: ServiceRef.cs:235
A page to display when the user is asked to petition an identity.