Merge remote-tracking branch 'MvvmCross/develop' into new-plugin-architecture

# Conflicts:
#	MvvmCross.Forms/Platform/Android/Core/MvxFormsAndroidSetup.cs
#	MvvmCross.Plugins/File/Platform/Android/Plugin.cs
This commit is contained in:
William Barbosa 2018-02-12 18:24:47 -02:00
Родитель 6a8e03f4c7 8a3ddd828c
Коммит 7670a99bc2
404 изменённых файлов: 773 добавлений и 856 удалений

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

@ -1 +0,0 @@
next-version: 6.0.0

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

@ -13,6 +13,7 @@ using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
using MvvmCross.CodeAnalysis.Core;
using MvvmCross.CodeAnalysis.Extensions;
using MvvmCross.Commands;
using MvvmCross.ViewModels;
namespace MvvmCross.CodeAnalysis.Analyzers

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

@ -9,7 +9,7 @@ using Android.OS;
using Android.Runtime;
using Android.Support.V4.App;
using MvvmCross.Base;
using MvvmCross.Platform.Android.Base.Views;
using MvvmCross.Platform.Android.Views.Base;
namespace MvvmCross.Droid.Support.V4.EventSource
{
@ -126,4 +126,4 @@ namespace MvvmCross.Droid.Support.V4.EventSource
public event EventHandler<MvxValueEventArgs<MvxActivityResultParameters>> ActivityResultCalled;
}
}
}

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

@ -11,7 +11,7 @@ using Android.Support.V4.App;
using Android.Support.V4.View;
using Java.Lang;
using MvvmCross.Core;
using MvvmCross.Platform.Android.Base.Platform;
using MvvmCross.Platform.Android;
using MvvmCross.Platform.Android.Presenters.Attributes;
using MvvmCross.Platform.Android.Views;
using MvvmCross.ViewModels;

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

@ -6,6 +6,7 @@ using Android.Support.V4.App;
using Android.Views;
using MvvmCross.Droid.Support.V4.EventSource;
using MvvmCross.Exceptions;
using MvvmCross.Logging;
using MvvmCross.Platform.Android.Binding.BindingContext;
using MvvmCross.Platform.Android.Core;
using MvvmCross.Platform.Android.Views;
@ -104,5 +105,52 @@ namespace MvvmCross.Droid.Support.V4
var setupSingleton = MvxAndroidSetupSingleton.EnsureSingletonAvailable(fragment.Activity.ApplicationContext);
setupSingleton.EnsureInitialized();
}
public static TFragment FindFragmentById<TFragment>(this MvxFragmentActivity activity, int resourceId)
where TFragment : Fragment
{
var fragment = activity.SupportFragmentManager.FindFragmentById(resourceId);
if (fragment == null) {
MvxAndroidLog.Instance.Warn("Failed to find fragment id {0} in {1}", resourceId, activity.GetType().Name);
return default(TFragment);
}
return SafeCast<TFragment>(fragment);
}
public static TFragment FindFragmentByTag<TFragment>(this MvxFragmentActivity activity, string tag)
where TFragment : Fragment
{
var fragment = activity.SupportFragmentManager.FindFragmentByTag(tag);
if (fragment == null) {
MvxAndroidLog.Instance.Warn("Failed to find fragment tag {0} in {1}", tag, activity.GetType().Name);
return default(TFragment);
}
return SafeCast<TFragment>(fragment);
}
private static TFragment SafeCast<TFragment>(Fragment fragment) where TFragment : Fragment
{
if (!(fragment is TFragment)) {
MvxAndroidLog.Instance.Warn("Fragment type mismatch got {0} but expected {1}", fragment.GetType().FullName,
typeof(TFragment).FullName);
return default(TFragment);
}
return (TFragment)fragment;
}
public static void LoadViewModelFrom(this IMvxFragmentView view, MvxViewModelRequest request, IMvxBundle savedState = null)
{
var loader = Mvx.Resolve<IMvxViewModelLoader>();
var viewModel = loader.LoadViewModel(request, savedState);
if (viewModel == null) {
MvxAndroidLog.Instance.Warn("ViewModel not loaded for {0}", request.ViewModelType.FullName);
return;
}
view.ViewModel = viewModel;
}
}
}

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

