complete account page
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
using System;
|
||||
using Xamarin.Essentials;
|
||||
|
||||
namespace Billing
|
||||
{
|
||||
internal static class Helper
|
||||
{
|
||||
#if DEBUG
|
||||
public static void Debug(string message)
|
||||
{
|
||||
var time = DateTime.Now.ToString("HH:mm:ss.fff");
|
||||
@@ -20,5 +22,36 @@ namespace Billing
|
||||
var time = DateTime.Now.ToString("HH:mm:ss.fff");
|
||||
System.Diagnostics.Debug.Fail($"[{time}] - {category}", message);
|
||||
}
|
||||
#else
|
||||
#pragma warning disable IDE0060 // Remove unused parameter
|
||||
public static void Debug(string message)
|
||||
{
|
||||
}
|
||||
|
||||
public static void Error(string category, Exception ex)
|
||||
{
|
||||
}
|
||||
|
||||
public static void Error(string category, string message)
|
||||
{
|
||||
}
|
||||
#pragma warning restore IDE0060 // Remove unused parameter
|
||||
#endif
|
||||
|
||||
public static bool NetworkAvailable
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
return Connectivity.NetworkAccess == NetworkAccess.Internet
|
||||
|| Connectivity.NetworkAccess == NetworkAccess.ConstrainedInternet;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user