JryVideo.Core.TheTVDB.TheTVDBClient.GetBannerByBannerPathAsync C# (CSharp) Méthode

GetBannerByBannerPathAsync() public méthode

public GetBannerByBannerPathAsync ( string banner ) : Task
banner string
Résultat Task
        public async Task<byte[]> GetBannerByBannerPathAsync(string banner)
        {
            var url = this.BuildBannerUrl(banner);
            var request = WebRequest.CreateHttp(url);
            var result = await request.GetResultAsBytesAsync();
            return result.IsSuccess ? result.Result : null;
        }

Usage Example

Exemple #1
0
 public async Task <byte[]> GetBannerAsync(TheTVDBClient client)
 {
     if (this.Image.IsNullOrWhiteSpace())
     {
         return(null);
     }
     return(await client.GetBannerByBannerPathAsync(this.Image));
 }
All Usage Examples Of JryVideo.Core.TheTVDB.TheTVDBClient::GetBannerByBannerPathAsync