From e6d5186c8acbf37b877c7ca3c77a378352a3743d Mon Sep 17 00:00:00 2001 From: kingces95 Date: Tue, 7 Mar 2017 14:56:24 -0500 Subject: Remove InternalsVisibleTo from Core to XF.Platforms.* (#782) * Remove InternalsVisibleTo from Core to XF.Platforms.* * Changes per Jason's code review * Move LockableObservableListWrapper to internals namespace * Changes per Stephane's code review * update docs * Touch code to get CI to run tests * Rebase; Update documentation --- Xamarin.Forms.Core/Application.cs | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'Xamarin.Forms.Core/Application.cs') diff --git a/Xamarin.Forms.Core/Application.cs b/Xamarin.Forms.Core/Application.cs index e089cf88..38333bf7 100644 --- a/Xamarin.Forms.Core/Application.cs +++ b/Xamarin.Forms.Core/Application.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; - +using System.ComponentModel; using System.Threading.Tasks; +using Xamarin.Forms.Internals; using Xamarin.Forms.Platform; namespace Xamarin.Forms @@ -29,7 +30,7 @@ namespace Xamarin.Forms if (f) Loader.Load(); NavigationProxy = new NavigationImpl(this); - Current = this; + SetCurrentApplication(this); SystemResources = DependencyService.Get().GetSystemResources(); SystemResources.ValuesChanged += OnParentResourcesChanged; @@ -48,10 +49,13 @@ namespace Xamarin.Forms } } + [EditorBrowsable(EditorBrowsableState.Never)] + public static void SetCurrentApplication(Application value) => Current = value; + public static Application Current { get { return s_current; } - internal set + set { if (s_current == value) return; @@ -109,9 +113,11 @@ namespace Xamarin.Forms get { return _logicalChildren ?? (_logicalChildren = new ReadOnlyCollection(InternalChildren)); } } - internal NavigationProxy NavigationProxy { get; } + [EditorBrowsable(EditorBrowsableState.Never)] + public NavigationProxy NavigationProxy { get; } - internal int PanGestureId { get; set; } + [EditorBrowsable(EditorBrowsableState.Never)] + public int PanGestureId { get; set; } internal IResourceDictionary SystemResources { get; } @@ -182,12 +188,14 @@ namespace Xamarin.Forms { } - internal static void ClearCurrent() + [EditorBrowsable(EditorBrowsableState.Never)] + public static void ClearCurrent() { s_current = null; } - internal static bool IsApplicationOrNull(Element element) + [EditorBrowsable(EditorBrowsableState.Never)] + public static bool IsApplicationOrNull(Element element) { return element == null || element is Application; } @@ -214,24 +222,28 @@ namespace Xamarin.Forms internal event EventHandler PopCanceled; - internal void SendOnAppLinkRequestReceived(Uri uri) + [EditorBrowsable(EditorBrowsableState.Never)] + public void SendOnAppLinkRequestReceived(Uri uri) { OnAppLinkRequestReceived(uri); } - internal void SendResume() + [EditorBrowsable(EditorBrowsableState.Never)] + public void SendResume() { s_current = this; OnResume(); } - internal Task SendSleepAsync() + [EditorBrowsable(EditorBrowsableState.Never)] + public Task SendSleepAsync() { OnSleep(); return SavePropertiesAsync(); } - internal void SendStart() + [EditorBrowsable(EditorBrowsableState.Never)] + public void SendStart() { OnStart(); } -- cgit v1.2.3