summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/Application.cs
diff options
context:
space:
mode:
authorkingces95 <kingces95@users.noreply.github.com>2017-03-07 14:56:24 -0500
committerGitHub <noreply@github.com>2017-03-07 14:56:24 -0500
commite6d5186c8acbf37b877c7ca3c77a378352a3743d (patch)
treed61ca8ea619f7844e9e0a973dbd7bac794e39147 /Xamarin.Forms.Core/Application.cs
parent2b92142ab2a501de71d3572efc0e5deb2b7bae9a (diff)
downloadxamarin-forms-e6d5186c8acbf37b877c7ca3c77a378352a3743d.tar.gz
xamarin-forms-e6d5186c8acbf37b877c7ca3c77a378352a3743d.tar.bz2
xamarin-forms-e6d5186c8acbf37b877c7ca3c77a378352a3743d.zip
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
Diffstat (limited to 'Xamarin.Forms.Core/Application.cs')
-rw-r--r--Xamarin.Forms.Core/Application.cs34
1 files changed, 23 insertions, 11 deletions
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<ISystemResourcesProvider>().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<Element>(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();
}