C# Класс Cocktail.Navigator

Показать файл Открыть проект

Открытые методы

Метод Описание
NavigateToAsync ( Type viewModelType, Task>.Func prepare ) : Task

Asynchronously navigates to an instance of the provided ViewModel type. The navigation will be cancelled if the current active ViewModel cannot be closed or the target type is not authorized.

NavigateToAsync ( Type viewModelType, object parameter = null ) : Task

Asynchronously navigates to an instance of the provided ViewModel type. The navigation will be cancelled if the current active ViewModel cannot be closed or the target type is not authorized.

NavigateToAsync ( Type viewModelType, string contractName, Action prepare ) : Task

Asynchronously navigates to a ViewModel instance that matches the specified name and type. The navigation will be cancelled if the current active ViewModel cannot be closed or the target type is not authorized.

Not available in Windows 8 Store apps.

NavigateToAsync ( Type viewModelType, string contractName, Task>.Func prepare ) : Task

Asynchronously navigates to a ViewModel instance that matches the specified name and type. The navigation will be cancelled if the current active ViewModel cannot be closed or the target type is not authorized.

Not available in Windows 8 Store apps.

NavigateToAsync ( Type viewModelType, string contractName, object parameter = null ) : Task

Asynchronously navigates to a ViewModel instance that matches the specified name and type. The navigation will be cancelled if the current active ViewModel cannot be closed or the target type is not authorized.

Not available in Windows 8 Store apps.

Navigator ( IConductActiveItem conductor ) : System

Initializes a new NavigationService.

Приватные методы

Метод Описание
AuthorizeTargetAsync ( Type viewModelType, string contractName ) : Task

Determines if the target ViewModel type is authorized.

Описание методов

NavigateToAsync() публичный Метод

Asynchronously navigates to an instance of the provided ViewModel type. The navigation will be cancelled if the current active ViewModel cannot be closed or the target type is not authorized.
public NavigateToAsync ( Type viewModelType, Task>.Func prepare ) : Task
viewModelType Type The target ViewModel type.
prepare Task>.Func An action to initialize the target ViewModel before it is activated.
Результат Task

NavigateToAsync() публичный Метод

Asynchronously navigates to an instance of the provided ViewModel type. The navigation will be cancelled if the current active ViewModel cannot be closed or the target type is not authorized.
public NavigateToAsync ( Type viewModelType, object parameter = null ) : Task
viewModelType Type The target ViewModel type.
parameter object An optional parameter to be sent to the target view model. See
Результат Task

NavigateToAsync() публичный Метод

Asynchronously navigates to a ViewModel instance that matches the specified name and type. The navigation will be cancelled if the current active ViewModel cannot be closed or the target type is not authorized.
Not available in Windows 8 Store apps.
public NavigateToAsync ( Type viewModelType, string contractName, Action prepare ) : Task
viewModelType Type The type to match.
contractName string The name to match.
prepare Action An action to initialize the target ViewModel before it is activated.
Результат Task

NavigateToAsync() публичный Метод

Asynchronously navigates to a ViewModel instance that matches the specified name and type. The navigation will be cancelled if the current active ViewModel cannot be closed or the target type is not authorized.
Not available in Windows 8 Store apps.
public NavigateToAsync ( Type viewModelType, string contractName, Task>.Func prepare ) : Task
viewModelType Type The type to match.
contractName string The name to match.
prepare Task>.Func An action to initialize the target ViewModel before it is activated.
Результат Task

NavigateToAsync() публичный Метод

Asynchronously navigates to a ViewModel instance that matches the specified name and type. The navigation will be cancelled if the current active ViewModel cannot be closed or the target type is not authorized.
Not available in Windows 8 Store apps.
public NavigateToAsync ( Type viewModelType, string contractName, object parameter = null ) : Task
viewModelType Type The type to match.
contractName string The name to match.
parameter object An optional parameter to be sent to the target view model. See
Результат Task

Navigator() публичный Метод

Initializes a new NavigationService.
public Navigator ( IConductActiveItem conductor ) : System
conductor IConductActiveItem The underlying screen conductor used to activate navigation targets.
Результат System