Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
NeuroAccessMaui.App Class Reference

The Application class, representing an instance of the Neuro-Access app. More...

Inheritance diagram for NeuroAccessMaui.App:

Public Member Functions

 App ()
 
 App (bool BackgroundStart)
 
async Task OnBackgroundStart ()
 Awaiting the services start in the background. More...
 
async Task DoResume (bool BackgroundStart)
 Resume the services start in the background. More...
 
async Task OnBackgroundSleep ()
 Awaiting the services stop in the background. More...
 
void Dispose ()
 IDisposable.Dispose More...
 

Static Public Member Functions

static T Instantiate< T > ()
 Instantiates an object of type T , after assuring default instances have been created first. Assures singleton classes are only instantiated once, and that the reference to the singleton instance is returned. More...
 
static Task SetRegistrationPageAsync ()
 Switches the application to the on-boarding experience. More...
 
static Task SetMainPageAsync ()
 Switches the application to the main experience. More...
 
static Task SetPage (string PagePath)
 Sets the current page, if not already shown. More...
 
static async Task EvaluateDatabaseDiff (string FileName, bool IncludeUnchanged, bool SendAsAlert)
 Sends the contents of the database to support. More...
 
static void OpenUrlSync (string Url)
 Opens an URL in the application. More...
 
static Task< bool > OpenUrlAsync (string Url)
 Opens an URL in the application. More...
 
static Task< bool > OpenUrlAsync (string Url, bool ShowErrorIfUnable)
 Opens an URL in the application. More...
 
static async Task< string?> InputPassword (AuthenticationPurpose Purpose)
 Asks the user to input its password. Password is verified before being returned. More...
 
static Task< bool > AuthenticateUser (AuthenticationPurpose Purpose, bool Force=false)
 Authenticates the user using the configured authentication method. More...
 
static async Task CheckUserBlocking ()
 Verify if the user is blocked and show an alert More...
 
static async Task< bool > CheckPasswordAndUnblockUser (string Password)
 Check the Password and reset the blocking counters if it matches More...
 

Static Public Attributes

static readonly LanguageInfo[] SupportedLanguages
 Supported languages. More...
 

Protected Member Functions

override void OnStart ()
 
override async void OnResume ()
 
override async void OnSleep ()
 
virtual void Dispose (bool disposing)
 IDisposable.Dispose More...
 

Properties

static new? App Current [get]
 Gets the current application, type casted to App. More...
 
static bool IsOnboarded [get]
 Gets a value indicating if the application has completed on-boarding. More...
 
static LanguageInfo SelectedLanguage [get]
 Selected language. More...
 

Detailed Description

The Application class, representing an instance of the Neuro-Access app.

Definition at line 68 of file App.xaml.cs.

Constructor & Destructor Documentation

◆ App() [1/2]

NeuroAccessMaui.App.App ( )

Definition at line 102 of file App.xaml.cs.

◆ App() [2/2]

NeuroAccessMaui.App.App ( bool  BackgroundStart)

!! replace this logic with static variables

Definition at line 108 of file App.xaml.cs.

Member Function Documentation

◆ AuthenticateUser()

static Task< bool > NeuroAccessMaui.App.AuthenticateUser ( AuthenticationPurpose  Purpose,
bool  Force = false 
)
static

Authenticates the user using the configured authentication method.

Parameters
PurposePurpose for requesting the user to authenticate itself.
ForceIf authentication is strictly required.
Returns
If the user has been successfully authenticated.

Definition at line 981 of file App.xaml.cs.

◆ CheckPasswordAndUnblockUser()

static async Task< bool > NeuroAccessMaui.App.CheckPasswordAndUnblockUser ( string  Password)
static

Check the Password and reset the blocking counters if it matches

Parameters
PasswordPassword to check.

Definition at line 1077 of file App.xaml.cs.

◆ CheckUserBlocking()

static async Task NeuroAccessMaui.App.CheckUserBlocking ( )
static

Verify if the user is blocked and show an alert

Definition at line 1037 of file App.xaml.cs.

◆ Dispose() [1/2]

void NeuroAccessMaui.App.Dispose ( )

IDisposable.Dispose

Definition at line 1148 of file App.xaml.cs.

◆ Dispose() [2/2]

virtual void NeuroAccessMaui.App.Dispose ( bool  disposing)
protectedvirtual

IDisposable.Dispose

Definition at line 1157 of file App.xaml.cs.

◆ DoResume()

async Task NeuroAccessMaui.App.DoResume ( bool  BackgroundStart)

Resume the services start in the background.

Definition at line 408 of file App.xaml.cs.

◆ EvaluateDatabaseDiff()

static async Task NeuroAccessMaui.App.EvaluateDatabaseDiff ( string  FileName,
bool  IncludeUnchanged,
bool  SendAsAlert 
)
static

