/// <summary> /// Builds a ThumbnailFetcher that will fetch the thumbnail for the given asset /// and call the given callback when done. Building this object doesn't immediately /// start the fetch. To start, call Fetch(). /// </summary> /// <param name="asset">The asset to fetch the thumbnail for.</param> /// <param name="callback">The callback to call when done. Can be null.</param> public ThumbnailFetcher(PolyAsset asset, PolyFetchThumbnailOptions options, PolyApi.FetchThumbnailCallback callback) { this.asset = asset; this.options = options ?? new PolyFetchThumbnailOptions(); this.callback = callback; }
/// <summary> /// As documented in PolyApi.FetchThumbnails. /// </summary> public void FetchThumbnail(PolyAsset asset, PolyApi.FetchThumbnailCallback callback) { ThumbnailFetcher fetcher = new ThumbnailFetcher(asset, callback); // ThumbnailFetcher will handle fetching, converting and calling the callback. fetcher.Fetch(); }
/// <summary> /// Builds a ThumbnailFetcher that will fetch the thumbnail for the given asset /// and call the given callback when done. Building this object doesn't immediately /// start the fetch. To start, call Fetch(). /// </summary> /// <param name="asset">The asset to fetch the thumbnail for.</param> /// <param name="callback">The callback to call when done. Can be null.</param> public ThumbnailFetcher(PolyAsset asset, PolyApi.FetchThumbnailCallback callback) { this.asset = asset; this.callback = callback; }