diff --git a/Softeq.XToolkit.WhiteLabel.Droid/ActivityBase.cs b/Softeq.XToolkit.WhiteLabel.Droid/ActivityBase.cs index 4c7f5d525..0225f1ef1 100644 --- a/Softeq.XToolkit.WhiteLabel.Droid/ActivityBase.cs +++ b/Softeq.XToolkit.WhiteLabel.Droid/ActivityBase.cs @@ -12,7 +12,6 @@ using Softeq.XToolkit.Bindings; using Softeq.XToolkit.Bindings.Extensions; using Softeq.XToolkit.Common.Interfaces; -using Softeq.XToolkit.Permissions; using Softeq.XToolkit.WhiteLabel.Droid.Navigation; using Softeq.XToolkit.WhiteLabel.Droid.ViewComponents; using Softeq.XToolkit.WhiteLabel.Mvvm; @@ -81,7 +80,7 @@ protected ActivityBase() { Bindings = new List(); _jsonSerializer = Dependencies.JsonSerializer; - _viewModel = new Lazy(() => + _viewModelLazy = new Lazy(() => { var backStack = Dependencies.IocContainer.Resolve(); return backStack.GetExistingOrCreateViewModel(); @@ -211,6 +210,6 @@ public abstract class ActivityBase : ActivityBase - _viewModel ?? (_viewModel = (TViewModel) Dependencies.IocContainer.Resolve()); + _viewModel ?? (_viewModel = (TViewModel)Dependencies.IocContainer.Resolve()); } } \ No newline at end of file diff --git a/Softeq.XToolkit.WhiteLabel.Droid/Navigation/Constants.cs b/Softeq.XToolkit.WhiteLabel.Droid/Navigation/Constants.cs index 9536a9291..58df6c199 100644 --- a/Softeq.XToolkit.WhiteLabel.Droid/Navigation/Constants.cs +++ b/Softeq.XToolkit.WhiteLabel.Droid/Navigation/Constants.cs @@ -1,3 +1,6 @@ +// Developed by Softeq Development Corporation +// http://www.softeq.com + namespace Softeq.XToolkit.WhiteLabel.Droid.Navigation { public static class Constants diff --git a/Softeq.XToolkit.WhiteLabel.Droid/Navigation/RootFrameFragmentBase.cs b/Softeq.XToolkit.WhiteLabel.Droid/Navigation/RootFrameFragmentBase.cs index 9b26c42a8..9e43d5b80 100644 --- a/Softeq.XToolkit.WhiteLabel.Droid/Navigation/RootFrameFragmentBase.cs +++ b/Softeq.XToolkit.WhiteLabel.Droid/Navigation/RootFrameFragmentBase.cs @@ -1,7 +1,6 @@ // Developed by Softeq Development Corporation // http://www.softeq.com -using System; using Android.OS; using Android.Views; using Softeq.XToolkit.WhiteLabel.Mvvm; diff --git a/Softeq.XToolkit.WhiteLabel.Droid/Navigation/ViewLocator.cs b/Softeq.XToolkit.WhiteLabel.Droid/Navigation/ViewLocator.cs index 69b6c7a2b..80f9b072d 100644 --- a/Softeq.XToolkit.WhiteLabel.Droid/Navigation/ViewLocator.cs +++ b/Softeq.XToolkit.WhiteLabel.Droid/Navigation/ViewLocator.cs @@ -28,7 +28,7 @@ public object GetView(ViewModelBase viewModel, ViewType viewType) var targetType = GetTargetType(viewModel.GetType(), viewType); var inst = Activator.CreateInstance(targetType); var method = inst.GetType().GetMethod("SetExistingViewModel"); - method.Invoke(inst, new[] {viewModel}); + method.Invoke(inst, new[] { viewModel }); return inst; } @@ -37,7 +37,7 @@ public object GetView(IViewModelBase viewModel, ViewType viewType) var targetType = GetTargetType(viewModel.GetType(), viewType); var inst = Activator.CreateInstance(targetType); var method = inst.GetType().GetMethod("SetExistingViewModel"); - method.Invoke(inst, new[] {viewModel}); + method.Invoke(inst, new[] { viewModel }); return inst; } @@ -47,11 +47,11 @@ public Type GetTargetType(string viewModelTypeName, ViewType viewType) targetTypeName = targetTypeName.Replace("ViewModel", viewType.ToString()); var targeType = Type.GetType(targetTypeName) - ?? AssemblySource.FindTypeByNames(new[] {targetTypeName}); + ?? AssemblySource.FindTypeByNames(new[] { targetTypeName }); if (targeType == null) { - throw new DllNotFoundException("can't find target type"); + throw new DllNotFoundException($"Can't find target type: {targetTypeName}"); } return targeType; @@ -76,7 +76,7 @@ public void TryInjectParameters(object viewModel, object parameter, string param private PropertyInfo GetPropertyCaseInsensitive(Type type, string propertyName) { var typeInfo = type.GetTypeInfo(); - var typeList = new List {type}; + var typeList = new List { type }; if (typeInfo.IsInterface) { diff --git a/Softeq.XToolkit.WhiteLabel/Navigation/IPlatformNavigationService.cs b/Softeq.XToolkit.WhiteLabel/Navigation/IPlatformNavigationService.cs index b77cbd2fc..7a0fa8691 100644 --- a/Softeq.XToolkit.WhiteLabel/Navigation/IPlatformNavigationService.cs +++ b/Softeq.XToolkit.WhiteLabel/Navigation/IPlatformNavigationService.cs @@ -1,4 +1,7 @@ -using System.Collections.Generic; +// Developed by Softeq Development Corporation +// http://www.softeq.com + +using System.Collections.Generic; using Softeq.XToolkit.WhiteLabel.Mvvm; namespace Softeq.XToolkit.WhiteLabel.Navigation @@ -7,11 +10,11 @@ public interface IPlatformNavigationService { void NavigateToViewModel(ViewModelBase viewModelBase, bool clearBackStack, IReadOnlyList parameters); - + bool CanGoBack { get; } - + void Initialize(object navigation); - + void GoBack(); } } \ No newline at end of file diff --git a/Softeq.XToolkit.WhiteLabel/Navigation/NavigateHelper.cs b/Softeq.XToolkit.WhiteLabel/Navigation/NavigateHelper.cs index 99da3fad6..01f408d4e 100644 --- a/Softeq.XToolkit.WhiteLabel/Navigation/NavigateHelper.cs +++ b/Softeq.XToolkit.WhiteLabel/Navigation/NavigateHelper.cs @@ -1,4 +1,7 @@ -using System; +// Developed by Softeq Development Corporation +// http://www.softeq.com + +using System; using System.Collections.Generic; using System.Linq.Expressions; using System.Reflection; @@ -20,9 +23,9 @@ public NavigateHelper(PageNavigationService navigationService) public NavigateHelper WithParam(Expression> property, TValue value) { - var parameter = new NavigationParameterModel {Value = value}; + var parameter = new NavigationParameterModel { Value = value }; - var propertyInfo = (PropertyInfo) property.GetMemberInfo(); + var propertyInfo = (PropertyInfo)property.GetMemberInfo(); parameter.PropertyInfo = PropertyInfoModel.FromProperty(propertyInfo); _parameters.Add(parameter); diff --git a/Softeq.XToolkit.WhiteLabel/Navigation/NavigationParameterModel.cs b/Softeq.XToolkit.WhiteLabel/Navigation/NavigationParameterModel.cs index ea4102f67..1fc1d6788 100644 --- a/Softeq.XToolkit.WhiteLabel/Navigation/NavigationParameterModel.cs +++ b/Softeq.XToolkit.WhiteLabel/Navigation/NavigationParameterModel.cs @@ -1,4 +1,7 @@ -namespace Softeq.XToolkit.WhiteLabel.Navigation +// Developed by Softeq Development Corporation +// http://www.softeq.com + +namespace Softeq.XToolkit.WhiteLabel.Navigation { public class NavigationParameterModel { diff --git a/Softeq.XToolkit.WhiteLabel/Navigation/PageNavigation.cs b/Softeq.XToolkit.WhiteLabel/Navigation/PageNavigation.cs index 4949f7035..8a0e06240 100644 --- a/Softeq.XToolkit.WhiteLabel/Navigation/PageNavigation.cs +++ b/Softeq.XToolkit.WhiteLabel/Navigation/PageNavigation.cs @@ -1,7 +1,8 @@ +// Developed by Softeq Development Corporation +// http://www.softeq.com + using System.Collections.Generic; -using Softeq.XToolkit.WhiteLabel.Interfaces; using Softeq.XToolkit.WhiteLabel.Mvvm; -using Softeq.XToolkit.WhiteLabel.Threading; namespace Softeq.XToolkit.WhiteLabel.Navigation { diff --git a/Softeq.XToolkit.WhiteLabel/Navigation/PropertyInfoModel.cs b/Softeq.XToolkit.WhiteLabel/Navigation/PropertyInfoModel.cs index 4f16f583d..46e0651a7 100644 --- a/Softeq.XToolkit.WhiteLabel/Navigation/PropertyInfoModel.cs +++ b/Softeq.XToolkit.WhiteLabel/Navigation/PropertyInfoModel.cs @@ -1,4 +1,7 @@ -using System; +// Developed by Softeq Development Corporation +// http://www.softeq.com + +using System; using System.Reflection; namespace Softeq.XToolkit.WhiteLabel.Navigation