Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ContractUpdatedNotificationEvent.cs
5using System.Text;
7
9{
14 {
19 : base()
20 {
21 }
22
28 public ContractUpdatedNotificationEvent(Contract Contract, ContractReferenceEventArgs e)
29 : base(Contract, e)
30 {
31 }
32
36 public override async Task Open()
37 {
38 Contract? Contract = await this.GetContract();
39 if (Contract is not null)
40 {
41 ViewContractNavigationArgs Args = new(Contract, false);
42
44 }
45 }
46
50 public override async Task<string> GetDescription()
51 {
52 Contract? Contract = await this.GetContract();
53 if (Contract is null)
54 return string.Empty;
55
56 StringBuilder Result = new();
57
58 Result.Append(ServiceRef.Localizer[nameof(AppResources.ContractUpdateReceived)]);
59
60 if (Contract is not null)
61 {
62 Result.Append(": ");
63 Result.Append(await ContractModel.GetCategory(Contract));
64 }
65
66 Result.Append('.');
67
68 return Result.ToString();
69 }
70 }
71}
ContractUpdatedNotificationEvent(Contract Contract, ContractReferenceEventArgs e)
Notification event for when a contract has been updated.
override async Task< string > GetDescription()
Gets a descriptive text for the category of event.
ContractUpdatedNotificationEvent()
Notification event for when a contract has been updated.
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
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