public static async Task<dynamic> hiveWaitUntilGet(this ChromeSession s, string key, int timeout) { dynamic result = null; if (await asyncSpinlock.WaitUntil(async () => { try { result = await s.EvalObject(string.Format(hiveGetString, key)); return true; } catch (Exception) { return false; } }, timeout)) { return result; } throw new TimeoutException("The desired response was not ready."); }
public static async Task<dynamic> hiveSet(this ChromeSession s, string key, object value) { return await s.EvalObject(string.Format(hiveSetString, key, Newtonsoft.Json.JsonConvert.SerializeObject(value))); }
public static async Task hiveRemove(this ChromeSession s, string key) { await s.EvalObject(string.Format(hiveRemoveString, key)); }