-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
195 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
Softeq.XToolkit.WhiteLabel.Forms/Navigation/FluentNavigatorExtensions.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
Softeq.XToolkit.WhiteLabel.Forms/Navigation/FormsFluentNavigatorExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Developed by Softeq Development Corporation | ||
// http://www.softeq.com | ||
|
||
using System; | ||
using Softeq.XToolkit.WhiteLabel.Mvvm; | ||
using Softeq.XToolkit.WhiteLabel.Navigation; | ||
using Softeq.XToolkit.WhiteLabel.Navigation.FluentNavigators; | ||
|
||
namespace Softeq.XToolkit.WhiteLabel.Forms.Navigation | ||
{ | ||
public static class FormsFluentNavigatorExtensions | ||
{ | ||
[Obsolete("Use `_frameNavigation.From(this)` before using navigator instead of this.")] | ||
public static FrameFluentNavigator<TViewModel> From<TViewModel>( | ||
this FrameFluentNavigator<TViewModel> navigator, | ||
object source) | ||
where TViewModel : IViewModelBase | ||
{ | ||
navigator.Initialize(source); | ||
return navigator; | ||
} | ||
|
||
// TODO YP: Frame navigation needs to be redesigned for the future (forms/maui). | ||
public static IFrameNavigationService From<TViewModel>( | ||
this IFrameNavigationService navigationService, | ||
TViewModel source) | ||
where TViewModel : IViewModelBase | ||
{ | ||
navigationService.Initialize(source); | ||
return navigationService; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
Softeq.XToolkit.WhiteLabel/Navigation/DialogsServiceExtensions.cs
This file was deleted.
Oops, something went wrong.
84 changes: 84 additions & 0 deletions
84
Softeq.XToolkit.WhiteLabel/Navigation/FluentNavigatorExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
// Developed by Softeq Development Corporation | ||
// http://www.softeq.com | ||
|
||
using System; | ||
using Softeq.XToolkit.WhiteLabel.Mvvm; | ||
using Softeq.XToolkit.WhiteLabel.Navigation.FluentNavigators; | ||
|
||
namespace Softeq.XToolkit.WhiteLabel.Navigation | ||
{ | ||
public static class FluentNavigatorExtensions | ||
{ | ||
/// <summary> | ||
/// Creates a <see cref="DialogFluentNavigator{TViewModel}"/> | ||
/// from the specified <see cref="IDialogsService"/>. | ||
/// </summary> | ||
/// <typeparam name="TViewModel">Type of ViewModel.</typeparam> | ||
/// <param name="dialogsService">Instance of <see cref="IDialogsService"/>.</param> | ||
/// <returns> | ||
/// Instance of <see cref="DialogFluentNavigator{TViewModel}"/> | ||
/// created from the specified <see cref="IDialogsService"/>. | ||
/// </returns> | ||
/// <exception cref="T:System.ArgumentNullException"> | ||
/// <paramref name="dialogsService"/> cannot be <see langword="null"/>. | ||
/// </exception> | ||
public static DialogFluentNavigator<TViewModel> For<TViewModel>(this IDialogsService dialogsService) | ||
where TViewModel : class, IDialogViewModel | ||
{ | ||
if (dialogsService == null) | ||
{ | ||
throw new ArgumentNullException(nameof(dialogsService)); | ||
} | ||
|
||
return new DialogFluentNavigator<TViewModel>(dialogsService); | ||
} | ||
|
||
/// <summary> | ||
/// Creates a <see cref="FrameFluentNavigator{TViewModel}"/> | ||
/// from the specified <see cref="IFrameNavigationService"/>. | ||
/// </summary> | ||
/// <typeparam name="TViewModel">Type of ViewModel.</typeparam> | ||
/// <param name="frameNavigationService">Instance of <see cref="IFrameNavigationService"/>.</param> | ||
/// <returns> | ||
/// Instance of <see cref="FrameFluentNavigator{TViewModel}"/> | ||
/// created from the specified <see cref="IFrameNavigationService"/>. | ||
/// </returns> | ||
/// <exception cref="T:System.ArgumentNullException"> | ||
/// <paramref name="frameNavigationService"/> cannot be <see langword="null"/>. | ||
/// </exception> | ||
public static FrameFluentNavigator<TViewModel> For<TViewModel>(this IFrameNavigationService frameNavigationService) | ||
where TViewModel : IViewModelBase | ||
{ | ||
if (frameNavigationService == null) | ||
{ | ||
throw new ArgumentNullException(nameof(frameNavigationService)); | ||
} | ||
|
||
return new FrameFluentNavigator<TViewModel>(frameNavigationService); | ||
} | ||
|
||
/// <summary> | ||
/// Creates a <see cref="PageFluentNavigator{TViewModel}"/> | ||
/// from the specified <see cref="IPageNavigationService"/>. | ||
/// </summary> | ||
/// <typeparam name="TViewModel">Type of ViewModel.</typeparam> | ||
/// <param name="pageNavigationService">Instance of <see cref="IPageNavigationService"/>.</param> | ||
/// <returns> | ||
/// Instance of <see cref="PageFluentNavigator{TViewModel}"/> | ||
/// created from the specified <see cref="IFrameNavigationService"/>. | ||
/// </returns> | ||
/// <exception cref="T:System.ArgumentNullException"> | ||
/// <paramref name="pageNavigationService"/> cannot be <see langword="null"/>. | ||
/// </exception> | ||
public static PageFluentNavigator<TViewModel> For<TViewModel>(this IPageNavigationService pageNavigationService) | ||
where TViewModel : IViewModelBase | ||
{ | ||
if (pageNavigationService == null) | ||
{ | ||
throw new ArgumentNullException(nameof(pageNavigationService)); | ||
} | ||
|
||
return new PageFluentNavigator<TViewModel>(pageNavigationService); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.