Sends the contents of the database to support.

Parameters
FileNameName of file used to keep track of state changes.
IncludeUnchangedIf unchanged material should be included.
SendAsAlertIf an alert is to be sent.

Definition at line 828 of file App.xaml.cs.

◆ InputPassword()

static async Task< string?> NeuroAccessMaui.App.InputPassword ( AuthenticationPurpose  Purpose)
static

Asks the user to input its password. Password is verified before being returned.

Parameters
PurposePurpose for requesting the user to authenticate itself.
Returns
Password, if the user has provided the correct password. Empty string, if password is not configured, null if operation is cancelled.

Definition at line 941 of file App.xaml.cs.

◆ Instantiate< T >()

static T NeuroAccessMaui.App.Instantiate< T > ( )
static

Instantiates an object of type T , after assuring default instances have been created first. Assures singleton classes are only instantiated once, and that the reference to the singleton instance is returned.

Template Parameters
TType of object to instantiate.
Returns
Instance

Definition at line 357 of file App.xaml.cs.

◆ OnBackgroundSleep()

async Task NeuroAccessMaui.App.OnBackgroundSleep ( )

Awaiting the services stop in the background.

Definition at line 491 of file App.xaml.cs.

◆ OnBackgroundStart()

async Task NeuroAccessMaui.App.OnBackgroundStart ( )

Awaiting the services start in the background.

Definition at line 375 of file App.xaml.cs.

◆ OnResume()

override async void NeuroAccessMaui.App.OnResume ( )
protected

Definition at line 417 of file App.xaml.cs.

◆ OnSleep()

override async void NeuroAccessMaui.App.OnSleep ( )
protected

Definition at line 497 of file App.xaml.cs.

◆ OnStart()

override void NeuroAccessMaui.App.OnStart ( )
protected

Definition at line 389 of file App.xaml.cs.

◆ OpenUrlAsync() [1/2]

static Task< bool > NeuroAccessMaui.App.OpenUrlAsync ( string  Url)
static

Opens an URL in the application.

Parameters
UrlURL
Returns
If URL is processed or not.

Definition at line 919 of file App.xaml.cs.

◆ OpenUrlAsync() [2/2]

static Task< bool > NeuroAccessMaui.App.OpenUrlAsync ( string  Url,
bool  ShowErrorIfUnable 
)
static

Opens an URL in the application.

Parameters
UrlURL
ShowErrorIfUnableIf an error message should be displayed, in case the URI could not be opened.
Returns
If URL is processed or not.

Definition at line 930 of file App.xaml.cs.

◆ OpenUrlSync()

static void NeuroAccessMaui.App.OpenUrlSync ( string  Url)
static

Opens an URL in the application.

Parameters
UrlURL
Returns
If URL is processed or not.

Definition at line 906 of file App.xaml.cs.

◆ SetMainPageAsync()

static Task NeuroAccessMaui.App.SetMainPageAsync ( )
static

Switches the application to the main experience.

Definition at line 666 of file App.xaml.cs.

◆ SetPage()

static Task NeuroAccessMaui.App.SetPage ( string  PagePath)
static

Sets the current page, if not already shown.

Parameters
PagePathPath to current page.

Definition at line 675 of file App.xaml.cs.

◆ SetRegistrationPageAsync()

static Task NeuroAccessMaui.App.SetRegistrationPageAsync ( )
static

Switches the application to the on-boarding experience.

Definition at line 658 of file App.xaml.cs.

Member Data Documentation

◆ SupportedLanguages

readonly LanguageInfo [] NeuroAccessMaui.App.SupportedLanguages
static
Initial value:
=
[
new("en", "English"),
new("sv", "svenska"),
new("es", "español"),
new("fr", "français"),
new("de", "Deutsch"),
new("da", "dansk"),
new("no", "norsk"),
new("fi", "suomi"),
new("sr", "српски"),
new("pt", "português"),
new("ro", "română"),
new("ru", "русский"),
]

Supported languages.

Definition at line 176 of file App.xaml.cs.

Property Documentation

◆ Current

new? App NeuroAccessMaui.App.Current
staticget

Gets the current application, type casted to App.

Definition at line 99 of file App.xaml.cs.

◆ IsOnboarded

bool NeuroAccessMaui.App.IsOnboarded
staticget

Gets a value indicating if the application has completed on-boarding.

This is not the same as TagProfile.IsComplete. TagProfile.IsComplete is required but not sufficient for the application to be "on-boarded". An application is on-boarded when its legal identity is on-boarded and when its internal systems are ready. For example, the loading stage of the app must complete.

Definition at line 171 of file App.xaml.cs.

◆ SelectedLanguage

LanguageInfo NeuroAccessMaui.App.SelectedLanguage
staticget

Selected language.

Definition at line 195 of file App.xaml.cs.


The documentation for this class was generated from the following file: