Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
PageAppExtension.cs
1using CommunityToolkit.Maui;
2using CommunityToolkit.Maui.Services;
54using NeuroAccessMaui.UI.Pages.Startup; // LoadingPage
95
96namespace NeuroAccessMaui.UI
97{
101 public static class PageAppExtension
102 {
108 public static MauiAppBuilder RegisterTypes(this MauiAppBuilder Builder)
109 {
110 // Instantiate default services.
111 Builder.Services.AddSingleton<ITagProfile>((_) => Types.InstantiateDefault<ITagProfile>(false));
112 Builder.Services.AddSingleton<ILogService>((_) => Types.InstantiateDefault<ILogService>(false));
113 Builder.Services.AddSingleton<IUiService>((_) => Types.InstantiateDefault<IUiService>(false));
114 Builder.Services.AddSingleton<ICryptoService>((_) => Types.InstantiateDefault<ICryptoService>(false));
115 Builder.Services.AddSingleton<INetworkService>((_) => Types.InstantiateDefault<INetworkService>(false));
116 Builder.Services.AddSingleton<IStorageService>((_) => Types.InstantiateDefault<IStorageService>(false));
117 Builder.Services.AddSingleton<ISettingsService>((_) => Types.InstantiateDefault<ISettingsService>(false));
118 Builder.Services.AddSingleton<IAuthenticationService>((_) => Types.InstantiateDefault<IAuthenticationService>(false));
119 Builder.Services.AddSingleton<IXmppService>((_) => Types.InstantiateDefault<IXmppService>(false));
120 Builder.Services.AddSingleton<IPushTransport, FirebasePushTransport>();
121 Builder.Services.AddSingleton<IPushTokenRegistrar, PushTokenRegistrar>();
122 Builder.Services.AddSingleton<INotificationRenderer>((_) =>
123 {
124#if ANDROID
125 return new AndroidNotificationRenderer();
126#elif IOS || MACCATALYST
127 return new IosNotificationRenderer();
128#else
129 return new DefaultNotificationRenderer();
130#endif
131 });
132 Builder.Services.AddSingleton<INotificationFilterRegistry, NotificationFilterRegistry>();
133 Builder.Services.AddSingleton<INotificationIntentRouter, NotificationIntentRouter>();
134 Builder.Services.AddSingleton<INotificationServiceV2, NotificationServiceV2>();
135 Builder.Services.AddSingleton<IPushNotificationService, PushNotificationService>();
136 Builder.Services.AddSingleton<IAttachmentCacheService>((_) => Types.InstantiateDefault<IAttachmentCacheService>(false));
137 Builder.Services.AddSingleton<IInternetCacheService>((_) => Types.InstantiateDefault<IInternetCacheService>(false));
138 Builder.Services.AddSingleton<IContractOrchestratorService>((_) => Types.InstantiateDefault<IContractOrchestratorService>(false));
139 Builder.Services.AddSingleton<INfcService>((_) => Types.InstantiateDefault<INfcService>(false));
140 Builder.Services.AddSingleton<INotificationService>((_) => Types.InstantiateDefault<INotificationService>(false));
141 Builder.Services.AddSingleton<IIntentService>((_) => Types.InstantiateDefault<IIntentService>(false));
142 Builder.Services.AddSingleton<IXmlSchemaValidationService>((_) => Types.InstantiateDefault<IXmlSchemaValidationService>(false));
143 Builder.Services.AddSingleton<IThemeService>((_) => Types.InstantiateDefault<IThemeService>(false));
144 Builder.Services.AddSingleton<INavigationService>((_) => Types.InstantiateDefault<NavigationService>(false));
145 Builder.Services.AddSingleton<IPopupService, PopupService>();
146 Builder.Services.AddSingleton<IToastService, ToastService>();
147 Builder.Services.AddSingleton<IMotionSettings, MotionSettings>();
148 Builder.Services.AddSingleton<IAnimationRegistry>((_) =>
149 {
150 AnimationRegistry Registry = new AnimationRegistry();
152 return Registry;
153 });
154 Builder.Services.AddSingleton<IAnimationContextProvider, AnimationContextProvider>();
155 Builder.Services.AddSingleton<IAnimationCoordinator, AnimationCoordinator>();
156
157 return Builder;
158 }
159
165 public static MauiAppBuilder RegisterPages(this MauiAppBuilder Builder)
166 {
167 // Applications
168 Builder.Services.AddTransient<ApplicationsPage, ApplicationsViewModel>();
169 Builder.Services.AddTransient<KycProcessPage, KycProcessViewModel>();
170
171 // Contacts
172 Builder.Services.AddTransient<ChatPage, ChatViewModel>();
173 Builder.Services.AddTransient<MyContactsPage, ContactListViewModel>();
174
175 // Contracts
176 Builder.Services.AddTransient<MyContractsPage, MyContractsViewModel>();
177 Builder.Services.AddTransient<NewContractPage, NewContractViewModel>();
178 Builder.Services.AddTransient<ViewContractPage, ViewContractViewModel>();
179
180 // Identity
181 Builder.Services.AddTransient<TransferIdentityPage, TransferIdentityViewModel>();
182 Builder.Services.AddTransient<ViewIdentityPage, ViewIdentityViewModel>();
183
184 // Main
185 Builder.Services.AddSingleton<CustomShell>();
186 Builder.Services.AddTransient<CalculatorPage, CalculatorViewModel>();
187 Builder.Services.AddTransient<ChangePasswordPage, ChangePasswordViewModel>();
188 Builder.Services.AddTransient<DurationPage, DurationViewModel>();
189 Builder.Services.AddTransient<HomePage, HomeViewModel>();
190 Builder.Services.AddTransient<MainPage, MainViewModel>();
191 Builder.Services.AddTransient<ScanQrCodePage, ScanQrCodeViewModel>();
192 Builder.Services.AddTransient<SettingsPage, SettingsViewModel>();
193 Builder.Services.AddTransient<VerifyCodePage, VerifyCodeViewModel>();
194 Builder.Services.AddTransient<XmppFormPage, XmppViewModel>();
195 Builder.Services.AddTransient<AppsPage, AppsViewModel>();
196 // Startup page
197 Builder.Services.AddTransient<LoadingPage>();
198
199 //Notification
200 Builder.Services.AddTransient<NotificationsPage, NotificationsViewModel>();
201
202
203 // Petitions
204 Builder.Services.AddTransient<PetitionContractPage, PetitionContractViewModel>();
205 Builder.Services.AddTransient<PetitionIdentityPage, PetitionIdentityViewModel>();
206 Builder.Services.AddTransient<PetitionPeerReviewPage, PetitionPeerReviewViewModel>();
207 Builder.Services.AddTransient<PetitionSignaturePage, PetitionSignatureViewModel>();
208 Builder.Services.AddTransient<PhotoView, EmptyViewModel>();
209 Builder.Services.AddTransient<NameView, EmptyViewModel>();
210 Builder.Services.AddTransient<PnrView, EmptyViewModel>();
211 Builder.Services.AddTransient<NationalityView, EmptyViewModel>();
212 Builder.Services.AddTransient<BirthDateView, EmptyViewModel>();
213 Builder.Services.AddTransient<GenderView, EmptyViewModel>();
214 Builder.Services.AddTransient<PersonalAddressInfoView, EmptyViewModel>();
215 Builder.Services.AddTransient<OrganizationalInfoView, EmptyViewModel>();
216 Builder.Services.AddTransient<ConsentView, EmptyViewModel>();
217 Builder.Services.AddTransient<AuthenticateView, EmptyViewModel>();
218 Builder.Services.AddTransient<ApprovedView, EmptyViewModel>();
219
220 Builder.Services.AddTransient<PetitionPeerReviewNavigationArgs>();
221
222
223 // Onboarding
224 Builder.Services.AddTransient<OnboardingPage, OnboardingViewModel>();
225 Builder.Services.AddTransient<WelcomeStepView, WelcomeOnboardingStepViewModel>();
226 Builder.Services.AddTransient<CreateAccountStepView, CreateAccountOnboardingStepViewModel>();
227 Builder.Services.AddTransient<NameEntryStepView, NameEntryOnboardingStepViewModel>();
228 Builder.Services.AddTransient<DefinePasswordStepView, DefinePasswordOnboardingStepViewModel>();
229 Builder.Services.AddTransient<ValidateEmailStepView, ValidateEmailOnboardingStepViewModel>(); // Fixed registration
230 Builder.Services.AddTransient<ValidatePhoneStepView, ValidatePhoneOnboardingStepViewModel>(); // Fixed registration
231 Builder.Services.AddTransient<BiometricsStepView, BiometricsOnboardingStepViewModel>();
232 Builder.Services.AddTransient<FinalizeStepView, FinalizeOnboardingStepViewModel>(); // Added missing finalize step
233
234
235 // Signatures
236 Builder.Services.AddTransient<ClientSignaturePage, ClientSignatureViewModel>();
237 Builder.Services.AddTransient<ServerSignaturePage, ServerSignatureViewModel>();
238
239 // Things
240 Builder.Services.AddTransient<CanControlPage, CanControlViewModel>();
241 Builder.Services.AddTransient<CanReadPage, CanReadViewModel>();
242 Builder.Services.AddTransient<IsFriendPage, IsFriendViewModel>();
243 Builder.Services.AddTransient<MyThingsPage, MyThingsViewModel>();
244 Builder.Services.AddTransient<ReadSensorPage, ReadSensorViewModel>();
245 Builder.Services.AddTransient<ViewClaimThingPage, ViewClaimThingViewModel>();
246 Builder.Services.AddTransient<ViewThingPage, ViewThingViewModel>();
247
248 // Wallet
249 Builder.Services.AddTransient<AccountEventPage, AccountEventViewModel>();
250 Builder.Services.AddTransient<BuyEDalerPage, BuyEDalerViewModel>();
251 Builder.Services.AddTransient<EDalerReceivedPage, EDalerReceivedViewModel>();
252 Builder.Services.AddTransient<IssueEDalerPage, EDalerUriViewModel>();
253 Builder.Services.AddTransient<MachineReportPage, MachineReportViewModel>();
254 Builder.Services.AddTransient<MachineVariablesPage, MachineVariablesViewModel>();
255 Builder.Services.AddTransient<MyTokensPage, MyTokensViewModel>();
256 Builder.Services.AddTransient<MyEDalerWalletPage, MyWalletViewModel>();
257 Builder.Services.AddTransient<MyTokenWalletPage, MyWalletViewModel>();
258 Builder.Services.AddTransient<PaymentPage, EDalerUriViewModel>();
259 Builder.Services.AddTransient<PaymentAcceptancePage, EDalerUriViewModel>();
260 Builder.Services.AddTransient<PendingPaymentPage, EDalerUriViewModel>();
261 Builder.Services.AddTransient<RequestPaymentPage, RequestPaymentViewModel>();
262 Builder.Services.AddTransient<SellEDalerPage, SellEDalerViewModel>();
263 Builder.Services.AddTransient<SendPaymentPage, EDalerUriViewModel>();
264 Builder.Services.AddTransient<ServiceProvidersPage, ServiceProvidersViewModel>();
265 Builder.Services.AddTransient<TokenDetailsPage, TokenDetailsViewModel>();
266 Builder.Services.AddTransient<TokenEventsPage, TokenEventsViewModel>();
267 Builder.Services.AddTransient<WalletPage, WalletViewModel>();
268 Builder.Services.AddTransient<TransactionHistoryPage, TransactionHistoryViewModel>();
269 Builder.Services.AddTransient<EmbeddedLayoutPage, EmbeddedLayoutViewModel>();
270
271 // Popups
272 Builder.Services.AddTransient<ImageView>();
273 Builder.Services.AddTransient<ImageViewModel>();
274 Builder.Services.AddTransient<AddTextNotePopup>();
275 Builder.Services.AddTransient<AddTextNoteViewModel>();
276 Builder.Services.AddTransient<CheckPasswordPopup>();
277 Builder.Services.AddTransient<CheckPasswordViewModel>();
278 Builder.Services.AddTransient<OnboardingHelpPopup>();
279 Builder.Services.AddTransient<OnboardingHelpViewModel>();
280 Builder.Services.AddTransient<SelectLanguagePopup>();
281 Builder.Services.AddTransient<SelectLanguagePopupViewModel>();
282
283 // Xmpp
284 Builder.Services.AddTransient<RemoveSubscriptionPopup>();
285 Builder.Services.AddTransient<RemoveSubscriptionViewModel>();
286 Builder.Services.AddTransient<ReportOrBlockPopup>();
287 Builder.Services.AddTransient<ReportOrBlockViewModel>();
288 Builder.Services.AddTransient<ReportTypePopup>();
289 Builder.Services.AddTransient<ReportTypeViewModel>();
290 Builder.Services.AddTransient<SubscribeToPopup>();
291 Builder.Services.AddTransient<SubscribeToViewModel>();
292 Builder.Services.AddTransient<SubscriptionRequestPopup>();
293 Builder.Services.AddTransient<SubscriptionRequestViewModel>();
294
295 //Utility
296 Builder.Services.AddTransient<ImageCropperView, ImageCroppingViewModel>();
297
298 return Builder;
299 }
300 }
301}
Helper responsible for registering default animation descriptors.
static void RegisterDefaults(IAnimationRegistry Registry)
Registers default animation descriptors with the supplied registry.
Default implementation of IAnimationContextProvider.
Default implementation of IAnimationCoordinator.
Default implementation of IAnimationRegistry.
Default implementation of IMotionSettings.
Manages runtime notification filters (ignore rules).
Default router for notification intents. Wiring to navigation can be extended here.
Redesigned notification service with Waher persistence.
No-op renderer used until platform-specific implementations are provided.
Firebase Cloud Messaging transport adapter.
Handles deduplication and reporting of push notification tokens to the broker.
Custom shell hosting app content, popups and Toast layers.
Definition: CustomShell.cs:19
Navigation service managing a custom stack of BaseContentPage instances. Modal navigation is deprecat...
A custom view that displays an image with pinch-zoom, pan, and rotation support, and allows cropping ...
Extension methods used during application startup for registering services and pages.
static MauiAppBuilder RegisterPages(this MauiAppBuilder Builder)
Registers all MAUI pages and their corresponding view models in the dependency injection container.
static MauiAppBuilder RegisterTypes(this MauiAppBuilder Builder)
Registers core application services and infrastructure singletons.
The view model to bind to for when displaying the applications page.
A page that displays a list of the current user's contacts.
The view model to bind to when displaying the list of contacts.
The view model to bind to when displaying the list of contacts.
A page that displays a list of the current user's contacts.
A page that displays a list of the current user's contracts.
View model responsible for presenting and filtering a list of contracts and templates....
A page that allows the user to create a new contract.
View model for displaying and managing a contract in the "View Contract" page.
A page to display when the user wants to transfer an identity.
A page to display when the user wants to view an identity.
Orchestrates the interactive KYC flow, covering navigation, validation, summary projection,...
A page that allows the user to calculate the value of a numerical input field.
The view model to bind to for when displaying the calculator.
A page that allows the user to duration the value of a numerical input field.
The view model to bind to for when displaying the duration.
Provides the tab definitions and selection state for the main view-switcher surface.
A page to display for scanning of a QR code, either automatically via the camera, or by entering the ...
The view model to bind to when scanning a QR code.
The view model to bind to for when displaying the settings page.
The view model to bind to when verifying a code.
A page that displays an XMPP Form to the user.
Mirrors registration create-account behaviour for onboarding: waits for XMPP, applies for identity,...
Onboarding step for defining a password or PIN. Shows strength feedback but only hard validation rule...
Onboarding step ViewModel for validating e-mail. Updated to mirror registration validation (continuou...
Onboarding step ViewModel for validating the phone number. Updated to mirror registration validation ...
Provides state and logic for the welcome onboarding step, including invite and QR handling.
A page to display when the user is asked to petition a contract.
The view model to bind to when displaying petitioning of a contract in a view or page.
A page to display when the user is asked to petition an identity.
The view model to bind to when displaying petitioning of an identity in a view or page.
A page to display when the user is asked to review an identity application.
The view model to bind to when displaying petitioning of an identity in a view or page.
A page to display when the user is asked to petition a signature.
The view model to bind to when displaying petitioning of a signature in a view or page.
The view model to bind to for when displaying client signatures.
The view model to bind to for when displaying server signatures.
A page that asks the user if a remote entity is allowed to control the device.
The view model to bind to when displaying a thing.
A page that asks the user if a remote entity is allowed to read the device.
The view model to bind to when displaying a thing.
A page that asks the user if a remote entity is allowed to connect to a device.
The view model to bind to when displaying a thing.
A page that displays a list of the current user's things.
A page that displays sensor data from a sensor.
The view model to bind to when displaying a thing.
The view model to bind to for when displaying thing claim information.
A page that displays information about a thing and allows the user to interact with it.
The view model to bind to when displaying a thing.
The ViewModel for ImageCroppingPage. Handles cropping commands and navigation logic.
A page that allows the user to view information about an account event.
The view model to bind to for when displaying the contents of an account event.
A page that allows the user to buy eDaler.
The view model to bind to for buying eDaler.
A page that displays information about eDaler received.
The view model to bind to for displaying information about an incoming balance change.
The view model to bind to for when displaying the contents of an eDaler URI.
View model for displaying a rendered embedded layout associated with a token.
A page that allows the user to receive newly issued eDaler.
A page that allows the user to view a state-machine report.
The view model to bind to for when displaying information about the current state of a state-machine.
A page that allows the user to view information about the current state of a state-machine.
The view model to bind to for when displaying information about the current state of a state-machine.
A page that allows the user to view its tokens.
A page that allows the user to view the contents of its eDaler wallet, pending payments and recent ac...
A page that allows the user to view the contents of its token wallet, pending payments and recent acc...
A page that allows the user to view the contents of its eDaler wallet, pending payments and recent ac...
ViewModel for the Wallet page, handling balance display, buy flow, and related navigation.
A page that allows the user to realize payments.
A page that allows the user to accept an offline payment.
A page that allows the user to view information about a pending payment.
A page that displays information about eDaler received.
A page that allows the user to sell eDaler.
A page that allows the user to realize payments.
The view model to bind to for when displaying a list of service providers.
A page that allows the user to view information about a token.
A page that allows the user to view information about a token.
The view model to bind to for when displaying the events of a token.
View model for the Transaction History page. Loads and pages through eDaler account events.
A view model that holds the XMPP state.
Popup view for entering a password that will be validated against the stored credentials.
View model for page letting the user enter a password to be verified with the password defined by the...
A generic UI component to display an image.
The class to use as binding context for displaying images.
Prompts the user for text to add as a note for a token.
View model for popup page prompting the user for a text note to be added.
Asks the user if it wants to remove an existing presence subscription request as well.
Prompts the user for a response of a presence subscription request.
Prompts the user for a response of a presence subscription request.
Asks the user if it wants to remove an existing presence subscription request as well.
Prompts the user for a response of a presence subscription request.
Static class that dynamically manages types and interfaces available in the runtime environment.
Definition: Types.cs:15
static object InstantiateDefault(Type Type, params object[] Arguments)
Returns an instance of the type Type . If one needs to be created, it is. If the constructor requires...
Definition: Types.cs:1566
Factory abstraction responsible for constructing animation contexts.
Coordinates animation execution across the application.
Registry abstraction for animation descriptors.
Represents motion preferences that affect animation execution.
Defines operations for caching attachment content (e.g., images) by URL.
Defines operations for caching arbitrary internet-fetchable content.
Orchestrates operations on contracts upon receiving certain events, like approving or rejecting other...
Cryptographic service that helps create passwords and other security related tasks.
A log implementation for logging warnings, exceptions and events.
Definition: ILogService.cs:12
Defines the contract for a service that handles application intents.
The network service is a wafer-thin wrapper around the Connectivity object. It exposes an event handl...
Interface for the Near-Field Communication (NFC) Service.
Definition: INfcService.cs:11
Interface for the redesigned notification service.
Renders local notifications on the platform.
Handles persistence and reporting of push notification tokens.
Abstraction for platform push transports (Firebase, APNS, WNS).
Handles common runtime settings that need to be persisted during sessions.
Wraps the Database for easy access to persistent encrypted storage. Use this for any sensitive data.
The TAG Profile is the heart of the digital identity for a specific user/device. Use this instance to...
Definition: ITagProfile.cs:18
Service for loading, applying, and retrieving themes and branding in the application....
Service for navigating between pages using route-based navigation.
Service serializing and managing UI-related tasks.
Definition: IUiService.cs:12
Service for presenting transient toast notifications.
Contract for validating XML instances against pre-registered XML Schemas (XSD). Schemas are lazily lo...
Represents an abstraction of a connection to an XMPP Server.
Definition: IXmppService.cs:45
Definition: ImplTypes.g.cs:58
partial class MyTokensViewModel(MyTokensNavigationArgs? Args)
The view model to bind to for when displaying my tokens.
partial class MyWalletViewModel(WalletNavigationArgs? Args)
The view model to bind to for when displaying the wallet.
partial class TokenDetailsViewModel(TokenDetailsPage Page, TokenDetailsNavigationArgs? Args)
The view model to bind to for when displaying the contents of a token.