Class ImageExtensions
- Namespace
- TcgDex.Models
- Assembly
- TcgDex.CSharpSdk.dll
Image URL helpers for the types that carry artwork.
public static class ImageExtensionsInheritance
Inherited Members
Methods
GetImageUrl(Card, ImageQuality, ImageFormat)
Builds the URL for this card's artwork.
public static Uri? GetImageUrl(this Card card, ImageQuality quality = ImageQuality.High, ImageFormat format = ImageFormat.Png)Parameters
cardCard-
The card.
qualityImageQuality-
The resolution to request.
formatImageFormat-
The file format to request.
Returns
Exceptions
- ArgumentNullException
-
cardis null.
GetImageUrl(CardBrief, ImageQuality, ImageFormat)
Builds the URL for this card's artwork.
public static Uri? GetImageUrl(this CardBrief card, ImageQuality quality = ImageQuality.High, ImageFormat format = ImageFormat.Png)Parameters
cardCardBrief-
The card brief.
qualityImageQuality-
The resolution to request.
formatImageFormat-
The file format to request.
Returns
Exceptions
- ArgumentNullException
-
cardis null.
GetLogoUrl(CardSetBrief, ImageFormat)
Builds the URL for this set's logo.
public static Uri? GetLogoUrl(this CardSetBrief set, ImageFormat format = ImageFormat.Png)Parameters
setCardSetBrief-
The set.
formatImageFormat-
The file format to request.
Returns
Remarks
Takes no quality: logos are served at a single resolution, unlike card artwork.
Exceptions
- ArgumentNullException
-
setis null.
GetLogoUrl(CardSet, ImageFormat)
Builds the URL for this set's logo.
public static Uri? GetLogoUrl(this CardSet set, ImageFormat format = ImageFormat.Png)Parameters
setCardSet-
The set.
formatImageFormat-
The file format to request.
Returns
Exceptions
- ArgumentNullException
-
setis null.
GetSymbolUrl(CardSetBrief, ImageFormat)
Builds the URL for this set's symbol.
public static Uri? GetSymbolUrl(this CardSetBrief set, ImageFormat format = ImageFormat.Png)Parameters
setCardSetBrief-
The set.
formatImageFormat-
The file format to request.
Returns
Remarks
Takes no quality, and is served language-neutral rather than from the requested language's path.
Exceptions
- ArgumentNullException
-
setis null.
GetSymbolUrl(CardSet, ImageFormat)
Builds the URL for this set's symbol.
public static Uri? GetSymbolUrl(this CardSet set, ImageFormat format = ImageFormat.Png)Parameters
setCardSet-
The set.
formatImageFormat-
The file format to request.
Returns
Exceptions
- ArgumentNullException
-
setis null.