Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ContractProposalNotificationEvent.cs
5using System.Text;
7
9{
14 {
19 : base()
20 {
21 }
22
27 public ContractProposalNotificationEvent(ContractProposalEventArgs e)
28 : base(e)
29 {
30 this.Role = e.Role;
31 this.Message = e.MessageText;
32 }
33
37 public string? Role { get; set; }
38
42 public string? Message { get; set; }
43
47 public override async Task Open()
48 {
49 Contract? Contract = await this.GetContract();
50
51 if (Contract is not null)
52 {
53 ViewContractNavigationArgs Args = new(Contract, false, this.Role, this.Message);
54
56 }
57 }
58
62 public override async Task<string> GetDescription()
63 {
64 Contract? Contract = await this.GetContract();
65 StringBuilder Result = new();
66
67 Result.Append(ServiceRef.Localizer[nameof(AppResources.ContractProposal)]);
68 Result.Append(", ");
69 Result.Append(this.Role);
70
71 if (Contract is not null)
72 {
73 Result.Append(": ");
74 Result.Append(await ContractModel.GetCategory(Contract));
75 }
76
77 Result.Append('.');
78
79 return Result.ToString();
80 }
81 }
82}
override async Task< string > GetDescription()
Gets a descriptive text for the category of event.
ContractProposalNotificationEvent(ContractProposalEventArgs e)
Notification event for contract proposals.
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
static async Task< string?> GetCategory(Contract Contract)
Gets the category of a contract
Contains the definition of a contract
Definition: Contract.cs:22
Class defining a role
Definition: Role.cs:7
Task GoToAsync(string Route, BackMethod BackMethod=BackMethod.Inherited, string? UniqueId=null)
Navigates the AppShell to the specified route, with page arguments to match.
BackMethod
Navigation Back Method
Definition: BackMethod.cs:7