public async Task FailPing() { var s = new PhonePimpSession(failEndpoint); await ThrowsExceptionAsync <ServerResponseException>(async() => { await s.PingAuth(); }); }
private async Task TestHttpExceptions() { var session = new PhonePimpSession(new MusicEndpoint("10.0.0.123", "secret")); try { Output = "Pinging..."; await session.Ping(); } catch (Exception e) { Output = "" + e.GetType() + ": " + e.Message; } }
private async Task GzipVsNoGzip(bool compression) { var s = new PhonePimpSession(testEndpoint, acceptCompression: compression); var duration = await Measured(async() => { await s.RootContentAsync(); }); string withOrWithout = null; if (compression) { withOrWithout = "with"; } else { withOrWithout = "without"; } Output = "Ran " + withOrWithout + " compression in " + duration + " ms."; }
public async Task LoadFolders() { var s = new PhonePimpSession(localEndpoint); var folders = await s.RootContentAsync(); }