From 95287c0650c50fbfd7745d198d0012c89d561db2 Mon Sep 17 00:00:00 2001 From: nmilcoff Date: Mon, 12 Feb 2018 16:57:37 -0300 Subject: [PATCH 1/5] Update forms namespaces to match traditional Xamarin and usages --- .../Platform/Android/Core/MvxFormsAndroidSetup.cs | 4 ++-- .../{Views => Presenters}/MvxFormsAndroidViewPresenter.cs | 6 +++--- .../MvxEventSourceFormsAppCompatActivity.cs | 2 +- .../MvxEventSourceFormsApplicationActivity.cs | 2 +- .../Platform/Android/Views/MvxFormsAppCompatActivity.cs | 4 ++-- .../Platform/Android/Views/MvxFormsApplicationActivity.cs | 4 ++-- .../Platform/Mac/Core/MvxFormsApplicationDelegate.cs | 2 +- MvvmCross.Forms/Platform/Mac/Core/MvxFormsMacSetup.cs | 4 ++-- .../Mac/{Views => Presenters}/MvxFormsMacViewPresenter.cs | 4 ++-- MvvmCross.Forms/Platform/Uap/Core/MvxFormsWindowsSetup.cs | 4 ++-- .../Uap/{Views => Presenters}/MvxFormsUwpViewPresenter.cs | 4 ++-- .../Platform/iOS/Core/MvxFormsApplicationDelegate.cs | 2 +- MvvmCross.Forms/Platform/iOS/Core/MvxFormsIosSetup.cs | 4 ++-- .../iOS/{Views => Presenters}/MvxFormsIosViewPresenter.cs | 4 ++-- .../Attributes/MvxCarouselPagePresentationAttribute.cs | 2 +- .../Attributes/MvxContentPagePresentationAttribute.cs | 4 ++-- .../Attributes/MvxMasterDetailPagePresentationAttribute.cs | 6 +++--- .../Attributes/MvxModalPresentationAttribute.cs | 6 +++--- .../Attributes/MvxNavigationPagePresentationAttribute.cs | 6 +++--- .../Attributes/MvxPagePresentationAttribute.cs | 2 +- .../Attributes/MvxTabbedPagePresentationAttribute.cs | 4 ++-- .../{Views => Presenters}/IMvxFormsPagePresenter.cs | 2 +- .../{Views => Presenters}/IMvxFormsViewPresenter.cs | 2 +- .../{Views => Presenters}/MvxFormsPagePresenter.cs | 5 +++-- .../Views/{EventSource => Base}/IMvxEventSourceCell.cs | 4 ++-- .../Views/{EventSource => Base}/IMvxEventSourceElement.cs | 4 ++-- .../Views/{EventSource => Base}/IMvxEventSourcePage.cs | 4 ++-- .../{EventSource => Base}/MvxEventSourceCarouselPage.cs | 2 +- .../{EventSource => Base}/MvxEventSourceContentPage.cs | 2 +- .../{EventSource => Base}/MvxEventSourceContentView.cs | 2 +- .../Views/{EventSource => Base}/MvxEventSourceEntryCell.cs | 2 +- .../Views/{EventSource => Base}/MvxEventSourceImageCell.cs | 2 +- .../{EventSource => Base}/MvxEventSourceMasterDetailPage.cs | 2 +- .../{EventSource => Base}/MvxEventSourceNavigationPage.cs | 2 +- .../Views/{EventSource => Base}/MvxEventSourcePage.cs | 2 +- .../Views/{EventSource => Base}/MvxEventSourceSwitchCell.cs | 2 +- .../Views/{EventSource => Base}/MvxEventSourceTabbedPage.cs | 2 +- .../Views/{EventSource => Base}/MvxEventSourceTextCell.cs | 2 +- .../Views/{EventSource => Base}/MvxEventSourceViewCell.cs | 2 +- MvvmCross.Forms/Views/MvxBaseCellAdapter.cs | 4 ++-- MvvmCross.Forms/Views/MvxBaseElementAdapter.cs | 4 ++-- MvvmCross.Forms/Views/MvxBasePageAdapter.cs | 4 ++-- MvvmCross.Forms/Views/MvxCarouselPage.cs | 2 +- MvvmCross.Forms/Views/MvxCellAdapter.cs | 4 ++-- MvvmCross.Forms/Views/MvxContentPage.cs | 2 +- MvvmCross.Forms/Views/MvxContentView.cs | 2 +- MvvmCross.Forms/Views/MvxElementAdapter.cs | 4 ++-- MvvmCross.Forms/Views/MvxElementExtensions.cs | 2 +- MvvmCross.Forms/Views/MvxEntryCell.cs | 2 +- MvvmCross.Forms/Views/MvxImageCell.cs | 2 +- MvvmCross.Forms/Views/MvxMasterDetailPage.cs | 2 +- MvvmCross.Forms/Views/MvxNavigationPage.cs | 2 +- MvvmCross.Forms/Views/MvxPage.cs | 2 +- MvvmCross.Forms/Views/MvxPageAdapter.cs | 4 ++-- MvvmCross.Forms/Views/MvxSwitchCell.cs | 2 +- MvvmCross.Forms/Views/MvxTabbedPage.cs | 2 +- MvvmCross.Forms/Views/MvxTextCell.cs | 2 +- MvvmCross.Forms/Views/MvxViewCell.cs | 2 +- .../Playground/Playground.Forms.UI/Pages/ChildPage.xaml.cs | 2 +- .../Playground.Forms.UI/Pages/MixedNavFirstPage.xaml.cs | 2 +- .../Pages/MixedNavMasterDetailPage.xaml.cs | 2 +- .../Pages/MixedNavMasterRootContentPage.xaml.cs | 2 +- .../Playground.Forms.UI/Pages/MixedNavTab1Page.xaml.cs | 2 +- .../Playground.Forms.UI/Pages/MixedNavTab2Page.xaml.cs | 2 +- .../Playground.Forms.UI/Pages/MixedNavTabsPage.xaml.cs | 2 +- .../Playground.Forms.UI/Pages/ModalNavPage.xaml.cs | 2 +- .../Playground/Playground.Forms.UI/Pages/ModalPage.xaml.cs | 2 +- .../Playground.Forms.UI/Pages/NestedModalPage.xaml.cs | 2 +- .../Playground/Playground.Forms.UI/Pages/RootPage.xaml.cs | 2 +- .../Playground.Forms.UI/Pages/SecondChildPage.xaml.cs | 2 +- .../Playground.Forms.UI/Pages/SplitDetailNavPage.xaml.cs | 2 +- .../Playground.Forms.UI/Pages/SplitDetailPage.xaml.cs | 2 +- .../Playground.Forms.UI/Pages/SplitMasterPage.xaml.cs | 2 +- .../Playground.Forms.UI/Pages/SplitRootPage.xaml.cs | 2 +- .../Playground/Playground.Forms.UI/Pages/Tab1Page.xaml.cs | 2 +- .../Playground/Playground.Forms.UI/Pages/Tab2Page.xaml.cs | 2 +- .../Playground/Playground.Forms.UI/Pages/Tab3Page.xaml.cs | 2 +- .../Playground.Forms.UI/Pages/TabsRootPage.xaml.cs | 2 +- 78 files changed, 108 insertions(+), 107 deletions(-) rename MvvmCross.Forms/Platform/Android/{Views => Presenters}/MvxFormsAndroidViewPresenter.cs (96%) rename MvvmCross.Forms/Platform/Android/Views/{EventSource => Base}/MvxEventSourceFormsAppCompatActivity.cs (98%) rename MvvmCross.Forms/Platform/Android/Views/{EventSource => Base}/MvxEventSourceFormsApplicationActivity.cs (98%) rename MvvmCross.Forms/Platform/Mac/{Views => Presenters}/MvxFormsMacViewPresenter.cs (96%) rename MvvmCross.Forms/Platform/Uap/{Views => Presenters}/MvxFormsUwpViewPresenter.cs (96%) rename MvvmCross.Forms/Platform/iOS/{Views => Presenters}/MvxFormsIosViewPresenter.cs (97%) rename MvvmCross.Forms/{Views => Presenters}/Attributes/MvxCarouselPagePresentationAttribute.cs (93%) rename MvvmCross.Forms/{Views => Presenters}/Attributes/MvxContentPagePresentationAttribute.cs (89%) rename MvvmCross.Forms/{Views => Presenters}/Attributes/MvxMasterDetailPagePresentationAttribute.cs (89%) rename MvvmCross.Forms/{Views => Presenters}/Attributes/MvxModalPresentationAttribute.cs (75%) rename MvvmCross.Forms/{Views => Presenters}/Attributes/MvxNavigationPagePresentationAttribute.cs (76%) rename MvvmCross.Forms/{Views => Presenters}/Attributes/MvxPagePresentationAttribute.cs (96%) rename MvvmCross.Forms/{Views => Presenters}/Attributes/MvxTabbedPagePresentationAttribute.cs (92%) rename MvvmCross.Forms/{Views => Presenters}/IMvxFormsPagePresenter.cs (94%) rename MvvmCross.Forms/{Views => Presenters}/IMvxFormsViewPresenter.cs (94%) rename MvvmCross.Forms/{Views => Presenters}/MvxFormsPagePresenter.cs (99%) rename MvvmCross.Forms/Views/{EventSource => Base}/IMvxEventSourceCell.cs (90%) rename MvvmCross.Forms/Views/{EventSource => Base}/IMvxEventSourceElement.cs (89%) rename MvvmCross.Forms/Views/{EventSource => Base}/IMvxEventSourcePage.cs (89%) rename MvvmCross.Forms/Views/{EventSource => Base}/MvxEventSourceCarouselPage.cs (96%) rename MvvmCross.Forms/Views/{EventSource => Base}/MvxEventSourceContentPage.cs (96%) rename MvvmCross.Forms/Views/{EventSource => Base}/MvxEventSourceContentView.cs (94%) rename MvvmCross.Forms/Views/{EventSource => Base}/MvxEventSourceEntryCell.cs (96%) rename MvvmCross.Forms/Views/{EventSource => Base}/MvxEventSourceImageCell.cs (96%) rename MvvmCross.Forms/Views/{EventSource => Base}/MvxEventSourceMasterDetailPage.cs (96%) rename MvvmCross.Forms/Views/{EventSource => Base}/MvxEventSourceNavigationPage.cs (96%) rename MvvmCross.Forms/Views/{EventSource => Base}/MvxEventSourcePage.cs (96%) rename MvvmCross.Forms/Views/{EventSource => Base}/MvxEventSourceSwitchCell.cs (96%) rename MvvmCross.Forms/Views/{EventSource => Base}/MvxEventSourceTabbedPage.cs (96%) rename MvvmCross.Forms/Views/{EventSource => Base}/MvxEventSourceTextCell.cs (96%) rename MvvmCross.Forms/Views/{EventSource => Base}/MvxEventSourceViewCell.cs (96%) diff --git a/MvvmCross.Forms/Platform/Android/Core/MvxFormsAndroidSetup.cs b/MvvmCross.Forms/Platform/Android/Core/MvxFormsAndroidSetup.cs index 498358a73..b11731961 100644 --- a/MvvmCross.Forms/Platform/Android/Core/MvxFormsAndroidSetup.cs +++ b/MvvmCross.Forms/Platform/Android/Core/MvxFormsAndroidSetup.cs @@ -5,18 +5,18 @@ using Android.Content; using MvvmCross.Binding; using MvvmCross.Binding.Bindings.Target.Construction; -using MvvmCross.Forms.Views; using MvvmCross.Localization; using System.Collections.Generic; using System.Reflection; using MvvmCross.Forms.Core; using MvvmCross.Forms.Platform.Android.Bindings; -using MvvmCross.Forms.Platform.Android.Views; using MvvmCross.Platform.Android.Core; using MvvmCross.Platform.Android.Presenters; using MvvmCross.Plugins; using MvvmCross.ViewModels; using MvvmCross.Platform.Android; +using MvvmCross.Forms.Presenters; +using MvvmCross.Forms.Platform.Android.Presenters; namespace MvvmCross.Forms.Platform.Android.Core { diff --git a/MvvmCross.Forms/Platform/Android/Views/MvxFormsAndroidViewPresenter.cs b/MvvmCross.Forms/Platform/Android/Presenters/MvxFormsAndroidViewPresenter.cs similarity index 96% rename from MvvmCross.Forms/Platform/Android/Views/MvxFormsAndroidViewPresenter.cs rename to MvvmCross.Forms/Platform/Android/Presenters/MvxFormsAndroidViewPresenter.cs index 6a52d6eaf..0cf95c233 100644 --- a/MvvmCross.Forms/Platform/Android/Views/MvxFormsAndroidViewPresenter.cs +++ b/MvvmCross.Forms/Platform/Android/Presenters/MvxFormsAndroidViewPresenter.cs @@ -3,16 +3,16 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Droid.Support.V7.AppCompat; -using MvvmCross.Forms.Views; +using MvvmCross.Forms.Presenters; using System; using System.Collections.Generic; using System.Reflection; using MvvmCross.Forms.Core; using MvvmCross.Platform.Android.Views; using MvvmCross.ViewModels; +using MvvmCross.Forms.Platform.Android.Views; - -namespace MvvmCross.Forms.Platform.Android.Views +namespace MvvmCross.Forms.Platform.Android.Presenters { public class MvxFormsAndroidViewPresenter : MvxAppCompatViewPresenter, IMvxFormsViewPresenter diff --git a/MvvmCross.Forms/Platform/Android/Views/EventSource/MvxEventSourceFormsAppCompatActivity.cs b/MvvmCross.Forms/Platform/Android/Views/Base/MvxEventSourceFormsAppCompatActivity.cs similarity index 98% rename from MvvmCross.Forms/Platform/Android/Views/EventSource/MvxEventSourceFormsAppCompatActivity.cs rename to MvvmCross.Forms/Platform/Android/Views/Base/MvxEventSourceFormsAppCompatActivity.cs index f9f639884..59fb1d7eb 100644 --- a/MvvmCross.Forms/Platform/Android/Views/EventSource/MvxEventSourceFormsAppCompatActivity.cs +++ b/MvvmCross.Forms/Platform/Android/Views/Base/MvxEventSourceFormsAppCompatActivity.cs @@ -10,7 +10,7 @@ using MvvmCross.Base; using MvvmCross.Platform.Android.Views.Base; using Xamarin.Forms.Platform.Android; -namespace MvvmCross.Forms.Platform.Android.Views.EventSource +namespace MvvmCross.Forms.Platform.Android.Views.Base { public abstract class MvxEventSourceFormsAppCompatActivity : FormsAppCompatActivity, IMvxEventSourceActivity diff --git a/MvvmCross.Forms/Platform/Android/Views/EventSource/MvxEventSourceFormsApplicationActivity.cs b/MvvmCross.Forms/Platform/Android/Views/Base/MvxEventSourceFormsApplicationActivity.cs similarity index 98% rename from MvvmCross.Forms/Platform/Android/Views/EventSource/MvxEventSourceFormsApplicationActivity.cs rename to MvvmCross.Forms/Platform/Android/Views/Base/MvxEventSourceFormsApplicationActivity.cs index a62f2d21f..21662c7f0 100644 --- a/MvvmCross.Forms/Platform/Android/Views/EventSource/MvxEventSourceFormsApplicationActivity.cs +++ b/MvvmCross.Forms/Platform/Android/Views/Base/MvxEventSourceFormsApplicationActivity.cs @@ -10,7 +10,7 @@ using MvvmCross.Base; using MvvmCross.Platform.Android.Views.Base; using Xamarin.Forms.Platform.Android; -namespace MvvmCross.Forms.Platform.Android.Views.EventSource +namespace MvvmCross.Forms.Platform.Android.Views.Base { public abstract class MvxEventSourceFormsApplicationActivity : FormsApplicationActivity, IMvxEventSourceActivity diff --git a/MvvmCross.Forms/Platform/Android/Views/MvxFormsAppCompatActivity.cs b/MvvmCross.Forms/Platform/Android/Views/MvxFormsAppCompatActivity.cs index 92e83e89b..c355c2f41 100644 --- a/MvvmCross.Forms/Platform/Android/Views/MvxFormsAppCompatActivity.cs +++ b/MvvmCross.Forms/Platform/Android/Views/MvxFormsAppCompatActivity.cs @@ -10,8 +10,8 @@ using Android.Views; using MvvmCross.Binding.BindingContext; using MvvmCross.Droid.Support.V7.AppCompat; using MvvmCross.Forms.Core; -using MvvmCross.Forms.Platform.Android.Views.EventSource; -using MvvmCross.Forms.Views; +using MvvmCross.Forms.Platform.Android.Views.Base; +using MvvmCross.Forms.Presenters; using MvvmCross.Platform.Android.Binding.BindingContext; using MvvmCross.Platform.Android.Binding.Views; using MvvmCross.Platform.Android.Core; diff --git a/MvvmCross.Forms/Platform/Android/Views/MvxFormsApplicationActivity.cs b/MvvmCross.Forms/Platform/Android/Views/MvxFormsApplicationActivity.cs index 3b6d532b2..3038c75e5 100644 --- a/MvvmCross.Forms/Platform/Android/Views/MvxFormsApplicationActivity.cs +++ b/MvvmCross.Forms/Platform/Android/Views/MvxFormsApplicationActivity.cs @@ -8,8 +8,8 @@ using Android.OS; using Android.Views; using MvvmCross.Binding.BindingContext; using MvvmCross.Forms.Core; -using MvvmCross.Forms.Platform.Android.Views.EventSource; -using MvvmCross.Forms.Views; +using MvvmCross.Forms.Platform.Android.Views.Base; +using MvvmCross.Forms.Presenters; using MvvmCross.Platform.Android.Binding.BindingContext; using MvvmCross.Platform.Android.Binding.Views; using MvvmCross.Platform.Android.Core; diff --git a/MvvmCross.Forms/Platform/Mac/Core/MvxFormsApplicationDelegate.cs b/MvvmCross.Forms/Platform/Mac/Core/MvxFormsApplicationDelegate.cs index ef0fde4f3..0b123fe74 100644 --- a/MvvmCross.Forms/Platform/Mac/Core/MvxFormsApplicationDelegate.cs +++ b/MvvmCross.Forms/Platform/Mac/Core/MvxFormsApplicationDelegate.cs @@ -4,7 +4,7 @@ using System; using MvvmCross.Core; -using MvvmCross.Forms.Views; +using MvvmCross.Forms.Presenters; using MvvmCross.Platform.Mac.Core; using Xamarin.Forms.Platform.MacOS; diff --git a/MvvmCross.Forms/Platform/Mac/Core/MvxFormsMacSetup.cs b/MvvmCross.Forms/Platform/Mac/Core/MvxFormsMacSetup.cs index fb2d8a260..7a7c4d0fc 100644 --- a/MvvmCross.Forms/Platform/Mac/Core/MvxFormsMacSetup.cs +++ b/MvvmCross.Forms/Platform/Mac/Core/MvxFormsMacSetup.cs @@ -4,18 +4,18 @@ using MvvmCross.Binding; using MvvmCross.Binding.Bindings.Target.Construction; -using MvvmCross.Forms.Views; using MvvmCross.Localization; using System.Collections.Generic; using System.Reflection; using AppKit; using MvvmCross.Forms.Core; using MvvmCross.Forms.Platform.Mac.Bindings; -using MvvmCross.Forms.Platform.Mac.Views; using MvvmCross.Platform.Mac.Core; using MvvmCross.Platform.Mac.Presenters; using MvvmCross.Plugins; using MvvmCross.ViewModels; +using MvvmCross.Forms.Platform.Mac.Presenters; +using MvvmCross.Forms.Presenters; namespace MvvmCross.Forms.Platform.Mac.Core { diff --git a/MvvmCross.Forms/Platform/Mac/Views/MvxFormsMacViewPresenter.cs b/MvvmCross.Forms/Platform/Mac/Presenters/MvxFormsMacViewPresenter.cs similarity index 96% rename from MvvmCross.Forms/Platform/Mac/Views/MvxFormsMacViewPresenter.cs rename to MvvmCross.Forms/Platform/Mac/Presenters/MvxFormsMacViewPresenter.cs index 2b070b42c..2ba37751f 100644 --- a/MvvmCross.Forms/Platform/Mac/Views/MvxFormsMacViewPresenter.cs +++ b/MvvmCross.Forms/Platform/Mac/Presenters/MvxFormsMacViewPresenter.cs @@ -5,12 +5,12 @@ using System; using AppKit; using MvvmCross.Forms.Core; -using MvvmCross.Forms.Views; +using MvvmCross.Forms.Presenters; using MvvmCross.Logging; using MvvmCross.Platform.Mac.Presenters; using MvvmCross.ViewModels; -namespace MvvmCross.Forms.Platform.Mac.Views +namespace MvvmCross.Forms.Platform.Mac.Presenters { public class MvxFormsMacViewPresenter : MvxMacViewPresenter diff --git a/MvvmCross.Forms/Platform/Uap/Core/MvxFormsWindowsSetup.cs b/MvvmCross.Forms/Platform/Uap/Core/MvxFormsWindowsSetup.cs index 513780e9e..56c1d07c2 100644 --- a/MvvmCross.Forms/Platform/Uap/Core/MvxFormsWindowsSetup.cs +++ b/MvvmCross.Forms/Platform/Uap/Core/MvxFormsWindowsSetup.cs @@ -4,13 +4,13 @@ using MvvmCross.Binding; using MvvmCross.Binding.Bindings.Target.Construction; -using MvvmCross.Forms.Views; +using MvvmCross.Forms.Presenters; using System.Collections.Generic; using System.Reflection; using Windows.ApplicationModel.Activation; using MvvmCross.Forms.Core; using MvvmCross.Forms.Platform.Uap.Bindings; -using MvvmCross.Forms.Platform.Uap.Views; +using MvvmCross.Forms.Platform.Uap.Presenters; using MvvmCross.Platform.Uap.Core; using MvvmCross.Platform.Uap.Views; using MvvmCross.Plugins; diff --git a/MvvmCross.Forms/Platform/Uap/Views/MvxFormsUwpViewPresenter.cs b/MvvmCross.Forms/Platform/Uap/Presenters/MvxFormsUwpViewPresenter.cs similarity index 96% rename from MvvmCross.Forms/Platform/Uap/Views/MvxFormsUwpViewPresenter.cs rename to MvvmCross.Forms/Platform/Uap/Presenters/MvxFormsUwpViewPresenter.cs index 00d5e7bc8..4133b2220 100644 --- a/MvvmCross.Forms/Platform/Uap/Views/MvxFormsUwpViewPresenter.cs +++ b/MvvmCross.Forms/Platform/Uap/Presenters/MvxFormsUwpViewPresenter.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MS-PL license. // See the LICENSE file in the project root for more information. -using MvvmCross.Forms.Views; +using MvvmCross.Forms.Presenters; using System; using MvvmCross.Forms.Core; using MvvmCross.Logging; @@ -10,7 +10,7 @@ using MvvmCross.Platform.Uap.Presenters; using MvvmCross.Platform.Uap.Views; using MvvmCross.ViewModels; -namespace MvvmCross.Forms.Platform.Uap.Views +namespace MvvmCross.Forms.Platform.Uap.Presenters { public class MvxFormsUwpViewPresenter : MvxWindowsViewPresenter diff --git a/MvvmCross.Forms/Platform/iOS/Core/MvxFormsApplicationDelegate.cs b/MvvmCross.Forms/Platform/iOS/Core/MvxFormsApplicationDelegate.cs index 59b3d6444..e4dbb384f 100644 --- a/MvvmCross.Forms/Platform/iOS/Core/MvxFormsApplicationDelegate.cs +++ b/MvvmCross.Forms/Platform/iOS/Core/MvxFormsApplicationDelegate.cs @@ -5,7 +5,7 @@ using System; using Foundation; using MvvmCross.Core; -using MvvmCross.Forms.Views; +using MvvmCross.Forms.Presenters; using MvvmCross.Platform.Ios.Core; using UIKit; using Xamarin.Forms.Platform.iOS; diff --git a/MvvmCross.Forms/Platform/iOS/Core/MvxFormsIosSetup.cs b/MvvmCross.Forms/Platform/iOS/Core/MvxFormsIosSetup.cs index 8922148d7..1aab24e50 100644 --- a/MvvmCross.Forms/Platform/iOS/Core/MvxFormsIosSetup.cs +++ b/MvvmCross.Forms/Platform/iOS/Core/MvxFormsIosSetup.cs @@ -4,18 +4,18 @@ using MvvmCross.Binding; using MvvmCross.Binding.Bindings.Target.Construction; -using MvvmCross.Forms.Views; +using MvvmCross.Forms.Presenters; using MvvmCross.Localization; using System.Collections.Generic; using System.Reflection; using MvvmCross.Forms.Core; using MvvmCross.Forms.Platform.iOS.Bindings; -using MvvmCross.Forms.Platform.iOS.Views; using MvvmCross.Platform.Ios.Core; using MvvmCross.Platform.Ios.Presenters; using MvvmCross.Plugins; using MvvmCross.ViewModels; using UIKit; +using MvvmCross.Forms.Platform.iOS.Presenters; namespace MvvmCross.Forms.Platform.iOS.Core { diff --git a/MvvmCross.Forms/Platform/iOS/Views/MvxFormsIosViewPresenter.cs b/MvvmCross.Forms/Platform/iOS/Presenters/MvxFormsIosViewPresenter.cs similarity index 97% rename from MvvmCross.Forms/Platform/iOS/Views/MvxFormsIosViewPresenter.cs rename to MvvmCross.Forms/Platform/iOS/Presenters/MvxFormsIosViewPresenter.cs index 2e9323c55..68a1b5c15 100644 --- a/MvvmCross.Forms/Platform/iOS/Views/MvxFormsIosViewPresenter.cs +++ b/MvvmCross.Forms/Platform/iOS/Presenters/MvxFormsIosViewPresenter.cs @@ -4,14 +4,14 @@ using System; using MvvmCross.Forms.Core; -using MvvmCross.Forms.Views; +using MvvmCross.Forms.Presenters; using MvvmCross.Logging; using MvvmCross.Platform.Ios.Presenters; using MvvmCross.ViewModels; using UIKit; using Xamarin.Forms; -namespace MvvmCross.Forms.Platform.iOS.Views +namespace MvvmCross.Forms.Platform.iOS.Presenters { public class MvxFormsIosViewPresenter : MvxIosViewPresenter diff --git a/MvvmCross.Forms/Views/Attributes/MvxCarouselPagePresentationAttribute.cs b/MvvmCross.Forms/Presenters/Attributes/MvxCarouselPagePresentationAttribute.cs similarity index 93% rename from MvvmCross.Forms/Views/Attributes/MvxCarouselPagePresentationAttribute.cs rename to MvvmCross.Forms/Presenters/Attributes/MvxCarouselPagePresentationAttribute.cs index db800cdde..572e7ba2e 100644 --- a/MvvmCross.Forms/Views/Attributes/MvxCarouselPagePresentationAttribute.cs +++ b/MvvmCross.Forms/Presenters/Attributes/MvxCarouselPagePresentationAttribute.cs @@ -4,7 +4,7 @@ using System; -namespace MvvmCross.Forms.Views.Attributes +namespace MvvmCross.Forms.Presenters.Attributes { [AttributeUsage(AttributeTargets.Class)] public class MvxCarouselPagePresentationAttribute : MvxPagePresentationAttribute diff --git a/MvvmCross.Forms/Views/Attributes/MvxContentPagePresentationAttribute.cs b/MvvmCross.Forms/Presenters/Attributes/MvxContentPagePresentationAttribute.cs similarity index 89% rename from MvvmCross.Forms/Views/Attributes/MvxContentPagePresentationAttribute.cs rename to MvvmCross.Forms/Presenters/Attributes/MvxContentPagePresentationAttribute.cs index d6ed5fb9e..9a1ce0944 100644 --- a/MvvmCross.Forms/Views/Attributes/MvxContentPagePresentationAttribute.cs +++ b/MvvmCross.Forms/Presenters/Attributes/MvxContentPagePresentationAttribute.cs @@ -4,7 +4,7 @@ using System; -namespace MvvmCross.Forms.Views.Attributes +namespace MvvmCross.Forms.Presenters.Attributes { [AttributeUsage(AttributeTargets.Class)] public class MvxContentPagePresentationAttribute : MvxPagePresentationAttribute @@ -13,4 +13,4 @@ namespace MvvmCross.Forms.Views.Attributes { } } -} \ No newline at end of file +} diff --git a/MvvmCross.Forms/Views/Attributes/MvxMasterDetailPagePresentationAttribute.cs b/MvvmCross.Forms/Presenters/Attributes/MvxMasterDetailPagePresentationAttribute.cs similarity index 89% rename from MvvmCross.Forms/Views/Attributes/MvxMasterDetailPagePresentationAttribute.cs rename to MvvmCross.Forms/Presenters/Attributes/MvxMasterDetailPagePresentationAttribute.cs index 39d7e53a9..7243e43a9 100644 --- a/MvvmCross.Forms/Views/Attributes/MvxMasterDetailPagePresentationAttribute.cs +++ b/MvvmCross.Forms/Presenters/Attributes/MvxMasterDetailPagePresentationAttribute.cs @@ -1,10 +1,10 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MS-PL license. // See the LICENSE file in the project root for more information. using System; -namespace MvvmCross.Forms.Views.Attributes +namespace MvvmCross.Forms.Presenters.Attributes { [AttributeUsage(AttributeTargets.Class)] public class MvxMasterDetailPagePresentationAttribute : MvxPagePresentationAttribute @@ -31,4 +31,4 @@ namespace MvvmCross.Forms.Views.Attributes Master, Detail } -} \ No newline at end of file +} diff --git a/MvvmCross.Forms/Views/Attributes/MvxModalPresentationAttribute.cs b/MvvmCross.Forms/Presenters/Attributes/MvxModalPresentationAttribute.cs similarity index 75% rename from MvvmCross.Forms/Views/Attributes/MvxModalPresentationAttribute.cs rename to MvvmCross.Forms/Presenters/Attributes/MvxModalPresentationAttribute.cs index 3b05da2ea..c2787a627 100644 --- a/MvvmCross.Forms/Views/Attributes/MvxModalPresentationAttribute.cs +++ b/MvvmCross.Forms/Presenters/Attributes/MvxModalPresentationAttribute.cs @@ -1,10 +1,10 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MS-PL license. // See the LICENSE file in the project root for more information. using System; -namespace MvvmCross.Forms.Views.Attributes +namespace MvvmCross.Forms.Presenters.Attributes { [AttributeUsage(AttributeTargets.Class)] public class MvxModalPresentationAttribute : MvxPagePresentationAttribute @@ -13,4 +13,4 @@ namespace MvvmCross.Forms.Views.Attributes { } } -} \ No newline at end of file +} diff --git a/MvvmCross.Forms/Views/Attributes/MvxNavigationPagePresentationAttribute.cs b/MvvmCross.Forms/Presenters/Attributes/MvxNavigationPagePresentationAttribute.cs similarity index 76% rename from MvvmCross.Forms/Views/Attributes/MvxNavigationPagePresentationAttribute.cs rename to MvvmCross.Forms/Presenters/Attributes/MvxNavigationPagePresentationAttribute.cs index ad13b14ed..9bd75c3f0 100644 --- a/MvvmCross.Forms/Views/Attributes/MvxNavigationPagePresentationAttribute.cs +++ b/MvvmCross.Forms/Presenters/Attributes/MvxNavigationPagePresentationAttribute.cs @@ -1,10 +1,10 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MS-PL license. // See the LICENSE file in the project root for more information. using System; -namespace MvvmCross.Forms.Views.Attributes +namespace MvvmCross.Forms.Presenters.Attributes { [AttributeUsage(AttributeTargets.Class)] public class MvxNavigationPagePresentationAttribute : MvxPagePresentationAttribute @@ -13,4 +13,4 @@ namespace MvvmCross.Forms.Views.Attributes { } } -} \ No newline at end of file +} diff --git a/MvvmCross.Forms/Views/Attributes/MvxPagePresentationAttribute.cs b/MvvmCross.Forms/Presenters/Attributes/MvxPagePresentationAttribute.cs similarity index 96% rename from MvvmCross.Forms/Views/Attributes/MvxPagePresentationAttribute.cs rename to MvvmCross.Forms/Presenters/Attributes/MvxPagePresentationAttribute.cs index d924b4586..482e20e28 100644 --- a/MvvmCross.Forms/Views/Attributes/MvxPagePresentationAttribute.cs +++ b/MvvmCross.Forms/Presenters/Attributes/MvxPagePresentationAttribute.cs @@ -5,7 +5,7 @@ using System; using MvvmCross.Presenters; -namespace MvvmCross.Forms.Views.Attributes +namespace MvvmCross.Forms.Presenters.Attributes { [AttributeUsage(AttributeTargets.Class)] public abstract class MvxPagePresentationAttribute : MvxBasePresentationAttribute diff --git a/MvvmCross.Forms/Views/Attributes/MvxTabbedPagePresentationAttribute.cs b/MvvmCross.Forms/Presenters/Attributes/MvxTabbedPagePresentationAttribute.cs similarity index 92% rename from MvvmCross.Forms/Views/Attributes/MvxTabbedPagePresentationAttribute.cs rename to MvvmCross.Forms/Presenters/Attributes/MvxTabbedPagePresentationAttribute.cs index a22b2bed1..323397806 100644 --- a/MvvmCross.Forms/Views/Attributes/MvxTabbedPagePresentationAttribute.cs +++ b/MvvmCross.Forms/Presenters/Attributes/MvxTabbedPagePresentationAttribute.cs @@ -4,7 +4,7 @@ using System; -namespace MvvmCross.Forms.Views.Attributes +namespace MvvmCross.Forms.Presenters.Attributes { [AttributeUsage(AttributeTargets.Class)] public class MvxTabbedPagePresentationAttribute : MvxPagePresentationAttribute @@ -22,4 +22,4 @@ namespace MvvmCross.Forms.Views.Attributes Root, Tab } -} \ No newline at end of file +} diff --git a/MvvmCross.Forms/Views/IMvxFormsPagePresenter.cs b/MvvmCross.Forms/Presenters/IMvxFormsPagePresenter.cs similarity index 94% rename from MvvmCross.Forms/Views/IMvxFormsPagePresenter.cs rename to MvvmCross.Forms/Presenters/IMvxFormsPagePresenter.cs index 06af5b6b7..01b716b3a 100644 --- a/MvvmCross.Forms/Views/IMvxFormsPagePresenter.cs +++ b/MvvmCross.Forms/Presenters/IMvxFormsPagePresenter.cs @@ -8,7 +8,7 @@ using MvvmCross.ViewModels; using MvvmCross.Presenters; using Xamarin.Forms; -namespace MvvmCross.Forms.Views +namespace MvvmCross.Forms.Presenters { public interface IMvxFormsPagePresenter : IMvxAttributeViewPresenter { diff --git a/MvvmCross.Forms/Views/IMvxFormsViewPresenter.cs b/MvvmCross.Forms/Presenters/IMvxFormsViewPresenter.cs similarity index 94% rename from MvvmCross.Forms/Views/IMvxFormsViewPresenter.cs rename to MvvmCross.Forms/Presenters/IMvxFormsViewPresenter.cs index 96e83eab1..44cc044e3 100644 --- a/MvvmCross.Forms/Views/IMvxFormsViewPresenter.cs +++ b/MvvmCross.Forms/Presenters/IMvxFormsViewPresenter.cs @@ -6,7 +6,7 @@ using System; using MvvmCross.Forms.Core; using MvvmCross.Presenters; -namespace MvvmCross.Forms.Views +namespace MvvmCross.Forms.Presenters { public interface IMvxFormsViewPresenter : IMvxAttributeViewPresenter { diff --git a/MvvmCross.Forms/Views/MvxFormsPagePresenter.cs b/MvvmCross.Forms/Presenters/MvxFormsPagePresenter.cs similarity index 99% rename from MvvmCross.Forms/Views/MvxFormsPagePresenter.cs rename to MvvmCross.Forms/Presenters/MvxFormsPagePresenter.cs index f3e6b5d1b..b8e8613f9 100644 --- a/MvvmCross.Forms/Views/MvxFormsPagePresenter.cs +++ b/MvvmCross.Forms/Presenters/MvxFormsPagePresenter.cs @@ -8,14 +8,15 @@ using System.Reflection; using System.Threading.Tasks; using MvvmCross.Exceptions; using MvvmCross.Forms.Core; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; +using MvvmCross.Forms.Views; using MvvmCross.Logging; using MvvmCross.Presenters; using MvvmCross.ViewModels; using MvvmCross.ViewModels.Hints; using Xamarin.Forms; -namespace MvvmCross.Forms.Views +namespace MvvmCross.Forms.Presenters { //Handles common Forms Presenter code public class MvxFormsPagePresenter : diff --git a/MvvmCross.Forms/Views/EventSource/IMvxEventSourceCell.cs b/MvvmCross.Forms/Views/Base/IMvxEventSourceCell.cs similarity index 90% rename from MvvmCross.Forms/Views/EventSource/IMvxEventSourceCell.cs rename to MvvmCross.Forms/Views/Base/IMvxEventSourceCell.cs index 64ba357fa..954f6c3af 100644 --- a/MvvmCross.Forms/Views/EventSource/IMvxEventSourceCell.cs +++ b/MvvmCross.Forms/Views/Base/IMvxEventSourceCell.cs @@ -4,7 +4,7 @@ using System; -namespace MvvmCross.Forms.Views.EventSource +namespace MvvmCross.Forms.Views.Base { public interface IMvxEventSourceCell : IMvxEventSourceElement { @@ -14,4 +14,4 @@ namespace MvvmCross.Forms.Views.EventSource event EventHandler TappedCalled; } -} \ No newline at end of file +} diff --git a/MvvmCross.Forms/Views/EventSource/IMvxEventSourceElement.cs b/MvvmCross.Forms/Views/Base/IMvxEventSourceElement.cs similarity index 89% rename from MvvmCross.Forms/Views/EventSource/IMvxEventSourceElement.cs rename to MvvmCross.Forms/Views/Base/IMvxEventSourceElement.cs index c1870075e..e5f93046b 100644 --- a/MvvmCross.Forms/Views/EventSource/IMvxEventSourceElement.cs +++ b/MvvmCross.Forms/Views/Base/IMvxEventSourceElement.cs @@ -4,7 +4,7 @@ using System; -namespace MvvmCross.Forms.Views.EventSource +namespace MvvmCross.Forms.Views.Base { public interface IMvxEventSourceElement { @@ -12,4 +12,4 @@ namespace MvvmCross.Forms.Views.EventSource event EventHandler ParentSetCalled; } -} \ No newline at end of file +} diff --git a/MvvmCross.Forms/Views/EventSource/IMvxEventSourcePage.cs b/MvvmCross.Forms/Views/Base/IMvxEventSourcePage.cs similarity index 89% rename from MvvmCross.Forms/Views/EventSource/IMvxEventSourcePage.cs rename to MvvmCross.Forms/Views/Base/IMvxEventSourcePage.cs index 48b2eaa00..62654a39a 100644 --- a/MvvmCross.Forms/Views/EventSource/IMvxEventSourcePage.cs +++ b/MvvmCross.Forms/Views/Base/IMvxEventSourcePage.cs @@ -4,7 +4,7 @@ using System; -namespace MvvmCross.Forms.Views.EventSource +namespace MvvmCross.Forms.Views.Base { public interface IMvxEventSourcePage : IMvxEventSourceElement { @@ -12,4 +12,4 @@ namespace MvvmCross.Forms.Views.EventSource event EventHandler DisappearingCalled; } -} \ No newline at end of file +} diff --git a/MvvmCross.Forms/Views/EventSource/MvxEventSourceCarouselPage.cs b/MvvmCross.Forms/Views/Base/MvxEventSourceCarouselPage.cs similarity index 96% rename from MvvmCross.Forms/Views/EventSource/MvxEventSourceCarouselPage.cs rename to MvvmCross.Forms/Views/Base/MvxEventSourceCarouselPage.cs index 0accb63bb..0cd66a598 100644 --- a/MvvmCross.Forms/Views/EventSource/MvxEventSourceCarouselPage.cs +++ b/MvvmCross.Forms/Views/Base/MvxEventSourceCarouselPage.cs @@ -6,7 +6,7 @@ using System; using MvvmCross.Base; using Xamarin.Forms; -namespace MvvmCross.Forms.Views.EventSource +namespace MvvmCross.Forms.Views.Base { public class MvxEventSourceCarouselPage : CarouselPage, IMvxEventSourcePage { diff --git a/MvvmCross.Forms/Views/EventSource/MvxEventSourceContentPage.cs b/MvvmCross.Forms/Views/Base/MvxEventSourceContentPage.cs similarity index 96% rename from MvvmCross.Forms/Views/EventSource/MvxEventSourceContentPage.cs rename to MvvmCross.Forms/Views/Base/MvxEventSourceContentPage.cs index 744cb7b00..d6c1b0b5b 100644 --- a/MvvmCross.Forms/Views/EventSource/MvxEventSourceContentPage.cs +++ b/MvvmCross.Forms/Views/Base/MvxEventSourceContentPage.cs @@ -6,7 +6,7 @@ using System; using MvvmCross.Base; using Xamarin.Forms; -namespace MvvmCross.Forms.Views.EventSource +namespace MvvmCross.Forms.Views.Base { public class MvxEventSourceContentPage : ContentPage, IMvxEventSourcePage { diff --git a/MvvmCross.Forms/Views/EventSource/MvxEventSourceContentView.cs b/MvvmCross.Forms/Views/Base/MvxEventSourceContentView.cs similarity index 94% rename from MvvmCross.Forms/Views/EventSource/MvxEventSourceContentView.cs rename to MvvmCross.Forms/Views/Base/MvxEventSourceContentView.cs index 12324466d..93a6c9fcd 100644 --- a/MvvmCross.Forms/Views/EventSource/MvxEventSourceContentView.cs +++ b/MvvmCross.Forms/Views/Base/MvxEventSourceContentView.cs @@ -6,7 +6,7 @@ using System; using MvvmCross.Base; using Xamarin.Forms; -namespace MvvmCross.Forms.Views.EventSource +namespace MvvmCross.Forms.Views.Base { public class MvxEventSourceContentView : ContentView, IMvxEventSourceElement { diff --git a/MvvmCross.Forms/Views/EventSource/MvxEventSourceEntryCell.cs b/MvvmCross.Forms/Views/Base/MvxEventSourceEntryCell.cs similarity index 96% rename from MvvmCross.Forms/Views/EventSource/MvxEventSourceEntryCell.cs rename to MvvmCross.Forms/Views/Base/MvxEventSourceEntryCell.cs index e6d9fd142..ee7e0679a 100644 --- a/MvvmCross.Forms/Views/EventSource/MvxEventSourceEntryCell.cs +++ b/MvvmCross.Forms/Views/Base/MvxEventSourceEntryCell.cs @@ -6,7 +6,7 @@ using System; using MvvmCross.Base; using Xamarin.Forms; -namespace MvvmCross.Forms.Views.EventSource +namespace MvvmCross.Forms.Views.Base { public class MvxEventSourceEntryCell : EntryCell, IMvxEventSourceCell { diff --git a/MvvmCross.Forms/Views/EventSource/MvxEventSourceImageCell.cs b/MvvmCross.Forms/Views/Base/MvxEventSourceImageCell.cs similarity index 96% rename from MvvmCross.Forms/Views/EventSource/MvxEventSourceImageCell.cs rename to MvvmCross.Forms/Views/Base/MvxEventSourceImageCell.cs index 928e1cd72..85cddaf50 100644 --- a/MvvmCross.Forms/Views/EventSource/MvxEventSourceImageCell.cs +++ b/MvvmCross.Forms/Views/Base/MvxEventSourceImageCell.cs @@ -6,7 +6,7 @@ using System; using MvvmCross.Base; using Xamarin.Forms; -namespace MvvmCross.Forms.Views.EventSource +namespace MvvmCross.Forms.Views.Base { public class MvxEventSourceImageCell : ImageCell, IMvxEventSourceCell { diff --git a/MvvmCross.Forms/Views/EventSource/MvxEventSourceMasterDetailPage.cs b/MvvmCross.Forms/Views/Base/MvxEventSourceMasterDetailPage.cs similarity index 96% rename from MvvmCross.Forms/Views/EventSource/MvxEventSourceMasterDetailPage.cs rename to MvvmCross.Forms/Views/Base/MvxEventSourceMasterDetailPage.cs index 34b0cd774..359e80408 100644 --- a/MvvmCross.Forms/Views/EventSource/MvxEventSourceMasterDetailPage.cs +++ b/MvvmCross.Forms/Views/Base/MvxEventSourceMasterDetailPage.cs @@ -6,7 +6,7 @@ using System; using MvvmCross.Base; using Xamarin.Forms; -namespace MvvmCross.Forms.Views.EventSource +namespace MvvmCross.Forms.Views.Base { public class MvxEventSourceMasterDetailPage : MasterDetailPage, IMvxEventSourcePage { diff --git a/MvvmCross.Forms/Views/EventSource/MvxEventSourceNavigationPage.cs b/MvvmCross.Forms/Views/Base/MvxEventSourceNavigationPage.cs similarity index 96% rename from MvvmCross.Forms/Views/EventSource/MvxEventSourceNavigationPage.cs rename to MvvmCross.Forms/Views/Base/MvxEventSourceNavigationPage.cs index 508466858..cc5343748 100644 --- a/MvvmCross.Forms/Views/EventSource/MvxEventSourceNavigationPage.cs +++ b/MvvmCross.Forms/Views/Base/MvxEventSourceNavigationPage.cs @@ -6,7 +6,7 @@ using System; using MvvmCross.Base; using Xamarin.Forms; -namespace MvvmCross.Forms.Views.EventSource +namespace MvvmCross.Forms.Views.Base { public class MvxEventSourceNavigationPage : NavigationPage, IMvxEventSourcePage { diff --git a/MvvmCross.Forms/Views/EventSource/MvxEventSourcePage.cs b/MvvmCross.Forms/Views/Base/MvxEventSourcePage.cs similarity index 96% rename from MvvmCross.Forms/Views/EventSource/MvxEventSourcePage.cs rename to MvvmCross.Forms/Views/Base/MvxEventSourcePage.cs index 83595f4d1..e3e8f0f45 100644 --- a/MvvmCross.Forms/Views/EventSource/MvxEventSourcePage.cs +++ b/MvvmCross.Forms/Views/Base/MvxEventSourcePage.cs @@ -6,7 +6,7 @@ using System; using MvvmCross.Base; using Xamarin.Forms; -namespace MvvmCross.Forms.Views.EventSource +namespace MvvmCross.Forms.Views.Base { public class MvxEventSourcePage : Page, IMvxEventSourcePage { diff --git a/MvvmCross.Forms/Views/EventSource/MvxEventSourceSwitchCell.cs b/MvvmCross.Forms/Views/Base/MvxEventSourceSwitchCell.cs similarity index 96% rename from MvvmCross.Forms/Views/EventSource/MvxEventSourceSwitchCell.cs rename to MvvmCross.Forms/Views/Base/MvxEventSourceSwitchCell.cs index 5fecb3945..33580e073 100644 --- a/MvvmCross.Forms/Views/EventSource/MvxEventSourceSwitchCell.cs +++ b/MvvmCross.Forms/Views/Base/MvxEventSourceSwitchCell.cs @@ -6,7 +6,7 @@ using System; using MvvmCross.Base; using Xamarin.Forms; -namespace MvvmCross.Forms.Views.EventSource +namespace MvvmCross.Forms.Views.Base { public class MvxEventSourceSwitchCell : SwitchCell, IMvxEventSourceCell { diff --git a/MvvmCross.Forms/Views/EventSource/MvxEventSourceTabbedPage.cs b/MvvmCross.Forms/Views/Base/MvxEventSourceTabbedPage.cs similarity index 96% rename from MvvmCross.Forms/Views/EventSource/MvxEventSourceTabbedPage.cs rename to MvvmCross.Forms/Views/Base/MvxEventSourceTabbedPage.cs index 55a7a291a..0b66a5589 100644 --- a/MvvmCross.Forms/Views/EventSource/MvxEventSourceTabbedPage.cs +++ b/MvvmCross.Forms/Views/Base/MvxEventSourceTabbedPage.cs @@ -6,7 +6,7 @@ using System; using MvvmCross.Base; using Xamarin.Forms; -namespace MvvmCross.Forms.Views.EventSource +namespace MvvmCross.Forms.Views.Base { public class MvxEventSourceTabbedPage : TabbedPage, IMvxEventSourcePage { diff --git a/MvvmCross.Forms/Views/EventSource/MvxEventSourceTextCell.cs b/MvvmCross.Forms/Views/Base/MvxEventSourceTextCell.cs similarity index 96% rename from MvvmCross.Forms/Views/EventSource/MvxEventSourceTextCell.cs rename to MvvmCross.Forms/Views/Base/MvxEventSourceTextCell.cs index 62fe1a030..7d21de0e4 100644 --- a/MvvmCross.Forms/Views/EventSource/MvxEventSourceTextCell.cs +++ b/MvvmCross.Forms/Views/Base/MvxEventSourceTextCell.cs @@ -6,7 +6,7 @@ using System; using MvvmCross.Base; using Xamarin.Forms; -namespace MvvmCross.Forms.Views.EventSource +namespace MvvmCross.Forms.Views.Base { public class MvxEventSourceTextCell : TextCell, IMvxEventSourceCell { diff --git a/MvvmCross.Forms/Views/EventSource/MvxEventSourceViewCell.cs b/MvvmCross.Forms/Views/Base/MvxEventSourceViewCell.cs similarity index 96% rename from MvvmCross.Forms/Views/EventSource/MvxEventSourceViewCell.cs rename to MvvmCross.Forms/Views/Base/MvxEventSourceViewCell.cs index 201515183..1f12b6cd0 100644 --- a/MvvmCross.Forms/Views/EventSource/MvxEventSourceViewCell.cs +++ b/MvvmCross.Forms/Views/Base/MvxEventSourceViewCell.cs @@ -6,7 +6,7 @@ using System; using MvvmCross.Base; using Xamarin.Forms; -namespace MvvmCross.Forms.Views.EventSource +namespace MvvmCross.Forms.Views.Base { public class MvxEventSourceViewCell : ViewCell, IMvxEventSourceCell { diff --git a/MvvmCross.Forms/Views/MvxBaseCellAdapter.cs b/MvvmCross.Forms/Views/MvxBaseCellAdapter.cs index b906b5eaa..b2f50c863 100644 --- a/MvvmCross.Forms/Views/MvxBaseCellAdapter.cs +++ b/MvvmCross.Forms/Views/MvxBaseCellAdapter.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using System; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; using Xamarin.Forms; namespace MvvmCross.Forms.Views @@ -50,4 +50,4 @@ namespace MvvmCross.Forms.Views { } } -} \ No newline at end of file +} diff --git a/MvvmCross.Forms/Views/MvxBaseElementAdapter.cs b/MvvmCross.Forms/Views/MvxBaseElementAdapter.cs index 97e1fe0f2..0d46e844b 100644 --- a/MvvmCross.Forms/Views/MvxBaseElementAdapter.cs +++ b/MvvmCross.Forms/Views/MvxBaseElementAdapter.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using System; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; using Xamarin.Forms; namespace MvvmCross.Forms.Views @@ -35,4 +35,4 @@ namespace MvvmCross.Forms.Views { } } -} \ No newline at end of file +} diff --git a/MvvmCross.Forms/Views/MvxBasePageAdapter.cs b/MvvmCross.Forms/Views/MvxBasePageAdapter.cs index eb2c3a243..11023c603 100644 --- a/MvvmCross.Forms/Views/MvxBasePageAdapter.cs +++ b/MvvmCross.Forms/Views/MvxBasePageAdapter.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using System; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; using Xamarin.Forms; namespace MvvmCross.Forms.Views @@ -45,4 +45,4 @@ namespace MvvmCross.Forms.Views { } } -} \ No newline at end of file +} diff --git a/MvvmCross.Forms/Views/MvxCarouselPage.cs b/MvvmCross.Forms/Views/MvxCarouselPage.cs index dd7ade792..7a45f8b5a 100644 --- a/MvvmCross.Forms/Views/MvxCarouselPage.cs +++ b/MvvmCross.Forms/Views/MvxCarouselPage.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Binding.BindingContext; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; using MvvmCross.ViewModels; namespace MvvmCross.Forms.Views diff --git a/MvvmCross.Forms/Views/MvxCellAdapter.cs b/MvvmCross.Forms/Views/MvxCellAdapter.cs index 75bee0bdc..490e7a31b 100644 --- a/MvvmCross.Forms/Views/MvxCellAdapter.cs +++ b/MvvmCross.Forms/Views/MvxCellAdapter.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using System; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; namespace MvvmCross.Forms.Views { @@ -23,4 +23,4 @@ namespace MvvmCross.Forms.Views base.HandleAppearingCalled(sender, e); } } -} \ No newline at end of file +} diff --git a/MvvmCross.Forms/Views/MvxContentPage.cs b/MvvmCross.Forms/Views/MvxContentPage.cs index 8a113537a..89262e4e9 100644 --- a/MvvmCross.Forms/Views/MvxContentPage.cs +++ b/MvvmCross.Forms/Views/MvxContentPage.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Binding.BindingContext; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; using MvvmCross.ViewModels; namespace MvvmCross.Forms.Views diff --git a/MvvmCross.Forms/Views/MvxContentView.cs b/MvvmCross.Forms/Views/MvxContentView.cs index 2b051ac0c..14bcc921e 100644 --- a/MvvmCross.Forms/Views/MvxContentView.cs +++ b/MvvmCross.Forms/Views/MvxContentView.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Binding.BindingContext; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; using MvvmCross.ViewModels; namespace MvvmCross.Forms.Views diff --git a/MvvmCross.Forms/Views/MvxElementAdapter.cs b/MvvmCross.Forms/Views/MvxElementAdapter.cs index 2dbc04ae6..3845bc005 100644 --- a/MvvmCross.Forms/Views/MvxElementAdapter.cs +++ b/MvvmCross.Forms/Views/MvxElementAdapter.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using System; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; namespace MvvmCross.Forms.Views { @@ -23,4 +23,4 @@ namespace MvvmCross.Forms.Views base.HandleBindingContextChangedCalled(sender, e); } } -} \ No newline at end of file +} diff --git a/MvvmCross.Forms/Views/MvxElementExtensions.cs b/MvvmCross.Forms/Views/MvxElementExtensions.cs index 09d824458..071942eb5 100644 --- a/MvvmCross.Forms/Views/MvxElementExtensions.cs +++ b/MvvmCross.Forms/Views/MvxElementExtensions.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Exceptions; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; using MvvmCross.Logging; using MvvmCross.ViewModels; using MvvmCross.Views; diff --git a/MvvmCross.Forms/Views/MvxEntryCell.cs b/MvvmCross.Forms/Views/MvxEntryCell.cs index 94df403f5..6b58f78eb 100644 --- a/MvvmCross.Forms/Views/MvxEntryCell.cs +++ b/MvvmCross.Forms/Views/MvxEntryCell.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Binding.BindingContext; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; using MvvmCross.ViewModels; namespace MvvmCross.Forms.Views diff --git a/MvvmCross.Forms/Views/MvxImageCell.cs b/MvvmCross.Forms/Views/MvxImageCell.cs index fb8214aee..355232c11 100644 --- a/MvvmCross.Forms/Views/MvxImageCell.cs +++ b/MvvmCross.Forms/Views/MvxImageCell.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Binding.BindingContext; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; using MvvmCross.ViewModels; namespace MvvmCross.Forms.Views diff --git a/MvvmCross.Forms/Views/MvxMasterDetailPage.cs b/MvvmCross.Forms/Views/MvxMasterDetailPage.cs index cf49d9b5b..2829b9506 100644 --- a/MvvmCross.Forms/Views/MvxMasterDetailPage.cs +++ b/MvvmCross.Forms/Views/MvxMasterDetailPage.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Binding.BindingContext; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; using MvvmCross.ViewModels; namespace MvvmCross.Forms.Views diff --git a/MvvmCross.Forms/Views/MvxNavigationPage.cs b/MvvmCross.Forms/Views/MvxNavigationPage.cs index 10603c463..d9a1e85f4 100644 --- a/MvvmCross.Forms/Views/MvxNavigationPage.cs +++ b/MvvmCross.Forms/Views/MvxNavigationPage.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Binding.BindingContext; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; using MvvmCross.ViewModels; using Xamarin.Forms; diff --git a/MvvmCross.Forms/Views/MvxPage.cs b/MvvmCross.Forms/Views/MvxPage.cs index 32d5b72e9..5726f1111 100644 --- a/MvvmCross.Forms/Views/MvxPage.cs +++ b/MvvmCross.Forms/Views/MvxPage.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Binding.BindingContext; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; using MvvmCross.ViewModels; namespace MvvmCross.Forms.Views diff --git a/MvvmCross.Forms/Views/MvxPageAdapter.cs b/MvvmCross.Forms/Views/MvxPageAdapter.cs index 97a67aa27..2212be09c 100644 --- a/MvvmCross.Forms/Views/MvxPageAdapter.cs +++ b/MvvmCross.Forms/Views/MvxPageAdapter.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using System; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; namespace MvvmCross.Forms.Views { @@ -23,4 +23,4 @@ namespace MvvmCross.Forms.Views base.HandleAppearingCalled(sender, e); } } -} \ No newline at end of file +} diff --git a/MvvmCross.Forms/Views/MvxSwitchCell.cs b/MvvmCross.Forms/Views/MvxSwitchCell.cs index 9353701a4..7e26e5e9f 100644 --- a/MvvmCross.Forms/Views/MvxSwitchCell.cs +++ b/MvvmCross.Forms/Views/MvxSwitchCell.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Binding.BindingContext; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; using MvvmCross.ViewModels; namespace MvvmCross.Forms.Views diff --git a/MvvmCross.Forms/Views/MvxTabbedPage.cs b/MvvmCross.Forms/Views/MvxTabbedPage.cs index c6bead5ed..d370e1de2 100644 --- a/MvvmCross.Forms/Views/MvxTabbedPage.cs +++ b/MvvmCross.Forms/Views/MvxTabbedPage.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Binding.BindingContext; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; using MvvmCross.ViewModels; namespace MvvmCross.Forms.Views diff --git a/MvvmCross.Forms/Views/MvxTextCell.cs b/MvvmCross.Forms/Views/MvxTextCell.cs index 70ac55971..114a874ec 100644 --- a/MvvmCross.Forms/Views/MvxTextCell.cs +++ b/MvvmCross.Forms/Views/MvxTextCell.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Binding.BindingContext; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; using MvvmCross.ViewModels; namespace MvvmCross.Forms.Views diff --git a/MvvmCross.Forms/Views/MvxViewCell.cs b/MvvmCross.Forms/Views/MvxViewCell.cs index bd5011d84..b91c66041 100644 --- a/MvvmCross.Forms/Views/MvxViewCell.cs +++ b/MvvmCross.Forms/Views/MvxViewCell.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Binding.BindingContext; -using MvvmCross.Forms.Views.EventSource; +using MvvmCross.Forms.Views.Base; using MvvmCross.ViewModels; namespace MvvmCross.Forms.Views diff --git a/Projects/Playground/Playground.Forms.UI/Pages/ChildPage.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/ChildPage.xaml.cs index a4f3f2dbc..a74a7b742 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/ChildPage.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/ChildPage.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; namespace Playground.Forms.UI.Pages diff --git a/Projects/Playground/Playground.Forms.UI/Pages/MixedNavFirstPage.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/MixedNavFirstPage.xaml.cs index 4d2676fc5..3636f0b90 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/MixedNavFirstPage.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/MixedNavFirstPage.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; namespace Playground.Forms.UI.Pages diff --git a/Projects/Playground/Playground.Forms.UI/Pages/MixedNavMasterDetailPage.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/MixedNavMasterDetailPage.xaml.cs index 42955012c..52c999aa9 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/MixedNavMasterDetailPage.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/MixedNavMasterDetailPage.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; using Xamarin.Forms; using Xamarin.Forms.Xaml; diff --git a/Projects/Playground/Playground.Forms.UI/Pages/MixedNavMasterRootContentPage.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/MixedNavMasterRootContentPage.xaml.cs index 17101aca3..7db844746 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/MixedNavMasterRootContentPage.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/MixedNavMasterRootContentPage.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; using Xamarin.Forms.Xaml; diff --git a/Projects/Playground/Playground.Forms.UI/Pages/MixedNavTab1Page.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/MixedNavTab1Page.xaml.cs index c9d490686..ab84bc728 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/MixedNavTab1Page.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/MixedNavTab1Page.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; using Xamarin.Forms.Xaml; diff --git a/Projects/Playground/Playground.Forms.UI/Pages/MixedNavTab2Page.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/MixedNavTab2Page.xaml.cs index ed98914c1..c61527eeb 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/MixedNavTab2Page.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/MixedNavTab2Page.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; using Xamarin.Forms.Xaml; diff --git a/Projects/Playground/Playground.Forms.UI/Pages/MixedNavTabsPage.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/MixedNavTabsPage.xaml.cs index 5e5345fcc..8bc74ae05 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/MixedNavTabsPage.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/MixedNavTabsPage.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; using Xamarin.Forms.Xaml; diff --git a/Projects/Playground/Playground.Forms.UI/Pages/ModalNavPage.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/ModalNavPage.xaml.cs index b701087ad..2a3e68bfe 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/ModalNavPage.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/ModalNavPage.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; namespace Playground.Forms.UI.Pages diff --git a/Projects/Playground/Playground.Forms.UI/Pages/ModalPage.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/ModalPage.xaml.cs index da7512b94..aaafc1d17 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/ModalPage.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/ModalPage.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; namespace Playground.Forms.UI.Pages diff --git a/Projects/Playground/Playground.Forms.UI/Pages/NestedModalPage.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/NestedModalPage.xaml.cs index c7c9bc73e..2e29c7add 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/NestedModalPage.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/NestedModalPage.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; namespace Playground.Forms.UI.Pages diff --git a/Projects/Playground/Playground.Forms.UI/Pages/RootPage.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/RootPage.xaml.cs index bba07511d..3f2d6df1f 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/RootPage.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/RootPage.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; namespace Playground.Forms.UI.Pages diff --git a/Projects/Playground/Playground.Forms.UI/Pages/SecondChildPage.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/SecondChildPage.xaml.cs index 3f5e04c2a..40380ae92 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/SecondChildPage.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/SecondChildPage.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; namespace Playground.Forms.UI.Pages diff --git a/Projects/Playground/Playground.Forms.UI/Pages/SplitDetailNavPage.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/SplitDetailNavPage.xaml.cs index bd5475ac8..ea5d2bd18 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/SplitDetailNavPage.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/SplitDetailNavPage.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; namespace Playground.Forms.UI.Pages diff --git a/Projects/Playground/Playground.Forms.UI/Pages/SplitDetailPage.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/SplitDetailPage.xaml.cs index 934387334..c7cf74b2d 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/SplitDetailPage.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/SplitDetailPage.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; namespace Playground.Forms.UI.Pages diff --git a/Projects/Playground/Playground.Forms.UI/Pages/SplitMasterPage.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/SplitMasterPage.xaml.cs index 3b76ba4ce..5faa569cd 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/SplitMasterPage.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/SplitMasterPage.xaml.cs @@ -4,7 +4,7 @@ using System; using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; using Xamarin.Forms; diff --git a/Projects/Playground/Playground.Forms.UI/Pages/SplitRootPage.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/SplitRootPage.xaml.cs index 7a5c57cd1..477533ea3 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/SplitRootPage.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/SplitRootPage.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; namespace Playground.Forms.UI.Pages diff --git a/Projects/Playground/Playground.Forms.UI/Pages/Tab1Page.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/Tab1Page.xaml.cs index 0ec66d3ac..c80ae4bad 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/Tab1Page.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/Tab1Page.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; namespace Playground.Forms.UI.Pages diff --git a/Projects/Playground/Playground.Forms.UI/Pages/Tab2Page.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/Tab2Page.xaml.cs index 4f841f2e3..143e1a40e 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/Tab2Page.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/Tab2Page.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; namespace Playground.Forms.UI.Pages diff --git a/Projects/Playground/Playground.Forms.UI/Pages/Tab3Page.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/Tab3Page.xaml.cs index 7cf2cd05d..00a566329 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/Tab3Page.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/Tab3Page.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; namespace Playground.Forms.UI.Pages diff --git a/Projects/Playground/Playground.Forms.UI/Pages/TabsRootPage.xaml.cs b/Projects/Playground/Playground.Forms.UI/Pages/TabsRootPage.xaml.cs index 5e8e3de28..8436659b3 100644 --- a/Projects/Playground/Playground.Forms.UI/Pages/TabsRootPage.xaml.cs +++ b/Projects/Playground/Playground.Forms.UI/Pages/TabsRootPage.xaml.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. using MvvmCross.Forms.Views; -using MvvmCross.Forms.Views.Attributes; +using MvvmCross.Forms.Presenters.Attributes; using Playground.Core.ViewModels; namespace Playground.Forms.UI.Pages From 0f5ab751e85b5eb323d11001b62a79691c5eb70a Mon Sep 17 00:00:00 2001 From: Tomasz Cielecki Date: Mon, 12 Feb 2018 22:55:35 +0100 Subject: [PATCH 2/5] More unittests (#2596) * Add exceptions tests * Add more parser tests * Add missing ; * Fix namespace after rebase * Add license to exception test * Make inverted visibility conveter less of an eyesore * Go away regions and some dry * Add visibility tests --- .../MvxInvertedVisibilityValueConverter.cs | 13 ++-- .../Platform/Console/MvxConsoleVisibility.cs | 5 -- .../Platform/Uap/MvxWinRTVisibility.cs | 9 +-- .../Platform/Wpf/MvxWpfVisibility.cs | 10 +-- .../Platform/iOS/MvxTouchVisibility.cs | 5 -- MvvmCross.sln | 59 ++++++++++++++++++ .../Base/Exceptions/MvxExceptionTest.cs | 58 +++++++++++++++++ .../MvvmCross.UnitTest/Base/MvxParserTest.cs | 62 +++++++++++++++++++ .../Plugins.Color.UnitTest/ColorCollection.cs | 9 +-- ...vmCross.Plugins.Visibility.UnitTest.csproj | 25 ++++++++ .../VisibilityCollection.cs | 17 +++++ .../VisibilityValueConverterTest.cs | 55 ++++++++++++++++ 12 files changed, 289 insertions(+), 38 deletions(-) create mode 100644 UnitTests/MvvmCross.UnitTest/Base/Exceptions/MvxExceptionTest.cs create mode 100644 UnitTests/Plugins.Visibility/MvvmCross.Plugins.Visibility.UnitTest.csproj create mode 100644 UnitTests/Plugins.Visibility/VisibilityCollection.cs create mode 100644 UnitTests/Plugins.Visibility/VisibilityValueConverterTest.cs diff --git a/MvvmCross.Plugins/Visibility/MvxInvertedVisibilityValueConverter.cs b/MvvmCross.Plugins/Visibility/MvxInvertedVisibilityValueConverter.cs index 22365cb6b..bbbfe7b4d 100644 --- a/MvvmCross.Plugins/Visibility/MvxInvertedVisibilityValueConverter.cs +++ b/MvvmCross.Plugins/Visibility/MvxInvertedVisibilityValueConverter.cs @@ -16,15 +16,10 @@ namespace MvvmCross.Plugin.Visibility bool hide = parameter.ConvertToBooleanCore(); switch (base.Convert(value, parameter, culture)) { - case MvxVisibility.Visible: - if (hide) - { - return MvxVisibility.Hidden; - } - else - { - return MvxVisibility.Collapsed; - } + case MvxVisibility.Visible when hide: + return MvxVisibility.Hidden; + case MvxVisibility.Visible when !hide: + return MvxVisibility.Collapsed; default: return MvxVisibility.Visible; } diff --git a/MvvmCross.Plugins/Visibility/Platform/Console/MvxConsoleVisibility.cs b/MvvmCross.Plugins/Visibility/Platform/Console/MvxConsoleVisibility.cs index e2ffd2ab6..69138eeb3 100644 --- a/MvvmCross.Plugins/Visibility/Platform/Console/MvxConsoleVisibility.cs +++ b/MvvmCross.Plugins/Visibility/Platform/Console/MvxConsoleVisibility.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MS-PL license. // See the LICENSE file in the project root for more information. - using MvvmCross.UI; namespace MvvmCross.Plugin.Visibility.Platform.Console @@ -10,13 +9,9 @@ namespace MvvmCross.Plugin.Visibility.Platform.Console [Preserve(AllMembers = true)] public class MvxConsoleVisibility : IMvxNativeVisibility { - #region Implementation of IMvxNativeVisibility - public object ToNative(MvxVisibility visibility) { return visibility == MvxVisibility.Visible; } - - #endregion Implementation of IMvxNativeVisibility } } diff --git a/MvvmCross.Plugins/Visibility/Platform/Uap/MvxWinRTVisibility.cs b/MvvmCross.Plugins/Visibility/Platform/Uap/MvxWinRTVisibility.cs index fe3d5ab6f..5a49924f2 100644 --- a/MvvmCross.Plugins/Visibility/Platform/Uap/MvxWinRTVisibility.cs +++ b/MvvmCross.Plugins/Visibility/Platform/Uap/MvxWinRTVisibility.cs @@ -4,20 +4,17 @@ using MvvmCross.UI; +using UapVisibility = Windows.UI.Xaml.Visibility; namespace MvvmCross.Plugin.Visibility.Platform.Uap { public class MvxWinRTVisibility : IMvxNativeVisibility { - #region Implementation of IMvxNativeVisibility - public object ToNative(MvxVisibility visibility) { return visibility == MvxVisibility.Visible - ? Windows.UI.Xaml.Visibility.Visible - : Windows.UI.Xaml.Visibility.Collapsed; + ? UapVisibility.Visible + : UapVisibility.Collapsed; } - - #endregion Implementation of IMvxNativeVisibility } } diff --git a/MvvmCross.Plugins/Visibility/Platform/Wpf/MvxWpfVisibility.cs b/MvvmCross.Plugins/Visibility/Platform/Wpf/MvxWpfVisibility.cs index 12b7d438d..f1e30490f 100644 --- a/MvvmCross.Plugins/Visibility/Platform/Wpf/MvxWpfVisibility.cs +++ b/MvvmCross.Plugins/Visibility/Platform/Wpf/MvxWpfVisibility.cs @@ -2,22 +2,18 @@ // The .NET Foundation licenses this file to you under the MS-PL license. // See the LICENSE file in the project root for more information. - using MvvmCross.UI; +using WpfVisibility = System.Windows.Visibility; namespace MvvmCross.Plugin.Visibility.Platform.Wpf { public class MvxWpfVisibility : IMvxNativeVisibility { - #region Implementation of IMvxNativeVisibility - public object ToNative(MvxVisibility visibility) { return visibility == MvxVisibility.Visible - ? System.Windows.Visibility.Visible - : System.Windows.Visibility.Collapsed; + ? WpfVisibility.Visible + : WpfVisibility.Collapsed; } - - #endregion Implementation of IMvxNativeVisibility } } diff --git a/MvvmCross.Plugins/Visibility/Platform/iOS/MvxTouchVisibility.cs b/MvvmCross.Plugins/Visibility/Platform/iOS/MvxTouchVisibility.cs index 1eddae22f..ef898225d 100644 --- a/MvvmCross.Plugins/Visibility/Platform/iOS/MvxTouchVisibility.cs +++ b/MvvmCross.Plugins/Visibility/Platform/iOS/MvxTouchVisibility.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MS-PL license. // See the LICENSE file in the project root for more information. - using MvvmCross.UI; namespace MvvmCross.Plugin.Visibility.Platform.iOS @@ -10,13 +9,9 @@ namespace MvvmCross.Plugin.Visibility.Platform.iOS [Preserve(AllMembers = true)] public class MvxIosVisibility : IMvxNativeVisibility { - #region Implementation of IMvxNativeVisibility - public object ToNative(MvxVisibility visibility) { return visibility; } - - #endregion Implementation of IMvxNativeVisibility } } diff --git a/MvvmCross.sln b/MvvmCross.sln index 8bc7febba..ac5d00656 100644 --- a/MvvmCross.sln +++ b/MvvmCross.sln @@ -135,6 +135,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Playground.Uwp", "Projects\ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Playground.Wpf", "Projects\Playground\Playground.Wpf\Playground.Wpf.csproj", "{88FD9F4C-2A82-4919-91F4-AFB2999F6394}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvvmCross.Plugins.Visibility.UnitTest", "UnitTests\Plugins.Visibility\MvvmCross.Plugins.Visibility.UnitTest.csproj", "{B5581657-2A45-4FE7-AFC9-96EA06188582}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Ad-Hoc|Any CPU = Ad-Hoc|Any CPU @@ -3264,6 +3266,62 @@ Global {88FD9F4C-2A82-4919-91F4-AFB2999F6394}.Release|x64.Build.0 = Release|Any CPU {88FD9F4C-2A82-4919-91F4-AFB2999F6394}.Release|x86.ActiveCfg = Release|Any CPU {88FD9F4C-2A82-4919-91F4-AFB2999F6394}.Release|x86.Build.0 = Release|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Ad-Hoc|Mixed Platforms.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Ad-Hoc|Mixed Platforms.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.AppStore|ARM.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.AppStore|iPhone.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.AppStore|Mixed Platforms.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.AppStore|Mixed Platforms.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.AppStore|x64.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.AppStore|x64.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.AppStore|x86.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.AppStore|x86.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Debug|ARM.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Debug|ARM.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Debug|iPhone.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Debug|x64.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Debug|x64.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Debug|x86.ActiveCfg = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Debug|x86.Build.0 = Debug|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Release|Any CPU.Build.0 = Release|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Release|ARM.ActiveCfg = Release|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Release|ARM.Build.0 = Release|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Release|iPhone.ActiveCfg = Release|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Release|iPhone.Build.0 = Release|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Release|x64.ActiveCfg = Release|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Release|x64.Build.0 = Release|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Release|x86.ActiveCfg = Release|Any CPU + {B5581657-2A45-4FE7-AFC9-96EA06188582}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -3322,6 +3380,7 @@ Global {875FE27C-165C-46B4-BA05-7C1B047057F4} = {5339E878-07CE-4A32-9BE3-C3C86388D6DE} {AE22A4A5-8014-4A51-A237-4029D42F990F} = {5339E878-07CE-4A32-9BE3-C3C86388D6DE} {88FD9F4C-2A82-4919-91F4-AFB2999F6394} = {5339E878-07CE-4A32-9BE3-C3C86388D6DE} + {B5581657-2A45-4FE7-AFC9-96EA06188582} = {9EA04A6A-1367-4316-A6E9-A5173A060475} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {56FC36CA-7AC1-4C41-A846-C6C8D7FE0403} diff --git a/UnitTests/MvvmCross.UnitTest/Base/Exceptions/MvxExceptionTest.cs b/UnitTests/MvvmCross.UnitTest/Base/Exceptions/MvxExceptionTest.cs new file mode 100644 index 000000000..d88147e13 --- /dev/null +++ b/UnitTests/MvvmCross.UnitTest/Base/Exceptions/MvxExceptionTest.cs @@ -0,0 +1,58 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MS-PL license. +// See the LICENSE file in the project root for more information. + +using System; +using MvvmCross.Exceptions; +using Xunit; + +namespace MvvmCross.UnitTest.Base.Exceptions +{ + public class MvxExceptionTest + { + [Fact] + public void MvxWrap_Is_MvxException() + { + var ex = new Exception("hello"); + var wrapped = ex.MvxWrap(); + + Assert.IsType(wrapped); + } + + [Fact] + public void MvxWrap_Is_Thrown_As_MvxException() + { + var ex = new Exception("hello"); + var wrapped = ex.MvxWrap(); + + Assert.Throws(() => Throw(wrapped)); + + void Throw(Exception e) + { + throw e; + } + } + + [Fact] + public void MvxWrap_Has_InnerException() + { + var ex = new Exception("hello"); + var wrapped = ex.MvxWrap(); + + Assert.NotNull(wrapped.InnerException); + Assert.Equal(ex, wrapped.InnerException); + } + + [Fact] + public void MvxWrap_Wraps_Only_One_Level() + { + var ex = new Exception("hello"); + var wrapped = ex.MvxWrap(); + + for (var i = 0; i < 10; i++) + wrapped = wrapped.MvxWrap(); + + Assert.Equal(ex, wrapped.InnerException); + } + } +} diff --git a/UnitTests/MvvmCross.UnitTest/Base/MvxParserTest.cs b/UnitTests/MvvmCross.UnitTest/Base/MvxParserTest.cs index f7831cc0b..2987af75e 100644 --- a/UnitTests/MvvmCross.UnitTest/Base/MvxParserTest.cs +++ b/UnitTests/MvvmCross.UnitTest/Base/MvxParserTest.cs @@ -100,6 +100,13 @@ namespace MvvmCross.UnitTest.Base { return ReadTextUntilWhitespaceOr(items); } + + public bool CallIsValidFirstCharacterOfCSharpName(char character) + { + return IsValidFirstCharacterOfCSharpName(character); + } + + } [Fact] @@ -328,5 +335,60 @@ namespace MvvmCross.UnitTest.Base Assert.True(exceptionThrown); } } + + [Fact] + public void Reset_Resets_FullText_And_Index() + { + var parser = new Parser(); + parser.CallReset("derp"); + + Assert.Equal(0, parser.GetCurrentIndex()); + Assert.Equal("derp", parser.GetFullText()); + } + + [Theory] + [InlineData('a')] + [InlineData('b')] + [InlineData('c')] + [InlineData('d')] + [InlineData('e')] + [InlineData('f')] + [InlineData('g')] + [InlineData('_')] + [InlineData('Z')] + [InlineData('Æ')] + [InlineData('ø')] + [InlineData('ä')] + [InlineData('µ')] + public void TestIsValidFirstCharacterOfCSharpName_OK(char character) + { + var parser = new Parser(); + var result = parser.CallIsValidFirstCharacterOfCSharpName(character); + Assert.True(result); + } + + [Theory] + [InlineData('1')] + [InlineData(' ')] + [InlineData('-')] + [InlineData('\\')] + [InlineData('^')] + [InlineData('%')] + [InlineData('$')] + [InlineData('#')] + [InlineData('@')] + [InlineData('!')] + [InlineData('&')] + [InlineData('*')] + [InlineData('(')] + [InlineData(')')] + [InlineData('+')] + [InlineData('=')] + public void TestIsValidFirstCharacterOfCSharpName_Fail(char character) + { + var parser = new Parser(); + var result = parser.CallIsValidFirstCharacterOfCSharpName(character); + Assert.False(result); + } } } diff --git a/UnitTests/Plugins.Color.UnitTest/ColorCollection.cs b/UnitTests/Plugins.Color.UnitTest/ColorCollection.cs index f45eabbe2..68481f923 100644 --- a/UnitTests/Plugins.Color.UnitTest/ColorCollection.cs +++ b/UnitTests/Plugins.Color.UnitTest/ColorCollection.cs @@ -1,9 +1,6 @@ -// MvxColorValueConverterTest.cs -// (c) Copyright Cirrious Ltd. http://www.cirrious.com -// MvvmCross is licensed using Microsoft Public License (Ms-PL) -// Contributions and inspirations noted in readme.md and license.txt -// -// Project Lead - Stuart Lodge, @slodge, me@slodge.com +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MS-PL license. +// See the LICENSE file in the project root for more information. using MvvmCross.Test; using Xunit; diff --git a/UnitTests/Plugins.Visibility/MvvmCross.Plugins.Visibility.UnitTest.csproj b/UnitTests/Plugins.Visibility/MvvmCross.Plugins.Visibility.UnitTest.csproj new file mode 100644 index 000000000..21c5cc577 --- /dev/null +++ b/UnitTests/Plugins.Visibility/MvvmCross.Plugins.Visibility.UnitTest.csproj @@ -0,0 +1,25 @@ + + + + netcoreapp2.0 + false + MvvmCross.Plugins.Visibility.UnitTest + MvvmCross.Plugins.Visibility.UnitTest + + + + + + + + + + + + + + + + + + diff --git a/UnitTests/Plugins.Visibility/VisibilityCollection.cs b/UnitTests/Plugins.Visibility/VisibilityCollection.cs new file mode 100644 index 000000000..5461d30df --- /dev/null +++ b/UnitTests/Plugins.Visibility/VisibilityCollection.cs @@ -0,0 +1,17 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MS-PL license. +// See the LICENSE file in the project root for more information. + +using MvvmCross.Test; +using Xunit; + +namespace MvvmCross.Plugins.Visibility.UnitTest +{ + [CollectionDefinition("Visibility")] + public class VisibilityCollection : ICollectionFixture + { + // This class has no code, and is never created. Its purpose is simply + // to be the place to apply [CollectionDefinition] and all the + // ICollectionFixture<> interfaces. + } +} diff --git a/UnitTests/Plugins.Visibility/VisibilityValueConverterTest.cs b/UnitTests/Plugins.Visibility/VisibilityValueConverterTest.cs new file mode 100644 index 000000000..60f5708b3 --- /dev/null +++ b/UnitTests/Plugins.Visibility/VisibilityValueConverterTest.cs @@ -0,0 +1,55 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MS-PL license. +// See the LICENSE file in the project root for more information. + +using System.Globalization; +using MvvmCross.Plugin.Visibility; +using MvvmCross.Test; +using MvvmCross.UI; +using Xunit; + +namespace MvvmCross.Plugins.Visibility.UnitTest +{ + [Collection("Visibility")] + public class VisibilityValueConverterTest + { + MvxTestFixture _fixture; + + public VisibilityValueConverterTest(MvxTestFixture fixture) + { + _fixture = fixture; + _fixture.ClearAll(); + + _fixture.Ioc.RegisterSingleton(new MockNativeVisibility()); + } + + [Theory] + [InlineData(true, false, MvxVisibility.Visible)] + [InlineData(true, true, MvxVisibility.Visible)] + [InlineData(false, false, MvxVisibility.Collapsed)] + [InlineData(false, true, MvxVisibility.Hidden)] + public void VisibilityValueConverter_Test(bool visible, bool hide, MvxVisibility expected) + { + var converter = new MvxVisibilityValueConverter(); + var result = converter.Convert(visible, typeof(bool), hide, CultureInfo.CurrentUICulture); + Assert.Equal(expected, result); + } + + [Theory] + [InlineData(true, false, MvxVisibility.Collapsed)] + [InlineData(true, true, MvxVisibility.Hidden)] + [InlineData(false, false, MvxVisibility.Visible)] + [InlineData(false, true, MvxVisibility.Visible)] + public void InvertedVisibilityValueConverter_Test(bool visible, bool hide, MvxVisibility expected) + { + var converter = new MvxInvertedVisibilityValueConverter(); + var result = converter.Convert(visible, typeof(bool), hide, CultureInfo.CurrentUICulture); + Assert.Equal(expected, result); + } + + public class MockNativeVisibility : IMvxNativeVisibility + { + public object ToNative(MvxVisibility visibility) => visibility; + } + } +} From 65a21f97f73ccb946270e44a6713f92b640ed0fd Mon Sep 17 00:00:00 2001 From: Tomasz Cielecki Date: Mon, 12 Feb 2018 21:34:02 +0100 Subject: [PATCH 3/5] Fix MvxCachingFragmentStatepagerAdapter overrides FragmentName with the same body --- .../Fragment/MvxCachingFragmentStatePagerAdapter.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/MvvmCross.Android.Support/Fragment/MvxCachingFragmentStatePagerAdapter.cs b/MvvmCross.Android.Support/Fragment/MvxCachingFragmentStatePagerAdapter.cs index 356bbe910..fd2598764 100644 --- a/MvvmCross.Android.Support/Fragment/MvxCachingFragmentStatePagerAdapter.cs +++ b/MvvmCross.Android.Support/Fragment/MvxCachingFragmentStatePagerAdapter.cs @@ -41,11 +41,6 @@ namespace MvvmCross.Droid.Support.V4 public List FragmentsInfo { get; } - protected string FragmentJavaName(Type fragmentType) - { - return Class.FromType(fragmentType).Name; - } - public override Fragment GetItem(int position, Fragment.SavedState fragmentSavedState = null) { var fragInfo = FragmentsInfo.ElementAt(position); From 962dcd8b90ccc8e088c00d173bd4bc715e7cde81 Mon Sep 17 00:00:00 2001 From: Tomasz Cielecki Date: Mon, 12 Feb 2018 21:34:15 +0100 Subject: [PATCH 4/5] Remove unused field --- Projects/Playground/Playground.Droid/Views/SplitMasterView.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Projects/Playground/Playground.Droid/Views/SplitMasterView.cs b/Projects/Playground/Playground.Droid/Views/SplitMasterView.cs index 5b96dc9f8..6ad03a3bb 100644 --- a/Projects/Playground/Playground.Droid/Views/SplitMasterView.cs +++ b/Projects/Playground/Playground.Droid/Views/SplitMasterView.cs @@ -19,7 +19,6 @@ namespace Playground.Droid.Views [Register(nameof(SplitMasterView))] public class SplitMasterView : MvxFragment, NavigationView.IOnNavigationItemSelectedListener { - private NavigationView navigationView; private IMenuItem previousMenuItem; public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) From b7b79cc16d8926eb020c8b769c7f326a01b9e00a Mon Sep 17 00:00:00 2001 From: Tomasz Cielecki Date: Mon, 12 Feb 2018 21:34:32 +0100 Subject: [PATCH 5/5] Fix a bunch of unit test related warnings --- .../MvvmCross.UnitTest/Base/MvxIoCTest.cs | 12 +- .../Binding/Binders/MvxSourceStepTests.cs | 20 +-- .../Binding/Bindings/MvxFullBindingTest.cs | 50 ++++---- .../MvxFullBindingValueConversionTest.cs | 116 +++++++++--------- .../MvxExpressionBindingTest.cs | 2 +- .../Parse/Binding/Lang/MvxLangBindingTest.cs | 2 +- .../Binding/Swiss/MvxTibetBindingTest.cs | 34 ++--- .../MessengerHubTest.cs | 10 +- .../SimpleRestTest.cs | 2 +- 9 files changed, 117 insertions(+), 131 deletions(-) diff --git a/UnitTests/MvvmCross.UnitTest/Base/MvxIoCTest.cs b/UnitTests/MvvmCross.UnitTest/Base/MvxIoCTest.cs index 54460601d..d2200334a 100644 --- a/UnitTests/MvvmCross.UnitTest/Base/MvxIoCTest.cs +++ b/UnitTests/MvvmCross.UnitTest/Base/MvxIoCTest.cs @@ -345,7 +345,7 @@ namespace MvvmCross.UnitTest.Base Mvx.TryResolve>(out toResolve); Assert.NotNull(toResolve); - Assert.True(toResolve.GetType().GetTypeInfo().ImplementedInterfaces.Any(i => i == typeof(IOG))); + Assert.Contains(toResolve.GetType().GetTypeInfo().ImplementedInterfaces, i => i == typeof(IOG)); Assert.True(toResolve.GetType() == typeof(OG)); } @@ -361,7 +361,7 @@ namespace MvvmCross.UnitTest.Base Mvx.TryResolve>(out toResolve); Assert.NotNull(toResolve); - Assert.True(toResolve.GetType().GetTypeInfo().ImplementedInterfaces.Any(i => i == typeof(IOG))); + Assert.Contains(toResolve.GetType().GetTypeInfo().ImplementedInterfaces, i => i == typeof(IOG)); Assert.True(toResolve.GetType() == typeof(OG)); } @@ -377,7 +377,7 @@ namespace MvvmCross.UnitTest.Base Mvx.TryResolve>(out toResolve); Assert.NotNull(toResolve); - Assert.True(toResolve.GetType().GetTypeInfo().ImplementedInterfaces.Any(i => i == typeof(IOG2))); + Assert.Contains(toResolve.GetType().GetTypeInfo().ImplementedInterfaces, i => i == typeof(IOG2)); Assert.True(toResolve.GetType() == typeof(OG2)); } @@ -393,7 +393,7 @@ namespace MvvmCross.UnitTest.Base Mvx.TryResolve>(out toResolve); Assert.NotNull(toResolve); - Assert.True(toResolve.GetType().GetTypeInfo().ImplementedInterfaces.Any(i => i == typeof(IOG2))); + Assert.Contains(toResolve.GetType().GetTypeInfo().ImplementedInterfaces, i => i == typeof(IOG2)); Assert.True(toResolve.GetType() == typeof(OG2)); } @@ -424,9 +424,9 @@ namespace MvvmCross.UnitTest.Base Mvx.TryResolve(out toResolve); Assert.NotNull(toResolve); - Assert.True(toResolve.GetType().GetTypeInfo().ImplementedInterfaces.Any(i => i == typeof(IHasOGParameter))); + Assert.Contains(toResolve.GetType().GetTypeInfo().ImplementedInterfaces, i => i == typeof(IHasOGParameter)); Assert.True(toResolve.GetType() == typeof(HasOGParameter)); - Assert.True(toResolve.OpenGeneric.GetType().GetTypeInfo().ImplementedInterfaces.Any(i => i == typeof(IOG))); + Assert.Contains(toResolve.OpenGeneric.GetType().GetTypeInfo().ImplementedInterfaces, i => i == typeof(IOG)); Assert.True(toResolve.OpenGeneric.GetType() == typeof(OG)); } diff --git a/UnitTests/MvvmCross.UnitTest/Binding/Binders/MvxSourceStepTests.cs b/UnitTests/MvvmCross.UnitTest/Binding/Binders/MvxSourceStepTests.cs index efe2fa6cd..93daff0c0 100644 --- a/UnitTests/MvvmCross.UnitTest/Binding/Binders/MvxSourceStepTests.cs +++ b/UnitTests/MvvmCross.UnitTest/Binding/Binders/MvxSourceStepTests.cs @@ -277,7 +277,7 @@ namespace MvvmCross.UnitTest.Binding.Binders source.DoubleProperty1 = doubleProperty = 11.11; - Assert.Equal(1, changes.Count); + Assert.Single(changes); Assert.Equal($"{doubleProperty}It was missing", changes[0]); value = sourceStep.GetValue(); @@ -343,7 +343,7 @@ namespace MvvmCross.UnitTest.Binding.Binders source.DoubleProperty1 = doubleProperty = 11.11; - Assert.Equal(1, changes.Count); + Assert.Single(changes); Assert.Equal($"It was missing{doubleProperty}", changes[0]); value = sourceStep.GetValue(); @@ -407,7 +407,7 @@ namespace MvvmCross.UnitTest.Binding.Binders source.DoubleProperty1 = 11.11; - Assert.Equal(1, changes.Count); + Assert.Single(changes); Assert.Equal(34.56, changes[0]); value = sourceStep.GetValue(); @@ -449,7 +449,7 @@ namespace MvvmCross.UnitTest.Binding.Binders source.Collection[0] = "Changed to 17"; - Assert.Equal(1, changes.Count); + Assert.Single(changes); Assert.Equal("Changed to 17", changes[0]); value = sourceStep.GetValue(); @@ -462,11 +462,11 @@ namespace MvvmCross.UnitTest.Binding.Binders source.Collection[0] = "Changed again 19"; - Assert.Equal(1, changes.Count); + Assert.Single(changes); sourceStep.DataContext = source; - Assert.Equal(1, changes.Count); + Assert.Single(changes); value = sourceStep.GetValue(); Assert.Equal("Changed again 19", value); @@ -550,7 +550,7 @@ namespace MvvmCross.UnitTest.Binding.Binders source.Property1 = "Changed to 17"; - Assert.Equal(1, changes.Count); + Assert.Single(changes); Assert.Equal("Changed to 17", changes[0]); value = sourceStep.GetValue(); @@ -563,11 +563,11 @@ namespace MvvmCross.UnitTest.Binding.Binders source.Property1 = "Changed again 19"; - Assert.Equal(1, changes.Count); + Assert.Single(changes); sourceStep.DataContext = source; - Assert.Equal(1, changes.Count); + Assert.Single(changes); value = sourceStep.GetValue(); Assert.Equal("Changed again 19", value); @@ -750,7 +750,7 @@ namespace MvvmCross.UnitTest.Binding.Binders source.SubSource.SubProperty1 = "Changed to 17"; - Assert.Equal(1, changes.Count); + Assert.Single(changes); Assert.Equal("Changed to 17", changes[0]); value = sourceStep.GetValue(); diff --git a/UnitTests/MvvmCross.UnitTest/Binding/Bindings/MvxFullBindingTest.cs b/UnitTests/MvvmCross.UnitTest/Binding/Bindings/MvxFullBindingTest.cs index c8e9bdc7f..5ff68a3da 100644 --- a/UnitTests/MvvmCross.UnitTest/Binding/Bindings/MvxFullBindingTest.cs +++ b/UnitTests/MvvmCross.UnitTest/Binding/Bindings/MvxFullBindingTest.cs @@ -49,7 +49,7 @@ namespace MvvmCross.UnitTest.Binding.Bindings { Assert.Equal(1, mockTarget.SubscribeToEventsCalled); - Assert.Equal(1, mockTarget.Values.Count); + Assert.Single(mockTarget.Values); Assert.Equal("TryGetValueValue", mockTarget.Values[0]); mockSource.TryGetValueValue = "SecondValue"; @@ -62,9 +62,9 @@ namespace MvvmCross.UnitTest.Binding.Bindings Assert.Equal(3, mockTarget.Values.Count); Assert.Equal("ThirdValue", mockTarget.Values[2]); - Assert.Equal(0, mockSource.ValuesSet.Count); + Assert.Empty(mockSource.ValuesSet); mockTarget.FireValueChanged(new MvxTargetChangedEventArgs("FromTarget1")); - Assert.Equal(1, mockSource.ValuesSet.Count); + Assert.Single(mockSource.ValuesSet); Assert.Equal("FromTarget1", mockSource.ValuesSet[0]); mockTarget.FireValueChanged(new MvxTargetChangedEventArgs("FromTarget2")); Assert.Equal(2, mockSource.ValuesSet.Count); @@ -127,7 +127,7 @@ namespace MvvmCross.UnitTest.Binding.Bindings { Assert.Equal(0, mockTarget.SubscribeToEventsCalled); - Assert.Equal(1, mockTarget.Values.Count); + Assert.Single(mockTarget.Values); Assert.Equal("TryGetValueValue", mockTarget.Values[0]); mockSource.TryGetValueValue = "SecondValue"; @@ -140,11 +140,11 @@ namespace MvvmCross.UnitTest.Binding.Bindings Assert.Equal(3, mockTarget.Values.Count); Assert.Equal("ThirdValue", mockTarget.Values[2]); - Assert.Equal(0, mockSource.ValuesSet.Count); + Assert.Empty(mockSource.ValuesSet); mockTarget.FireValueChanged(new MvxTargetChangedEventArgs("FromTarget1")); - Assert.Equal(0, mockSource.ValuesSet.Count); + Assert.Empty(mockSource.ValuesSet); mockTarget.FireValueChanged(new MvxTargetChangedEventArgs("FromTarget2")); - Assert.Equal(0, mockSource.ValuesSet.Count); + Assert.Empty(mockSource.ValuesSet); Assert.Equal(0, mockSource.DisposeCalled); Assert.Equal(0, mockTarget.DisposeCalled); @@ -169,9 +169,9 @@ namespace MvvmCross.UnitTest.Binding.Bindings Assert.Equal("NewValue", mockTarget.Values[5]); mockTarget.FireValueChanged(new MvxTargetChangedEventArgs("FromTarget1")); - Assert.Equal(0, mockSource.ValuesSet.Count); + Assert.Empty(mockSource.ValuesSet); mockTarget.FireValueChanged(new MvxTargetChangedEventArgs("FromTarget2")); - Assert.Equal(0, mockSource.ValuesSet.Count); + Assert.Empty(mockSource.ValuesSet); binding.Dispose(); Assert.Equal(3, mockSource.DisposeCalled); @@ -200,19 +200,19 @@ namespace MvvmCross.UnitTest.Binding.Bindings { Assert.Equal(1, mockTarget.SubscribeToEventsCalled); - Assert.Equal(0, mockTarget.Values.Count); + Assert.Empty(mockTarget.Values); mockSource.TryGetValueValue = "SecondValue"; mockSource.FireSourceChanged(); - Assert.Equal(0, mockTarget.Values.Count); + Assert.Empty(mockTarget.Values); mockSource.TryGetValueValue = "ThirdValue"; mockSource.FireSourceChanged(); - Assert.Equal(0, mockTarget.Values.Count); + Assert.Empty(mockTarget.Values); - Assert.Equal(0, mockSource.ValuesSet.Count); + Assert.Empty(mockSource.ValuesSet); mockTarget.FireValueChanged(new MvxTargetChangedEventArgs("FromTarget1")); - Assert.Equal(1, mockSource.ValuesSet.Count); + Assert.Single(mockSource.ValuesSet); Assert.Equal("FromTarget1", mockSource.ValuesSet[0]); mockTarget.FireValueChanged(new MvxTargetChangedEventArgs("FromTarget2")); Assert.Equal(2, mockSource.ValuesSet.Count); @@ -225,17 +225,17 @@ namespace MvvmCross.UnitTest.Binding.Bindings Assert.Equal(1, mockSource.DisposeCalled); Assert.Equal(0, mockTarget.DisposeCalled); - Assert.Equal(0, mockTarget.Values.Count); + Assert.Empty(mockTarget.Values); binding.DataContext = new { ignored = 13 }; Assert.Equal(2, mockSource.DisposeCalled); Assert.Equal(0, mockTarget.DisposeCalled); - Assert.Equal(0, mockTarget.Values.Count); + Assert.Empty(mockTarget.Values); mockSource.TryGetValueValue = "NewValue"; mockSource.FireSourceChanged(); - Assert.Equal(0, mockTarget.Values.Count); + Assert.Empty(mockTarget.Values); mockTarget.FireValueChanged(new MvxTargetChangedEventArgs("FromTarget1")); Assert.Equal(3, mockSource.ValuesSet.Count); @@ -271,22 +271,22 @@ namespace MvvmCross.UnitTest.Binding.Bindings { Assert.Equal(0, mockTarget.SubscribeToEventsCalled); - Assert.Equal(1, mockTarget.Values.Count); + Assert.Single(mockTarget.Values); Assert.Equal("TryGetValueValue", mockTarget.Values[0]); mockSource.TryGetValueValue = "SecondValue"; mockSource.FireSourceChanged(); - Assert.Equal(1, mockTarget.Values.Count); + Assert.Single(mockTarget.Values); mockSource.TryGetValueValue = "ThirdValue"; mockSource.FireSourceChanged(); - Assert.Equal(1, mockTarget.Values.Count); + Assert.Single(mockTarget.Values); - Assert.Equal(0, mockSource.ValuesSet.Count); + Assert.Empty(mockSource.ValuesSet); mockTarget.FireValueChanged(new MvxTargetChangedEventArgs("FromTarget1")); - Assert.Equal(0, mockSource.ValuesSet.Count); + Assert.Empty(mockSource.ValuesSet); mockTarget.FireValueChanged(new MvxTargetChangedEventArgs("FromTarget2")); - Assert.Equal(0, mockSource.ValuesSet.Count); + Assert.Empty(mockSource.ValuesSet); Assert.Equal(0, mockSource.DisposeCalled); Assert.Equal(0, mockTarget.DisposeCalled); @@ -310,9 +310,9 @@ namespace MvvmCross.UnitTest.Binding.Bindings Assert.Equal(3, mockTarget.Values.Count); mockTarget.FireValueChanged(new MvxTargetChangedEventArgs("FromTarget1")); - Assert.Equal(0, mockSource.ValuesSet.Count); + Assert.Empty(mockSource.ValuesSet); mockTarget.FireValueChanged(new MvxTargetChangedEventArgs("FromTarget2")); - Assert.Equal(0, mockSource.ValuesSet.Count); + Assert.Empty(mockSource.ValuesSet); binding.Dispose(); Assert.Equal(3, mockSource.DisposeCalled); diff --git a/UnitTests/MvvmCross.UnitTest/Binding/Bindings/MvxFullBindingValueConversionTest.cs b/UnitTests/MvvmCross.UnitTest/Binding/Bindings/MvxFullBindingValueConversionTest.cs index e07356431..a8b42611f 100644 --- a/UnitTests/MvvmCross.UnitTest/Binding/Bindings/MvxFullBindingValueConversionTest.cs +++ b/UnitTests/MvvmCross.UnitTest/Binding/Bindings/MvxFullBindingValueConversionTest.cs @@ -41,9 +41,9 @@ namespace MvvmCross.UnitTest.Binding.Bindings var parameter = new { Ignored = 12 }; var binding = TestSetupCommon(mockValueConverter, parameter, typeof(object), out mockSource, out mockTarget); - Assert.Equal(1, mockTarget.Values.Count); + Assert.Single(mockTarget.Values); Assert.Equal("Test ConversionResult", mockTarget.Values[0]); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); Assert.Equal("TryGetValueValue", mockValueConverter.ConversionsRequested[0]); } @@ -59,9 +59,9 @@ namespace MvvmCross.UnitTest.Binding.Bindings var parameter = new { Ignored = 12 }; var binding = TestSetupCommon(mockValueConverter, parameter, typeof(object), out mockSource, out mockTarget); - Assert.Equal(1, mockTarget.Values.Count); + Assert.Single(mockTarget.Values); Assert.Equal("Test ConversionResult", mockTarget.Values[0]); - Assert.Equal(1, mockValueConverter.ConversionParameters.Count); + Assert.Single(mockValueConverter.ConversionParameters); Assert.Equal(parameter, mockValueConverter.ConversionParameters[0]); } @@ -80,9 +80,9 @@ namespace MvvmCross.UnitTest.Binding.Bindings var valueChanged = new { Hello = 34 }; mockTarget.FireValueChanged(new MvxTargetChangedEventArgs(valueChanged)); - Assert.Equal(1, mockSource.ValuesSet.Count); + Assert.Single(mockSource.ValuesSet); Assert.Equal("Test ConversionBackResult", mockSource.ValuesSet[0]); - Assert.Equal(1, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsBackRequested); Assert.Equal(valueChanged, mockValueConverter.ConversionsBackRequested[0]); } @@ -101,9 +101,9 @@ namespace MvvmCross.UnitTest.Binding.Bindings var valueChanged = new { Hello = 34 }; mockTarget.FireValueChanged(new MvxTargetChangedEventArgs(valueChanged)); - Assert.Equal(1, mockSource.ValuesSet.Count); + Assert.Single(mockSource.ValuesSet); Assert.Equal("Test ConversionBackResult", mockSource.ValuesSet[0]); - Assert.Equal(1, mockValueConverter.ConversionBackParameters.Count); + Assert.Single(mockValueConverter.ConversionBackParameters); Assert.Equal(parameter, mockValueConverter.ConversionBackParameters[0]); } @@ -142,7 +142,7 @@ namespace MvvmCross.UnitTest.Binding.Bindings mockSource.SourceType = aType.GetType(); mockTarget.FireValueChanged(new MvxTargetChangedEventArgs("Ignored")); - Assert.Equal(1, mockValueConverter.ConversionBackTypes.Count); + Assert.Single(mockValueConverter.ConversionBackTypes); Assert.Equal(aType.GetType(), mockValueConverter.ConversionBackTypes[0]); } @@ -159,10 +159,10 @@ namespace MvvmCross.UnitTest.Binding.Bindings var fallback = new { Fred = "Not Barney" }; var binding = TestSetupCommon(mockValueConverter, parameter, fallback, typeof(object), out mockSource, out mockTarget); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); + Assert.Empty(mockValueConverter.ConversionsBackRequested); - Assert.Equal(1, mockTarget.Values.Count); + Assert.Single(mockTarget.Values); Assert.Equal(fallback, mockTarget.Values[0]); } @@ -179,17 +179,17 @@ namespace MvvmCross.UnitTest.Binding.Bindings var fallback = new { Fred = "Not Barney" }; var binding = TestSetupCommon(mockValueConverter, parameter, fallback, typeof(object), out mockSource, out mockTarget); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); + Assert.Empty(mockValueConverter.ConversionsBackRequested); - Assert.Equal(1, mockTarget.Values.Count); + Assert.Single(mockTarget.Values); Assert.Equal("A test value", mockTarget.Values[0]); mockSource.TryGetValueResult = false; mockSource.FireSourceChanged(); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); + Assert.Empty(mockValueConverter.ConversionsBackRequested); Assert.Equal(2, mockTarget.Values.Count); Assert.Equal(fallback, mockTarget.Values[1]); @@ -208,17 +208,17 @@ namespace MvvmCross.UnitTest.Binding.Bindings object fallback = null; var binding = TestSetupCommon(mockValueConverter, parameter, fallback, typeof(object), out mockSource, out mockTarget); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); + Assert.Empty(mockValueConverter.ConversionsBackRequested); - Assert.Equal(1, mockTarget.Values.Count); + Assert.Single(mockTarget.Values); Assert.Null(mockTarget.Values[0]); mockSource.TryGetValueValue = "Fred"; mockSource.FireSourceChanged(); Assert.Equal(2, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Empty(mockValueConverter.ConversionsBackRequested); Assert.Equal(2, mockTarget.Values.Count); Assert.Null(mockTarget.Values[1]); @@ -227,7 +227,7 @@ namespace MvvmCross.UnitTest.Binding.Bindings mockSource.FireSourceChanged(); Assert.Equal(3, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Empty(mockValueConverter.ConversionsBackRequested); Assert.Equal(3, mockTarget.Values.Count); Assert.Null(mockTarget.Values[2]); @@ -246,17 +246,17 @@ namespace MvvmCross.UnitTest.Binding.Bindings object fallback = null; var binding = TestSetupCommon(mockValueConverter, parameter, fallback, typeof(int), out mockSource, out mockTarget); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); + Assert.Empty(mockValueConverter.ConversionsBackRequested); - Assert.Equal(1, mockTarget.Values.Count); + Assert.Single(mockTarget.Values); Assert.Equal(0, mockTarget.Values[0]); mockSource.TryGetValueValue = "Fred"; mockSource.FireSourceChanged(); Assert.Equal(2, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Empty(mockValueConverter.ConversionsBackRequested); Assert.Equal(2, mockTarget.Values.Count); Assert.Equal(0, mockTarget.Values[1]); @@ -265,7 +265,7 @@ namespace MvvmCross.UnitTest.Binding.Bindings mockSource.FireSourceChanged(); Assert.Equal(3, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Empty(mockValueConverter.ConversionsBackRequested); Assert.Equal(3, mockTarget.Values.Count); Assert.Equal(0, mockTarget.Values[2]); @@ -284,17 +284,17 @@ namespace MvvmCross.UnitTest.Binding.Bindings object fallback = null; var binding = TestSetupCommon(mockValueConverter, parameter, fallback, typeof(int?), out mockSource, out mockTarget); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); + Assert.Empty(mockValueConverter.ConversionsBackRequested); - Assert.Equal(1, mockTarget.Values.Count); + Assert.Single(mockTarget.Values); Assert.Null(mockTarget.Values[0]); mockSource.TryGetValueValue = "Fred"; mockSource.FireSourceChanged(); Assert.Equal(2, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Empty(mockValueConverter.ConversionsBackRequested); Assert.Equal(2, mockTarget.Values.Count); Assert.Null(mockTarget.Values[1]); @@ -303,7 +303,7 @@ namespace MvvmCross.UnitTest.Binding.Bindings mockSource.FireSourceChanged(); Assert.Equal(3, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Empty(mockValueConverter.ConversionsBackRequested); Assert.Equal(3, mockTarget.Values.Count); Assert.Null(mockTarget.Values[2]); @@ -322,17 +322,17 @@ namespace MvvmCross.UnitTest.Binding.Bindings object fallback = null; var binding = TestSetupCommon(mockValueConverter, parameter, fallback, typeof(object), out mockSource, out mockTarget); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); + Assert.Empty(mockValueConverter.ConversionsBackRequested); - Assert.Equal(1, mockTarget.Values.Count); + Assert.Single(mockTarget.Values); Assert.Equal("A test value", mockTarget.Values[0]); mockSource.TryGetValueResult = false; mockSource.FireSourceChanged(); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); + Assert.Empty(mockValueConverter.ConversionsBackRequested); Assert.Equal(2, mockTarget.Values.Count); Assert.Null(mockTarget.Values[1]); @@ -340,8 +340,8 @@ namespace MvvmCross.UnitTest.Binding.Bindings mockSource.TryGetValueResult = false; mockSource.FireSourceChanged(); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); + Assert.Empty(mockValueConverter.ConversionsBackRequested); Assert.Equal(3, mockTarget.Values.Count); Assert.Null(mockTarget.Values[2]); @@ -351,7 +351,7 @@ namespace MvvmCross.UnitTest.Binding.Bindings mockSource.FireSourceChanged(); Assert.Equal(2, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Empty(mockValueConverter.ConversionsBackRequested); Assert.Equal(4, mockTarget.Values.Count); Assert.Equal("A test value", mockTarget.Values[3]); @@ -370,17 +370,17 @@ namespace MvvmCross.UnitTest.Binding.Bindings object fallback = null; var binding = TestSetupCommon(mockValueConverter, parameter, fallback, typeof(int), out mockSource, out mockTarget); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); + Assert.Empty(mockValueConverter.ConversionsBackRequested); - Assert.Equal(1, mockTarget.Values.Count); + Assert.Single(mockTarget.Values); Assert.Equal("A test value", mockTarget.Values[0]); mockSource.TryGetValueResult = false; mockSource.FireSourceChanged(); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); + Assert.Empty(mockValueConverter.ConversionsBackRequested); Assert.Equal(2, mockTarget.Values.Count); Assert.Equal(0, mockTarget.Values[1]); @@ -388,8 +388,8 @@ namespace MvvmCross.UnitTest.Binding.Bindings mockSource.TryGetValueResult = false; mockSource.FireSourceChanged(); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); + Assert.Empty(mockValueConverter.ConversionsBackRequested); Assert.Equal(3, mockTarget.Values.Count); Assert.Equal(0, mockTarget.Values[2]); @@ -397,8 +397,8 @@ namespace MvvmCross.UnitTest.Binding.Bindings mockSource.TryGetValueResult = false; mockSource.FireSourceChanged(); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); + Assert.Empty(mockValueConverter.ConversionsBackRequested); Assert.Equal(4, mockTarget.Values.Count); Assert.Equal(0, mockTarget.Values[3]); @@ -417,17 +417,17 @@ namespace MvvmCross.UnitTest.Binding.Bindings object fallback = null; var binding = TestSetupCommon(mockValueConverter, parameter, fallback, typeof(int?), out mockSource, out mockTarget); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); + Assert.Empty(mockValueConverter.ConversionsBackRequested); - Assert.Equal(1, mockTarget.Values.Count); + Assert.Single(mockTarget.Values); Assert.Equal("A test value", mockTarget.Values[0]); mockSource.TryGetValueResult = false; mockSource.FireSourceChanged(); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); + Assert.Empty(mockValueConverter.ConversionsBackRequested); Assert.Equal(2, mockTarget.Values.Count); Assert.Null(mockTarget.Values[1]); @@ -435,8 +435,8 @@ namespace MvvmCross.UnitTest.Binding.Bindings mockSource.TryGetValueResult = false; mockSource.FireSourceChanged(); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); + Assert.Empty(mockValueConverter.ConversionsBackRequested); Assert.Equal(3, mockTarget.Values.Count); Assert.Null(mockTarget.Values[2]); @@ -444,8 +444,8 @@ namespace MvvmCross.UnitTest.Binding.Bindings mockSource.TryGetValueResult = false; mockSource.FireSourceChanged(); - Assert.Equal(1, mockValueConverter.ConversionsRequested.Count); - Assert.Equal(0, mockValueConverter.ConversionsBackRequested.Count); + Assert.Single(mockValueConverter.ConversionsRequested); + Assert.Empty(mockValueConverter.ConversionsBackRequested); Assert.Equal(4, mockTarget.Values.Count); Assert.Null(mockTarget.Values[3]); diff --git a/UnitTests/MvvmCross.UnitTest/Binding/ExpressionParse/MvxExpressionBindingTest.cs b/UnitTests/MvvmCross.UnitTest/Binding/ExpressionParse/MvxExpressionBindingTest.cs index 6b9f3b4e2..34f31007d 100644 --- a/UnitTests/MvvmCross.UnitTest/Binding/ExpressionParse/MvxExpressionBindingTest.cs +++ b/UnitTests/MvvmCross.UnitTest/Binding/ExpressionParse/MvxExpressionBindingTest.cs @@ -456,7 +456,7 @@ namespace MvvmCross.UnitTest.Binding.ExpressionParse action(testTarget); - Assert.Equal(1, callbacksSeen.Count); + Assert.Single(callbacksSeen); var callback = callbacksSeen[0]; var expectedTarget = findTargetObjectFunc(testTarget); Assert.Equal(expectedTarget, callback.Target); diff --git a/UnitTests/MvvmCross.UnitTest/Binding/Parse/Binding/Lang/MvxLangBindingTest.cs b/UnitTests/MvvmCross.UnitTest/Binding/Parse/Binding/Lang/MvxLangBindingTest.cs index d6468b676..91efa15a5 100644 --- a/UnitTests/MvvmCross.UnitTest/Binding/Parse/Binding/Lang/MvxLangBindingTest.cs +++ b/UnitTests/MvvmCross.UnitTest/Binding/Parse/Binding/Lang/MvxLangBindingTest.cs @@ -31,7 +31,7 @@ namespace MvvmCross.UnitTest.Binding.Parse.Binding.Lang MvxSerializableBindingSpecification result; var parsed = language.TryParseBindingSpecification(testPair.Key, out result); Assert.True(parsed, "Failed to parse " + testPair.Key); - Assert.Equal(1, result.Count); + Assert.Single(result); var keyAndDescription = testPair.Value.First(); var resultKeyAndDescription = result.First(); var expectedDescription = new MvxSerializableBindingDescription() diff --git a/UnitTests/MvvmCross.UnitTest/Binding/Parse/Binding/Swiss/MvxTibetBindingTest.cs b/UnitTests/MvvmCross.UnitTest/Binding/Parse/Binding/Swiss/MvxTibetBindingTest.cs index b1dbdade4..0bd7ab532 100644 --- a/UnitTests/MvvmCross.UnitTest/Binding/Parse/Binding/Swiss/MvxTibetBindingTest.cs +++ b/UnitTests/MvvmCross.UnitTest/Binding/Parse/Binding/Swiss/MvxTibetBindingTest.cs @@ -476,30 +476,16 @@ namespace MvvmCross.UnitTest.Binding.Parse.Binding.Swiss PerformTest(text, expected); } - [Fact] - public void TestFunctionalValueConverterWithNullInTheName() - { - TestFunctionalValueConverterWithKEYWORDInTheName("Null"); - TestFunctionalValueConverterWithKEYWORDInTheName("null"); - TestFunctionalValueConverterWithKEYWORDInTheName("NULL"); - } - - [Fact] - public void TestFunctionalValueConverterWithTrueInTheName() - { - TestFunctionalValueConverterWithKEYWORDInTheName("True"); - TestFunctionalValueConverterWithKEYWORDInTheName("true"); - TestFunctionalValueConverterWithKEYWORDInTheName("TRUE"); - } - - [Fact] - public void TestFunctionalValueConverterWithFalseInTheName() - { - TestFunctionalValueConverterWithKEYWORDInTheName("False"); - TestFunctionalValueConverterWithKEYWORDInTheName("false"); - TestFunctionalValueConverterWithKEYWORDInTheName("FALSE"); - } - + [Theory] + [InlineData("Null")] + [InlineData("null")] + [InlineData("NULL")] + [InlineData("True")] + [InlineData("true")] + [InlineData("TRUE")] + [InlineData("False")] + [InlineData("false")] + [InlineData("FALSE")] public void TestFunctionalValueConverterWithKEYWORDInTheName(string keyword) { var text = "Target " + keyword + "This(Foo, 'Hello World')"; diff --git a/UnitTests/Plugins.Messenger.UnitTest/MessengerHubTest.cs b/UnitTests/Plugins.Messenger.UnitTest/MessengerHubTest.cs index 6dca746ba..34494f0b2 100644 --- a/UnitTests/Plugins.Messenger.UnitTest/MessengerHubTest.cs +++ b/UnitTests/Plugins.Messenger.UnitTest/MessengerHubTest.cs @@ -350,19 +350,19 @@ namespace MvvmCross.Plugins.Messenger.UnitTest Assert.Null(messenger.GetSubscriptionTagsFor()[0]); Assert.Equal(3, messenger.GetSubscriptionTagsFor().Count); Assert.Equal(2, messenger.GetSubscriptionTagsFor().Where(x => x == testTag1).Count()); - Assert.Equal(1, messenger.GetSubscriptionTagsFor().Where(x => x == testTag2).Count()); + Assert.Single(messenger.GetSubscriptionTagsFor().Where(x => x == testTag2)); messenger.Unsubscribe(token); Assert.Equal(1, messenger.GetSubscriptionTagsFor().Count); Assert.Null(messenger.GetSubscriptionTagsFor()[0]); Assert.Equal(2, messenger.GetSubscriptionTagsFor().Count); - Assert.Equal(1, messenger.GetSubscriptionTagsFor().Where(x => x == testTag1).Count()); - Assert.Equal(1, messenger.GetSubscriptionTagsFor().Where(x => x == testTag2).Count()); + Assert.Single(messenger.GetSubscriptionTagsFor().Where(x => x == testTag1)); + Assert.Single(messenger.GetSubscriptionTagsFor().Where(x => x == testTag2)); messenger.Unsubscribe(token2); Assert.Equal(1, messenger.GetSubscriptionTagsFor().Count); Assert.Null(messenger.GetSubscriptionTagsFor()[0]); Assert.Equal(1, messenger.GetSubscriptionTagsFor().Count); - Assert.Equal(0, messenger.GetSubscriptionTagsFor().Where(x => x == testTag1).Count()); - Assert.Equal(1, messenger.GetSubscriptionTagsFor().Where(x => x == testTag2).Count()); + Assert.Empty(messenger.GetSubscriptionTagsFor().Where(x => x == testTag1)); + Assert.Single(messenger.GetSubscriptionTagsFor().Where(x => x == testTag2)); messenger.Unsubscribe(token3); Assert.Equal(1, messenger.GetSubscriptionTagsFor().Count); Assert.Null(messenger.GetSubscriptionTagsFor()[0]); diff --git a/UnitTests/Plugins.Network.UnitTest/SimpleRestTest.cs b/UnitTests/Plugins.Network.UnitTest/SimpleRestTest.cs index a5b3c8adb..fdf30060f 100644 --- a/UnitTests/Plugins.Network.UnitTest/SimpleRestTest.cs +++ b/UnitTests/Plugins.Network.UnitTest/SimpleRestTest.cs @@ -37,7 +37,7 @@ namespace MvvmCross.Plugins.Network.UnitTest Assert.NotNull(theResponse.Result); Assert.Equal(HttpStatusCode.OK, theResponse.StatusCode); Assert.True(theResponse.Result.items.Count == 10); - Assert.True(theResponse.Result.items[0].ToString().Contains("MonoTouch")); + Assert.Contains("MonoTouch", theResponse.Result.items[0].ToString()); } } }