Code updated to 3.0.238

This commit is contained in:
Oliver Hauff 2021-06-26 20:57:55 +02:00
parent 3302d80678
commit 9c6a1fa92b
257 changed files with 7763 additions and 2861 deletions

View file

@ -34,6 +34,9 @@ namespace TINK.Model.Settings
/// <summary> Key of the logging level entry. </summary>
public const string MINLOGGINGLEVELKEY = "MinimumLoggingLevel";
/// <summary> Key of the logging level entry. </summary>
public const string ISREPORTLEVELVERBOSEKEY = "IsReportLevelVerbose";
/// <summary> Key of the center to ... entry. </summary>
public const string CENTERMAPTOCURRENTLOCATION = "CenterMapToCurrentLocation";
@ -273,6 +276,16 @@ namespace TINK.Model.Settings
return (LogEventLevel)int.Parse(JsonConvert.DeserializeObject<string>(l_strLevel));
}
/// <summary> Gets a value indicating whether report level is verbose or not.</summary>
/// <param name="settingsJSON">Dictionary to get value from.</param>
public static bool? GetIsReportLevelVerbose(Dictionary<string, string> settingsJSON) => GetNullableEntry<bool>(ISREPORTLEVELVERBOSEKEY, settingsJSON);
/// <summary> Sets a value indicating whether report level is verbose or not.</summary>
/// <param name="p_oSettingsJSON">Dictionary to get value from.</param>
public static Dictionary<string, string> SetIsReportLevelVerbose(this IDictionary<string, string> targetDictionary, bool isReportLevelVerbose)
=> SetEntry(isReportLevelVerbose, ISREPORTLEVELVERBOSEKEY, targetDictionary);
/// <summary> Sets the logging level.</summary>
/// <param name="p_oSettingsJSON">Dictionary to get logging level from.</param>
public static Dictionary<string, string> SetMinimumLoggingLevel(this IDictionary<string, string> p_oTargetDictionary, LogEventLevel p_oLevel)

View file

@ -15,6 +15,8 @@ namespace TINK.Model.Settings
{
public const LogEventLevel DEFAULTLOGGINLEVEL = LogEventLevel.Error;
public const bool DEFAULTREPOTLEVEL = false;
// Default value of the expires after entry. Controls the expiration time of the cache values.
private TimeSpan DEFAULTEXPIRESAFTER = TimeSpan.FromSeconds(1);
@ -24,6 +26,7 @@ namespace TINK.Model.Settings
/// <param name="activeUri"></param>
/// <param name="pollingParameters"></param>
/// <param name="minimumLogEventLevel">Minimum logging level to be applied.</param>
/// <param name="isReportLevelVerbose">True if logging level is verbose.</param>
/// <param name="expiresAfter">Holds the expires after value.</param>
/// <param name="activeLockService">Gets the name of the lock service to use.</param>
/// <param name="connectTimeout">Timeout to apply when connecting to bluetooth lock</param>
@ -34,6 +37,7 @@ namespace TINK.Model.Settings
Uri activeUri = null,
PollingParameters pollingParameters = null,
LogEventLevel? minimumLogEventLevel = null,
bool? isReportLevelVerbose = null,
TimeSpan? expiresAfter = null,
string activeLockService = null,
TimeSpan? connectTimeout = null,
@ -48,6 +52,7 @@ namespace TINK.Model.Settings
ActiveUri = GetActiveUri(activeUri);
PollingParameters = pollingParameters ?? PollingParameters.Default;
MinimumLogEventLevel = minimumLogEventLevel ?? DEFAULTLOGGINLEVEL;
IsReportLevelVerbose = isReportLevelVerbose ?? DEFAULTREPOTLEVEL;
ExpiresAfter = expiresAfter ?? DEFAULTEXPIRESAFTER;
ActiveLockService = activeLockService ?? LocksServicesContainerMutable.DefaultLocksservice;
ConnectTimeout = connectTimeout ?? new TimeSpan(0, 0, TimeOutProvider.DEFAULT_BLUETOOTHCONNECT_TIMEOUTSECONDS); // Try one sec. to connect.
@ -93,6 +98,9 @@ namespace TINK.Model.Settings
public string ActiveTheme { get; }
/// <summary> Gets a value indicating whether reporting level is verbose or not.</summary>
public bool IsReportLevelVerbose { get; }
public static Uri GetActiveUri(Uri activeUri) => activeUri ?? Services.CopriApi.ServerUris.CopriServerUriList.DefaultActiveUri;
public static bool GetCenterMapToCurrentLocation(Uri activeUri)