@ -1,65 +0,0 @@
// 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 Android.Support.V4.App;
using MvvmCross.Logging;
using MvvmCross.Platform.Android.Views;
using MvvmCross.ViewModels;
namespace MvvmCross.Droid.Support.V4
{
public static class MvxFragmentExtensionMethods
{
public static TFragment FindFragmentById<TFragment>(this MvxFragmentActivity activity, int resourceId)
where TFragment : Fragment
{
var fragment = activity.SupportFragmentManager.FindFragmentById(resourceId);
if (fragment == null)
{
MvxAndroidLog.Instance.Warn("Failed to find fragment id {0} in {1}", resourceId, activity.GetType().Name);
return default(TFragment);
}
return SafeCast<TFragment>(fragment);
}
public static TFragment FindFragmentByTag<TFragment>(this MvxFragmentActivity activity, string tag)
where TFragment : Fragment
{
var fragment = activity.SupportFragmentManager.FindFragmentByTag(tag);
if (fragment == null)
{
MvxAndroidLog.Instance.Warn("Failed to find fragment tag {0} in {1}", tag, activity.GetType().Name);
return default(TFragment);
}
return SafeCast<TFragment>(fragment);
}
private static TFragment SafeCast<TFragment>(Fragment fragment) where TFragment : Fragment
{
if (!(fragment is TFragment))
{
MvxAndroidLog.Instance.Warn("Fragment type mismatch got {0} but expected {1}", fragment.GetType().FullName,
typeof(TFragment).FullName);
return default(TFragment);
}
return (TFragment)fragment;
}
public static void LoadViewModelFrom(this IMvxFragmentView view, MvxViewModelRequest request, IMvxBundle savedState = null)
{
var loader = Mvx.Resolve<IMvxViewModelLoader>();
var viewModel = loader.LoadViewModel(request, savedState);
if (viewModel == null)
{
MvxAndroidLog.Instance.Warn("ViewModel not loaded for {0}", request.ViewModelType.FullName);
return;
}
view.ViewModel = viewModel;
}
}
}

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

@ -9,7 +9,7 @@ using Android.OS;
using Android.Runtime;
using Android.Support.V7.App;
using MvvmCross.Base;
using MvvmCross.Platform.Android.Base.Views;
using MvvmCross.Platform.Android.Views.Base;
namespace MvvmCross.Droid.Support.V7.AppCompat.EventSource
{
@ -127,4 +127,4 @@ namespace MvvmCross.Droid.Support.V7.AppCompat.EventSource
public event EventHandler<MvxValueEventArgs<MvxActivityResultParameters>> ActivityResultCalled;
}
}
}

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

@ -18,8 +18,8 @@ using MvvmCross.Logging;
using MvvmCross.Platform.Android.Presenters;
using MvvmCross.Platform.Android.Presenters.Attributes;
using MvvmCross.Platform.Android.Views;
using MvvmCross.Presenters;
using MvvmCross.ViewModels;
using MvvmCross.Views;
namespace MvvmCross.Droid.Support.V7.AppCompat
{

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

@ -6,7 +6,7 @@ using System;
using System.Reflection;
using MvvmCross.Binding;
using MvvmCross.Droid.Support.V7.AppCompat.Widget;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Platform.Android.WeakSubscription;
using MvvmCross.Platform.Android.Binding.Target;
namespace MvvmCross.Droid.Support.V7.AppCompat.Target

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

@ -6,7 +6,7 @@ using System;
using System.Reflection;
using MvvmCross.Binding;
using MvvmCross.Droid.Support.V7.AppCompat.Widget;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Platform.Android.WeakSubscription;
using MvvmCross.Platform.Android.Binding.Target;
namespace MvvmCross.Droid.Support.V7.AppCompat.Target

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

@ -5,7 +5,7 @@
using System;
using Android.Support.V7.Widget;
using MvvmCross.Binding;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Platform.Android.WeakSubscription;
using MvvmCross.Platform.Android.Binding.Target;
namespace MvvmCross.Droid.Support.V7.AppCompat.Target

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

@ -6,7 +6,7 @@ using System;
using Android.Widget;
using MvvmCross.Binding;
using MvvmCross.Droid.Support.V7.AppCompat.Widget;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Platform.Android.WeakSubscription;
using MvvmCross.Platform.Android.Binding.Target;
namespace MvvmCross.Droid.Support.V7.AppCompat.Target

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

@ -11,7 +11,7 @@ using Android.Runtime;
using Android.Views;
using MvvmCross.Binding;
using MvvmCross.Binding.Attributes;
using MvvmCross.Binding.ExtensionMethods;
using MvvmCross.Binding.Extensions;
using MvvmCross.Droid.Support.V7.RecyclerView.ItemTemplates;
using MvvmCross.Droid.Support.V7.RecyclerView.Model;
using MvvmCross.Exceptions;

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

@ -9,7 +9,7 @@ using Xamarin.Forms;
namespace MvvmCross.Forms.Bindings
{
public static class MvxBindablePropertyExtensionMethods
public static class MvxBindablePropertyExtensions
{
public static TypeConverter TypeConverter(this Type type)
{
@ -77,4 +77,4 @@ namespace MvvmCross.Forms.Bindings
return true;
}
}
}
}

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

