/// <summary> /// Gets a resource, given its URI. /// </summary> /// <param name="Uri">Uniform resource identifier.</param> /// <param name="Headers">Optional headers. Interpreted in accordance with the corresponding URI scheme.</param> /// <returns>Object.</returns> public static Task <object> GetAsync(Uri Uri, params KeyValuePair <string, string>[] Headers) { if (!CanGet(Uri, out Grade _, out IContentGetter Getter)) { throw new ArgumentException("URI Scheme not recognized: " + Uri.Scheme, nameof(Uri)); } return(Getter.GetAsync(Uri, Headers)); }
async UniTask <T> IKeyValueStore.Get <T>(string key, T defaultValue, Func <string, T> deserializeCallback, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); return(await Getter.GetAsync(key, defaultValue, deserializeCallback, cancellationToken)); }