Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ContractUpdatedNotificationEvent.cs
1
using
NeuroAccessMaui.Resources.Languages
;
2
using
NeuroAccessMaui.Services.UI
;
3
using
NeuroAccessMaui.UI.Pages.Contracts.MyContracts.ObjectModels
;
4
using
NeuroAccessMaui.UI.Pages.Contracts.ViewContract
;
5
using
System.Text;
6
using
Waher.Networking.XMPP.Contracts
;
7
using
Waher.Networking.XMPP.Contracts.EventArguments
;
8
9
namespace
NeuroAccessMaui.Services.Notification.Contracts
10
{
14
public
class
ContractUpdatedNotificationEvent
:
ContractNotificationEvent
15
{
19
public
ContractUpdatedNotificationEvent
()
20
: base()
21
{
22
}
23
29
public
ContractUpdatedNotificationEvent
(
Contract
Contract
,
ContractReferenceEventArgs
e)
30
: base(
Contract
, e)
31
{
32
}
33
37
public
override
async Task
Open
()
38
{
39
Contract
?
Contract
= await this.
GetContract
();
40
if
(Contract is not
null
)
41
{
42
ViewContractNavigationArgs Args =
new
(
Contract
,
false
);
43
44
await
ServiceRef
.
NavigationService
.
GoToAsync
(nameof(
ViewContractPage
), Args,
BackMethod
.Pop);
45
}
46
}
47
51
public
override
async Task<string>
GetDescription
()
52
{
53
Contract
?
Contract
= await this.
GetContract
();
54
if
(Contract is
null
)
55
return
string
.Empty;
56
57
StringBuilder Result =
new
();
58
59
Result.Append(
ServiceRef
.
Localizer
[nameof(
AppResources
.
ContractUpdateReceived
)]);
60
61
if
(
Contract
is not
null
)
62
{
63
Result.Append(
": "
);
64
Result.Append(await
ContractModel
.
GetCategory
(
Contract
));
65
}
66
67
Result.Append(
'.'
);
68
69
return
Result.ToString();
70
}
71
}
72
}
NeuroAccessMaui.Resources.Languages.AppResources
A strongly-typed resource class, for looking up localized strings, etc.
Definition:
AppResources.Designer.cs:25
NeuroAccessMaui.Resources.Languages.AppResources.ContractUpdateReceived
static string ContractUpdateReceived
Looks up a localized string similar to Contract updated.
Definition:
AppResources.Designer.cs:2271
NeuroAccessMaui.Services.Notification.Contracts.ContractNotificationEvent
Abstract base class of Contract notification events.
Definition:
ContractNotificationEvent.cs:15
NeuroAccessMaui.Services.Notification.Contracts.ContractNotificationEvent.GetContract
async Task< Contract?> GetContract()
Gets a parsed contract.
Definition:
ContractNotificationEvent.cs:100
NeuroAccessMaui.Services.Notification.Contracts.ContractUpdatedNotificationEvent
Notification event for when a contract has been updated.
Definition:
ContractUpdatedNotificationEvent.cs:15
NeuroAccessMaui.Services.Notification.Contracts.ContractUpdatedNotificationEvent.ContractUpdatedNotificationEvent
ContractUpdatedNotificationEvent(Contract Contract, ContractReferenceEventArgs e)
Notification event for when a contract has been updated.
Definition:
ContractUpdatedNotificationEvent.cs:29
NeuroAccessMaui.Services.Notification.Contracts.ContractUpdatedNotificationEvent.Open
override async Task Open()
Opens the event.
Definition:
ContractUpdatedNotificationEvent.cs:37
NeuroAccessMaui.Services.Notification.Contracts.ContractUpdatedNotificationEvent.GetDescription
override async Task< string > GetDescription()
Gets a descriptive text for the category of event.
Definition:
ContractUpdatedNotificationEvent.cs:51
NeuroAccessMaui.Services.Notification.Contracts.ContractUpdatedNotificationEvent.ContractUpdatedNotificationEvent
ContractUpdatedNotificationEvent()
Notification event for when a contract has been updated.
Definition:
ContractUpdatedNotificationEvent.cs:19
NeuroAccessMaui.Services.ServiceRef
Base class that references services in the app.
Definition:
ServiceRef.cs:43
NeuroAccessMaui.Services.ServiceRef.NavigationService
static INavigationService NavigationService
The navigation service for navigating between pages.
Definition:
ServiceRef.cs:178
NeuroAccessMaui.Services.ServiceRef.Localizer
static IReportingStringLocalizer Localizer
Localization service
Definition:
ServiceRef.cs:370
NeuroAccessMaui.UI.Pages.Contracts.MyContracts.ObjectModels.ContractModel
The data model for a contract.
Definition:
ContractModel.cs:20
NeuroAccessMaui.UI.Pages.Contracts.MyContracts.ObjectModels.ContractModel.GetCategory
static async Task< string?> GetCategory(Contract Contract)
Gets the category of a contract
Definition:
ContractModel.cs:85
NeuroAccessMaui.UI.Pages.Contracts.ViewContract.ViewContractPage
A page that displays a specific contract.
Definition:
ViewContractPage.xaml.cs:14
Waher.Networking.XMPP.Contracts.Contract
Contains the definition of a contract
Definition:
Contract.cs:22
Waher.Networking.XMPP.Contracts.EventArguments.ContractReferenceEventArgs
Event arguments for events referencing a contract.
Definition:
ContractReferenceEventArgs.cs:9
NeuroAccessMaui.Services.UI.INavigationService.GoToAsync
Task GoToAsync(string Route)
Navigates to the specified route and pushes the page onto the navigation stack.
NeuroAccessMaui.Resources.Languages
Definition:
AppResources.Designer.cs:11
NeuroAccessMaui.Services.Notification.Contracts
Definition:
ContractNotificationEvent.cs:10
NeuroAccessMaui.Services.UI
Definition:
BackMethod.cs:2
NeuroAccessMaui.Services.UI.BackMethod
BackMethod
Navigation Back Method
Definition:
BackMethod.cs:7
NeuroAccessMaui.UI.Pages.Contracts.MyContracts.ObjectModels
Definition:
ContractCategoryModel.cs:6
NeuroAccessMaui.UI.Pages.Contracts.ViewContract
Definition:
ViewContractNavigationArgs.cs:7
Waher.Networking.XMPP.Contracts.EventArguments
Definition:
ClientMessageEventArgs.cs:4
Waher.Networking.XMPP.Contracts
Definition:
AltitudeUse.cs:2
NeuroAccessMaui
NeuroAccessMaui
Services
Notification
Contracts
ContractUpdatedNotificationEvent.cs
Generated by
1.9.5