@ -6,7 +6,7 @@ using System;
using System.ComponentModel;
using MvvmCross.Binding;
using MvvmCross.Binding.Bindings.Target;
using MvvmCross.Binding.ExtensionMethods;
using MvvmCross.Binding.Extensions;
using MvvmCross.WeakSubscription;
using Xamarin.Forms;

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

@ -12,12 +12,12 @@ using System.Reflection;
using MvvmCross.Forms.Core;
using MvvmCross.Forms.Platform.Android.Bindings;
using MvvmCross.Forms.Platform.Android.Views;
using MvvmCross.Platform.Android.Base.Platform;
using MvvmCross.Platform.Android.Core;
using MvvmCross.Platform.Android.Presenters;
using MvvmCross.Platform.Android.Views;
using MvvmCross.Plugin;
using MvvmCross.ViewModels;
using MvvmCross.Platform.Android;
namespace MvvmCross.Forms.Platform.Android.Core
{

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

@ -7,7 +7,7 @@ using Android.App;
using Android.Content;
using Android.OS;
using MvvmCross.Base;
using MvvmCross.Platform.Android.Base.Views;
using MvvmCross.Platform.Android.Views.Base;
using Xamarin.Forms.Platform.Android;
namespace MvvmCross.Forms.Platform.Android.Views.EventSource

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

@ -7,7 +7,7 @@ using Android.App;
using Android.Content;
using Android.OS;
using MvvmCross.Base;
using MvvmCross.Platform.Android.Base.Views;
using MvvmCross.Platform.Android.Views.Base;
using Xamarin.Forms.Platform.Android;
namespace MvvmCross.Forms.Platform.Android.Views.EventSource

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

@ -1,9 +1,9 @@
// 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;
using MvvmCross.Views;
using MvvmCross.Presenters;
namespace MvvmCross.Forms.Views.Attributes
{
@ -37,4 +37,4 @@ namespace MvvmCross.Forms.Views.Attributes
public string Icon { get; set; }
}
}
}

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

@ -1,11 +1,11 @@
// 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;
using MvvmCross.Forms.Core;
using MvvmCross.ViewModels;
using MvvmCross.Views;
using MvvmCross.Presenters;
using Xamarin.Forms;
namespace MvvmCross.Forms.Views

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

@ -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;
using MvvmCross.Forms.Core;
using MvvmCross.Views;
using MvvmCross.Presenters;
namespace MvvmCross.Forms.Views
{
@ -16,4 +16,4 @@ namespace MvvmCross.Forms.Views
bool ClosePlatformViews();
bool ShowPlatformHost(Type hostViewModel = null);
}
}
}

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

@ -10,9 +10,9 @@ using MvvmCross.Exceptions;
using MvvmCross.Forms.Core;
using MvvmCross.Forms.Views.Attributes;
using MvvmCross.Logging;
using MvvmCross.Presenters;
using MvvmCross.ViewModels;
using MvvmCross.ViewModels.Hints;
using MvvmCross.Views;
using Xamarin.Forms;
namespace MvvmCross.Forms.Views

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

@ -7,7 +7,7 @@ using Android.Content;
using Android.Hardware;
using MvvmCross.Base;
using MvvmCross.Exceptions;
using MvvmCross.Platform.Android.Base;
using MvvmCross.Platform.Android;
using Object = Java.Lang.Object;
namespace MvvmCross.Plugin.Accelerometer.Platform.Android

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

