Reachability.Reachability.IsNetworkAvailable C# (CSharp) 메소드

IsNetworkAvailable() 정적인 개인적인 메소드

static private IsNetworkAvailable ( NetworkReachabilityFlags &flags ) : bool
flags NetworkReachabilityFlags
리턴 bool
		static bool IsNetworkAvailable (out NetworkReachabilityFlags flags)
		{
			if (defaultRouteReachability == null) {
				var ipAddress = new IPAddress (0);
				defaultRouteReachability = new NetworkReachability (ipAddress.MapToIPv6 ());
				defaultRouteReachability.SetNotification (OnChange);
				defaultRouteReachability.Schedule (CFRunLoop.Current, CFRunLoop.ModeDefault);
			}
			return defaultRouteReachability.TryGetFlags (out flags) && IsReachableWithoutRequiringConnection (flags);
		}