This commit is contained in:
sibille 2021-05-12 10:56:13 +02:00 коммит произвёл GitHub
Родитель 73f606d1ea
Коммит f4c6e39303
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -4,13 +4,13 @@
The ActivationService is in charge of handling the application's initialization and activation.
The method `ActivateAsync()` it the entry point for the application lifecycle event `OnLaunched`.
The method `ActivateAsync()` is the entry point for the application lifecycle event `OnLaunched`.
## ActivationHandlers
The `ActivationService` has a collection of ActivationHandlers, that are registered in the property `IEnumerable<IActivationHandler> _activationHandlers`.
Each class in the application that can handle activation derives from the abstract class `ActivationHandler<T>` (T is the type of ActivationEventArguments the class can handle) and implement the method HandleInternalAsync().
Each class in the application that can handle activation derives from the abstract class `ActivationHandler<T>` (T is the type of ActivationEventArguments the class can handle) and implements the method HandleInternalAsync().
The method `HandleInternalAsync()` is where the actual activation takes place.
The virtual method `CanHandleInternal()` checks if the incoming activation arguments are of the type the ActivationHandler can manage. It can be overwritten to establish further conditions based on the ActivationEventArguments.