Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
RequestSignatureNotificationEvent.cs
1using System.Text;
6
8{
13 {
18 : base()
19 {
20 }
21
26 public RequestSignatureNotificationEvent(SignaturePetitionEventArgs e)
27 : base(e)
28 {
29 }
30
34 public override async Task Open()
35 {
36 if (this.Identity is not null &&
37 !string.IsNullOrEmpty(this.RequestorFullJid) &&
38 !string.IsNullOrEmpty(this.SignatoryIdentityId) &&
39 !string.IsNullOrEmpty(this.PetitionId) &&
40 !string.IsNullOrEmpty(this.Purpose) &&
41 this.ContentToSign is not null)
42 {
45 }
46 }
47
51 public override Task<string> GetDescription()
52 {
53 StringBuilder Result = new();
54
55 Result.Append(ServiceRef.Localizer[nameof(AppResources.RequestSignature)]);
56
57 if (this.Identity is not null)
58 {
59 Result.Append(": ");
60 Result.Append(ContactInfo.GetFriendlyName(this.Identity));
61 }
62
63 Result.Append('.');
64
65 return Task.FromResult(Result.ToString());
66 }
67
68 }
69}
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
override Task< string > GetDescription()
Gets a descriptive text for the category of event.
RequestSignatureNotificationEvent(SignaturePetitionEventArgs e)
Notification event for signature petitions.
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
Holds navigation parameters specific to views displaying a petition of a signature.
A page to display when the user is asked to petition a signature.