MonoMobile.Views.Reachability.IsNetworkAvaialable C# (CSharp) Method

IsNetworkAvaialable() static private method

static private IsNetworkAvaialable ( NetworkReachabilityFlags &flags ) : bool
flags NetworkReachabilityFlags
return bool
		static bool IsNetworkAvaialable(out NetworkReachabilityFlags flags)
		{
			if (defaultRouteReachability == null)
			{
				defaultRouteReachability = new NetworkReachability(new IPAddress(0));
				defaultRouteReachability.SetCallback(OnChange);
				defaultRouteReachability.Schedule(CFRunLoop.Current, CFRunLoop.ModeDefault);
			}
			if (defaultRouteReachability.TryGetFlags(out flags))
			{
				return false;
			}
			return IsReachableWithoutRequiringConnection(flags);
		}