Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
LegalIdentityLink.cs
4
6{
11 {
16 {
17 }
18
24 public Grade Supports(Uri Link)
25 {
26 return string.Equals(Link.Scheme, Constants.UriSchemes.IotId, StringComparison.OrdinalIgnoreCase) ? Grade.Ok : Grade.NotAtAll;
27 }
28
30 public async Task<bool> TryOpenLink(Uri Link, bool ShowErrorIfUnable)
31 {
32 string? LegalId = Constants.UriSchemes.RemoveScheme(Link.OriginalString);
33 if (LegalId is null)
34 return false;
35
36 await ServiceRef.ContractOrchestratorService.OpenLegalIdentity(LegalId,
37 ServiceRef.Localizer[nameof(AppResources.ScannedQrCode)]);
38
39 return true;
40 }
41 }
42}
static ? string RemoveScheme(string Url)
Removes the URI Schema from an URL.
Definition: Constants.cs:218
const string IotId
The IoT ID URI Scheme (iotid)
Definition: Constants.cs:99
A set of never changing property constants and helpful values.
Definition: Constants.cs:7
Base class that references services in the app.
Definition: ServiceRef.cs:31
static IStringLocalizer Localizer
Localization service
Definition: ServiceRef.cs:235
static IContractOrchestratorService ContractOrchestratorService
Contract orchestrator service.
Definition: ServiceRef.cs:115
Grade
Grade enumeration
Definition: Grade.cs:7