@ -9,7 +9,7 @@ using MvvmCross.Exceptions;
namespace MvvmCross.Plugin.Accelerometer.Platform.Uap
{
public class MvxWindowsCommonAccelerometer : IMvxAccelerometer
public class MvxWindowsAccelerometer : IMvxAccelerometer
{
private bool _started;
private Windows.Devices.Sensors.Accelerometer _accelerometer;

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

@ -8,7 +8,7 @@ namespace MvvmCross.Plugin.Accelerometer.Platform.Uap
{
public void Load()
{
Mvx.RegisterSingleton<IMvxAccelerometer>(new MvxWindowsCommonAccelerometer());
Mvx.RegisterSingleton<IMvxAccelerometer>(new MvxWindowsAccelerometer());
}
}
}

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

@ -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.Platform.Uap.Base.Platform;
using MvvmCross.Platform.Uap;
using MvvmCross.UI;
namespace MvvmCross.Plugin.Color.Platform.Uap

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

@ -7,7 +7,7 @@ using MvvmCross.UI;
namespace MvvmCross.Plugin.Color.Platform.Uap
{
public class MvxWindowsCommonColor : IMvxNativeColor
public class MvxWindowsColor : IMvxNativeColor
{
public object ToNative(MvxColor mvxColor)
{

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

@ -10,7 +10,7 @@ namespace MvvmCross.Plugin.Color.Platform.Uap
{
public void Load()
{
Mvx.RegisterSingleton<IMvxNativeColor>(new MvxWindowsCommonColor());
Mvx.RegisterSingleton<IMvxNativeColor>(new MvxWindowsColor());
}
}
}

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

@ -7,7 +7,7 @@ using System.Collections.Generic;
using System.Threading.Tasks;
using Android.Graphics;
using MvvmCross.Binding;
using MvvmCross.Platform.Android.Base;
using MvvmCross.Platform.Android;
using MvvmCross.Plugin.File;
using Uri = Android.Net.Uri;

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

@ -11,8 +11,8 @@ using Android.OS;
using Android.Text;
using Java.IO;
using Java.Lang;
using MvvmCross.Platform.Android.Base.Platform;
using MvvmCross.Platform.Android.Base.Views;
using MvvmCross.Platform.Android;
using MvvmCross.Platform.Android.Views.Base;
using File = Java.IO.File;
namespace MvvmCross.Plugin.Email.Platform.Android

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

@ -8,7 +8,7 @@ using System.Linq;
using Foundation;
using MessageUI;
using MvvmCross.Exceptions;
using MvvmCross.Platform.Ios.Base.Platform;
using MvvmCross.Platform.Ios;
using MvvmCross.Platform.Ios.Views;
using UIKit;

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

@ -4,7 +4,7 @@
using System;
using System.Reflection;
using MvvmCross.Binding.ExtensionMethods;
using MvvmCross.Binding.Extensions;
namespace MvvmCross.Plugin.FieldBinding
{

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

@ -3,7 +3,7 @@
// See the LICENSE file in the project root for more information.
using System;
using MvvmCross.Binding.ExtensionMethods;
using MvvmCross.Binding.Extensions;
namespace MvvmCross.Plugin.FieldBinding
{

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

@ -3,7 +3,7 @@
// See the LICENSE file in the project root for more information.
using MvvmCross.Exceptions;
using MvvmCross.Platform.Android.Base;
using MvvmCross.Platform.Android;
using MvvmCross.Plugin.File;
namespace MvvmCross.Plugin.File.Platform.Android

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

@ -10,12 +10,12 @@ using System.Threading.Tasks;
using Windows.Storage;
using MvvmCross.Exceptions;
using MvvmCross.Logging;
using MvvmCross.Platform.Uap.Base.Platform;
using MvvmCross.Platform.Uap;
namespace MvvmCross.Plugin.File.Platform.Uap
{
// note that we use the full WindowsStore name here deliberately to avoid 'Store' naming confusion
public class MvxWindowsCommonFileStore : MvxFileStoreBase
public class MvxWindowsFileStore : MvxFileStoreBase
{
public override Stream OpenRead(string path)
{

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

@ -9,8 +9,8 @@ namespace MvvmCross.Plugin.File.Platform.Uap
{
public void Load()
{
Mvx.RegisterType<IMvxFileStore, MvxWindowsCommonFileStore>();
Mvx.RegisterType<IMvxFileStoreAsync, MvxWindowsCommonFileStore>();
Mvx.RegisterType<IMvxFileStore, MvxWindowsFileStore>();
Mvx.RegisterType<IMvxFileStoreAsync, MvxWindowsFileStore>();
}
}
}

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

@ -7,8 +7,7 @@ using System.Threading;
using Android.Content;
using MvvmCross.Exceptions;
using MvvmCross.Logging;
using MvvmCross.Platform.Android.Base;
using MvvmCross.Platform.Android.Base.Platform;
using MvvmCross.Platform.Android;
namespace MvvmCross.Plugin.Location.Fused
{

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

@ -9,8 +9,7 @@ using Android.Locations;
using Android.OS;
using MvvmCross.Exceptions;
using MvvmCross.Logging;
using MvvmCross.Platform.Android.Base;
using MvvmCross.Platform.Android.Base.Platform;
using MvvmCross.Platform.Android;
namespace MvvmCross.Plugin.Location.Platform.Android
{

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

@ -7,8 +7,7 @@ using CoreLocation;
using Foundation;
using MvvmCross.Exceptions;
using MvvmCross.Logging;
using MvvmCross.Platform.Ios.Base;
using MvvmCross.Platform.Ios.Base.Platform;
using MvvmCross.Platform.Ios;
namespace MvvmCross.Plugin.Location.Platform.iOS
{

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

@ -57,8 +57,7 @@ namespace MvvmCross.Plugin.MethodBinding
protected MethodInfo FindMethodInfo(object source, string name)
{
var methodInfo = source.GetType()
.GetMethod(name);
var methodInfo = source.GetType().GetMethod(name);
return methodInfo;
}
}

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

@ -8,7 +8,7 @@ using Android.Net;
using Java.Net;
using MvvmCross.Exceptions;
using MvvmCross.Logging;
using MvvmCross.Platform.Android.Base;
using MvvmCross.Platform.Android;
using MvvmCross.Plugin.Network.Reachability;
namespace MvvmCross.Plugin.Network.Platform.Android

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

@ -7,7 +7,7 @@ using Android.Net;
using Android.OS;
using Android.Telephony;
using Java.Util;
using MvvmCross.Platform.Android.Base.Platform;
using MvvmCross.Platform.Android;
namespace MvvmCross.Plugin.PhoneCall.Platform.Android
{

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

@ -4,7 +4,7 @@
using System;
using Foundation;
using MvvmCross.Platform.Ios.Base.Platform;
using MvvmCross.Platform.Ios;
namespace MvvmCross.Plugin.PhoneCall.Platform.iOS
{

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

@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace MvvmCross.Plugin.PictureChooser
{
public static class MvxPictureChooserExtensionMethods
public static class MvxPictureChooserExtensions
{
public static Task<Stream> ChoosePictureFromLibraryAsync(this IMvxPictureChooserTask chooser, int maxPixelDimension, int percentQuality)
{

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

@ -11,9 +11,8 @@ using Android.Graphics;
using Android.Media;
using Android.Provider;
using MvvmCross.Exceptions;
using MvvmCross.Platform.Android.Base;
using MvvmCross.Platform.Android.Base.Platform;
using MvvmCross.Platform.Android.Base.Views;
using MvvmCross.Platform.Android;
using MvvmCross.Platform.Android.Views.Base;
using Path = System.IO.Path;
using Stream = System.IO.Stream;
using Uri = Android.Net.Uri;

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

@ -9,7 +9,7 @@ using System.Threading.Tasks;
using CoreGraphics;
using Foundation;
using MvvmCross.Logging;
using MvvmCross.Platform.Ios.Base.Platform;
using MvvmCross.Platform.Ios;
using MvvmCross.Platform.Ios.Views;
using UIKit;

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

@ -5,7 +5,7 @@
using System;
using System.IO;
using Android.Content.Res;
using MvvmCross.Platform.Android.Base;
using MvvmCross.Platform.Android;
namespace MvvmCross.Plugin.ResourceLoader.Platform.Android
{

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

@ -4,7 +4,7 @@
using System;
using System.IO;
using MvvmCross.Platform.Uap.Base.Platform;
using MvvmCross.Platform.Uap;
using Windows.ApplicationModel;
namespace MvvmCross.Plugin.ResourceLoader.Platform.Uap

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

@ -3,7 +3,7 @@
// See the LICENSE file in the project root for more information.
using Android.Content;
using MvvmCross.Platform.Android.Base.Platform;
using MvvmCross.Platform.Android;
namespace MvvmCross.Plugin.Share.Platform.Android
{

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

@ -3,7 +3,7 @@
// See the LICENSE file in the project root for more information.
using Foundation;
using MvvmCross.Platform.Ios.Base.Platform;
using MvvmCross.Platform.Ios;
using MvvmCross.Platform.Ios.Views;
using Twitter;
using UIKit;

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

@ -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.Views;
using MvvmCross.Presenters;
namespace MvvmCross.Plugin.Sidebar
{

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

@ -7,6 +7,7 @@ using MvvmCross.Platform.Ios.Presenters.Attributes;
using MvvmCross.Platform.Ios.Views;
using MvvmCross.Plugin.Sidebar.Extensions;
using MvvmCross.Plugin.Sidebar.Views;
using MvvmCross.Presenters;
using MvvmCross.ViewModels;
using MvvmCross.Views;
using UIKit;

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

@ -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.Platform.Uap.Base.Platform;
using MvvmCross.Platform.Uap;
using MvvmCross.UI;
namespace MvvmCross.Plugin.Visibility.Platform.Uap

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

@ -4,7 +4,7 @@
using Android.Content;
using Android.Net;
using MvvmCross.Platform.Android.Base.Platform;
using MvvmCross.Platform.Android;
namespace MvvmCross.Plugin.WebBrowser.Platform.Android
{

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

@ -3,7 +3,7 @@
// See the LICENSE file in the project root for more information.
using Foundation;
using MvvmCross.Platform.Mac.Base.Platform;
using MvvmCross.Platform.Mac;
namespace MvvmCross.Plugin.WebBrowser.Platform.Mac
{

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

@ -3,7 +3,7 @@
// See the LICENSE file in the project root for more information.
using Foundation;
using MvvmCross.Platform.Ios.Base.Platform;
using MvvmCross.Platform.Ios;
namespace MvvmCross.Plugin.WebBrowser.Platform.iOS
{

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

@ -6,7 +6,7 @@ using System;
namespace MvvmCross.Base
{
public static class MvxDelegateExtensionMethods
public static class MvxDelegateExtensions
{
public static void Raise(this EventHandler eventHandler, object sender)
{

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

@ -8,7 +8,7 @@ using System.Reflection;
namespace MvvmCross.Base
{
public static class MvxPropertyNameExtensionMethods
public static class MvxPropertyNameExtensions
{
private const string WrongExpressionMessage =
"Wrong expression\nshould be called with expression like\n() => PropertyName";

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

@ -1,13 +1,12 @@
// 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 MvvmCross.Exceptions;
namespace MvvmCross.Binding.Bindings
{
public static class MvxBindingModeExtensionMethods
public static class MvxBindingModeExtensions
{
public static MvxBindingMode IfDefault(this MvxBindingMode bindingMode, MvxBindingMode modeIfDefault)
{

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

@ -4,7 +4,7 @@
using System;
using System.Reflection;
using MvvmCross.Binding.ExtensionMethods;
using MvvmCross.Binding.Extensions;
using MvvmCross.Converters;
using MvvmCross.Exceptions;

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

@ -3,7 +3,7 @@
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using MvvmCross.Binding.ExtensionMethods;
using MvvmCross.Binding.Extensions;
namespace MvvmCross.Binding.Bindings.Target
{

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

@ -5,7 +5,7 @@
using System.Collections.Generic;
using System.Linq;
using MvvmCross.Binding.Bindings.SourceSteps;
using MvvmCross.Binding.ExtensionMethods;
using MvvmCross.Binding.Extensions;
using MvvmCross.Converters;
namespace MvvmCross.Binding.Combiners

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

@ -5,7 +5,7 @@
using System.Collections.Generic;
using System.Linq;
using MvvmCross.Binding.Bindings.SourceSteps;
using MvvmCross.Binding.ExtensionMethods;
using MvvmCross.Binding.Extensions;
using MvvmCross.Converters;
namespace MvvmCross.Binding.Combiners

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

@ -1,11 +1,11 @@
// 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.
namespace MvvmCross.Binding.ExtensionMethods
namespace MvvmCross.Binding.Extensions
{
public interface IMvxEditableTextView
{
string CurrentText { get; }
}
}
}

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

@ -1,4 +1,4 @@
// 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.
@ -7,7 +7,7 @@ using System.Globalization;
using MvvmCross.Base;
using MvvmCross.IoC;
namespace MvvmCross.Binding.ExtensionMethods
namespace MvvmCross.Binding.Extensions
{
public static class MvxBindingExtensions
{
@ -66,4 +66,4 @@ namespace MvvmCross.Binding.ExtensionMethods
return propertyType.MakeSafeValueCore(value);
}
}
}
}

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

@ -4,7 +4,7 @@
using System.Collections;
namespace MvvmCross.Binding.ExtensionMethods
namespace MvvmCross.Binding.Extensions
{
public static class MvxEnumerableExtensions
{
@ -85,4 +85,4 @@ namespace MvvmCross.Binding.ExtensionMethods
return enumerator.Current;
}
}
}
}

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

@ -4,7 +4,7 @@
using System.Threading.Tasks;
namespace MvvmCross.ViewModels
namespace MvvmCross.Commands
{
public interface IMvxAsyncCommand : IMvxCommand
{
@ -17,4 +17,4 @@ namespace MvvmCross.ViewModels
Task ExecuteAsync(T parameter);
void Cancel();
}
}
}

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

@ -5,7 +5,7 @@
using System;
using System.Windows.Input;
namespace MvvmCross.ViewModels
namespace MvvmCross.Commands
{
public interface IMvxCommand : ICommand
{
@ -28,4 +28,4 @@ namespace MvvmCross.ViewModels
bool CanExecute(T parameter);
}
}
}

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

@ -2,10 +2,10 @@
// The .NET Foundation licenses this file to you under the MS-PL license.
// See the LICENSE file in the project root for more information.
namespace MvvmCross.ViewModels
namespace MvvmCross.Commands
{
public interface IMvxCommandCollection
{
IMvxCommand this[string name] { get; }
}
}
}

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

@ -2,10 +2,10 @@
// The .NET Foundation licenses this file to you under the MS-PL license.
// See the LICENSE file in the project root for more information.
namespace MvvmCross.ViewModels
namespace MvvmCross.Commands
{
public interface IMvxCommandCollectionBuilder
{
IMvxCommandCollection BuildCollectionFor(object owner);
}
}
}

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

@ -8,7 +8,7 @@ using System.Threading.Tasks;
using MvvmCross.Base;
using MvvmCross.Logging;
namespace MvvmCross.ViewModels
namespace MvvmCross.Commands
{
public abstract class MvxAsyncCommandBase
: MvxCommandBase

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

@ -6,7 +6,7 @@ using System;
using System.Collections.Generic;
using MvvmCross.Base;
namespace MvvmCross.ViewModels
namespace MvvmCross.Commands
{
public interface IMvxCommandHelper
{
@ -219,4 +219,4 @@ namespace MvvmCross.ViewModels
_execute(parameter);
}
}
}
}

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

@ -4,7 +4,7 @@
using System;
namespace MvvmCross.ViewModels
namespace MvvmCross.Commands
{
[AttributeUsage(AttributeTargets.Method)]
public class MvxCommandAttribute : Attribute
@ -18,4 +18,4 @@ namespace MvvmCross.ViewModels
public string CommandName { get; set; }
public string CanExecutePropertyName { get; set; }
}
}
}

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

@ -7,7 +7,7 @@ using System.ComponentModel;
using System.Linq;
using MvvmCross.Logging;
namespace MvvmCross.ViewModels
namespace MvvmCross.Commands
{
public class MvxCommandCollection
: IMvxCommandCollection
@ -115,4 +115,4 @@ namespace MvvmCross.ViewModels
}
}
}
}
}

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

@ -7,7 +7,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace MvvmCross.ViewModels
namespace MvvmCross.Commands
{
public class MvxCommandCollectionBuilder
: IMvxCommandCollectionBuilder
@ -218,4 +218,4 @@ namespace MvvmCross.ViewModels
#endregion Nested classes for building commands by reflection - 'hidden as nested' currently as they are not used anywhere else
}
}
}

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

@ -7,6 +7,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using MvvmCross.Base;
using MvvmCross.Commands;
using MvvmCross.Exceptions;
using MvvmCross.IoC;
using MvvmCross.Logging;

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

@ -1,4 +1,4 @@
// 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.
@ -14,7 +14,7 @@ using MvvmCross.ViewModels;
namespace MvvmCross.Core
{
public static class MvxSimplePropertyDictionaryExtensionMethods
public static class MvxSimplePropertyDictionaryExtensions
{
public static IDictionary<string, string> ToSimpleStringPropertyDictionary(
this IDictionary<string, object> input)
@ -167,4 +167,4 @@ namespace MvvmCross.Core
}
}
}
}
}

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

@ -6,7 +6,7 @@ using System;
namespace MvvmCross.Exceptions
{
public static class MvxExceptionExtensionMethods
public static class MvxExceptionExtensions
{
public static string ToLongString(this Exception exception)
{

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

@ -8,7 +8,7 @@ using System.Reflection;
namespace MvvmCross.IoC
{
public static class MvxConventionAttributeExtensionMethods
public static class MvxConventionAttributeExtensions
{
/// <summary>
/// A type is conventional if and only it is:

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

@ -174,7 +174,7 @@ namespace MvvmCross
};
CallbackWhenRegistered<T>(simpleAction);
}
public static void CallbackWhenRegistered<T>(Action action)
{
var ioc = MvxSingleton<IMvxIoCProvider>.Instance;

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

@ -1,4 +1,4 @@
// 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.
@ -189,6 +189,6 @@ namespace MvvmCross.Navigation
/// </summary>
/// <param name="hint"></param>
/// <returns></returns>
bool ChangePresentation(MvxPresentationHint hint);
Task<bool> ChangePresentation(MvxPresentationHint hint);
}
}
}

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

@ -16,6 +16,7 @@ using MvvmCross.Exceptions;
using MvvmCross.Logging;
using MvvmCross.Navigation.EventArguments;
using MvvmCross.ViewModels;
using MvvmCross.ViewModels.Hints;
using MvvmCross.Views;
namespace MvvmCross.Navigation
@ -61,7 +62,7 @@ namespace MvvmCross.Navigation
}
}
protected bool TryGetRoute(string url, out KeyValuePair<Regex, Type> entry)
protected virtual bool TryGetRoute(string url, out KeyValuePair<Regex, Type> entry)
{
try
{
@ -101,7 +102,7 @@ namespace MvvmCross.Navigation
}
}
protected IDictionary<string, string> BuildParamDictionary(Regex regex, Match match)
protected virtual IDictionary<string, string> BuildParamDictionary(Regex regex, Match match)
{
var paramDict = new Dictionary<string, string>();
@ -427,7 +428,7 @@ namespace MvvmCross.Navigation
return await Navigate<TParameter, TResult>(request, viewModel, param, presentationBundle, cancellationToken).ConfigureAwait(false);
}
public bool ChangePresentation(MvxPresentationHint hint)
public virtual Task<bool> ChangePresentation(MvxPresentationHint hint)
{
MvxLog.Instance.Trace("Requesting presentation change");
var args = new ChangePresentationEventArgs(hint);
@ -438,7 +439,7 @@ namespace MvvmCross.Navigation
args.Result = result;
OnAfterChangePresentation(this, args);
return result;
return Task.FromResult(result);
}
public virtual Task<bool> Close(IMvxViewModel viewModel)

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

@ -4,7 +4,6 @@
using System;
using MvvmCross.Exceptions;
using MvvmCross.Platform.Android.Base;
namespace MvvmCross.Platform.Android.Binding.ResourceHelpers
{

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

@ -5,7 +5,7 @@
using System;
using Android.Widget;
using MvvmCross.Binding;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Platform.Android.WeakSubscription;
namespace MvvmCross.Platform.Android.Binding.Target
{

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

@ -6,7 +6,6 @@ using System;
using Android.Runtime;
using MvvmCross.Binding;
using MvvmCross.Binding.Bindings.Target;
using MvvmCross.Platform.Android.Base;
namespace MvvmCross.Platform.Android.Binding.Target
{

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

@ -5,7 +5,7 @@
using System;
using System.Reflection;
using MvvmCross.Binding;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Platform.Android.WeakSubscription;
using MvvmCross.Platform.Android.Binding.Views;
namespace MvvmCross.Platform.Android.Binding.Target

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

@ -5,7 +5,7 @@
using System;
using System.Reflection;
using MvvmCross.Binding;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Platform.Android.WeakSubscription;
using MvvmCross.Platform.Android.Binding.Views;
namespace MvvmCross.Platform.Android.Binding.Target

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

@ -6,7 +6,7 @@ using System;
using System.Reflection;
using Android.Widget;
using MvvmCross.Binding;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Platform.Android.WeakSubscription;
namespace MvvmCross.Platform.Android.Binding.Target
{

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

@ -5,7 +5,7 @@
using System;
using Android.Widget;
using MvvmCross.Binding;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Platform.Android.WeakSubscription;
using MvvmCross.Platform.Android.Binding.Views;
namespace MvvmCross.Platform.Android.Binding.Target

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

@ -5,7 +5,7 @@
using System;
using Android.Widget;
using MvvmCross.Binding;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Platform.Android.WeakSubscription;
using MvvmCross.Platform.Android.Binding.Views;
namespace MvvmCross.Platform.Android.Binding.Target

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

@ -6,7 +6,7 @@ using System;
using Android.Preferences;
using MvvmCross.Logging;
using MvvmCross.Binding;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Platform.Android.WeakSubscription;
namespace MvvmCross.Platform.Android.Binding.Target
{

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

@ -6,7 +6,7 @@ using System;
using Android.Views;
using Android.Widget;
using MvvmCross.Binding;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Platform.Android.WeakSubscription;
using MvvmCross.Platform.Android.Binding.Views;
namespace MvvmCross.Platform.Android.Binding.Target

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

@ -5,7 +5,7 @@
using System;
using Android.Widget;
using MvvmCross.Binding;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Platform.Android.WeakSubscription;
namespace MvvmCross.Platform.Android.Binding.Target
{

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

@ -5,7 +5,7 @@
using System;
using Android.Widget;
using MvvmCross.Binding;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Platform.Android.WeakSubscription;
namespace MvvmCross.Platform.Android.Binding.Target
{

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

@ -5,7 +5,7 @@
using System;
using Android.Widget;
using MvvmCross.Binding;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Platform.Android.WeakSubscription;
using MvvmCross.Platform.Android.Binding.Views;
namespace MvvmCross.Platform.Android.Binding.Target

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

@ -6,7 +6,7 @@ using System;
using Android.Views;
using Android.Widget;
using MvvmCross.Binding;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Platform.Android.WeakSubscription;
namespace MvvmCross.Platform.Android.Binding.Target
{

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

@ -6,8 +6,8 @@ using System;
using Android.Text;
using Android.Widget;
using MvvmCross.Binding;
using MvvmCross.Binding.ExtensionMethods;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Binding.Extensions;
using MvvmCross.Platform.Android.WeakSubscription;
namespace MvvmCross.Platform.Android.Binding.Target
{

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

@ -6,8 +6,8 @@ using System;
using Android.Text;
using Android.Widget;
using MvvmCross.Binding;
using MvvmCross.Binding.ExtensionMethods;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Binding.Extensions;
using MvvmCross.Platform.Android.WeakSubscription;
namespace MvvmCross.Platform.Android.Binding.Target
{

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

@ -3,7 +3,7 @@
// See the LICENSE file in the project root for more information.
using Android.Views;
using MvvmCross.Binding.ExtensionMethods;
using MvvmCross.Binding.Extensions;
namespace MvvmCross.Platform.Android.Binding.Target
{

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

@ -6,7 +6,7 @@ using System;
using System.Windows.Input;
using Android.Views;
using MvvmCross.Binding;
using MvvmCross.Platform.Android.Base.WeakSubscription;
using MvvmCross.Platform.Android.WeakSubscription;
namespace MvvmCross.Platform.Android.Binding.Target
{

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше