private static bool TryDeserializeSettings(string value, out CookieSettings settings)
 {
     try
     {
         settings = JsonConvert.DeserializeObject <CookieSettings>(value);
         return(true);
     }
     catch (JsonException)
     {
         settings = default;
         return(false);
     }
 }
 private static string SerializeCookieSettings(CookieSettings settings) => JsonConvert.SerializeObject(settings);