Class TrackScreenshotService
Contains logic to build links for the screenshots available of tracks.
Inherited Members
Namespace: Aydsko.iRacingData.Tracks
Assembly: Aydsko.iRacingData.dll
Syntax
[Obsolete("Use one of \"GetTrackAssetScreenshotUris\" or \"GetTrackAssetScreenshotUrisAsync\" on \"IDataService\".")]
public class TrackScreenshotService
Constructors
TrackScreenshotService(IDataClient)
Create a new instance of the screenshot URL creation service.
Declaration
public TrackScreenshotService(IDataClient dataClient)
Parameters
Type | Name | Description |
---|---|---|
IDataClient | dataClient | A configured iRacing Data API client implementation. |
Methods
GetScreenshotLinks(Track, TrackAssets)
Create a list of links to JPEG images which show the given track.
Declaration
public static IEnumerable<Uri> GetScreenshotLinks(Track track, TrackAssets trackAssets)
Parameters
Type | Name | Description |
---|---|---|
Track | track | Information about the track. |
TrackAssets | trackAssets | Information about the track's assets. |
Returns
Type | Description |
---|---|
IEnumerable<Uri> | A series of Uri objects containing links that will resolve to JPEG images of the track. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Either parameter is null. |
ArgumentException |
GetScreenshotLinksAsync(Track, CancellationToken)
Create a list of links to JPEG images which show the given track.
Declaration
public Task<IEnumerable<Uri>> GetScreenshotLinksAsync(Track track, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Track | track | The track information for which the screenshot links should be generated. |
CancellationToken | cancellationToken | A token to allow the operation to be cancelled. |
Returns
Type | Description |
---|---|
Task<IEnumerable<Uri>> | A Task that resolves to a series of Uri objects containing links to JPEG images of the track. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
GetScreenshotLinksAsync(TrackAssets, CancellationToken)
Create a list of links to JPEG images which show the given track.
Declaration
public Task<IEnumerable<Uri>> GetScreenshotLinksAsync(TrackAssets trackAssets, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
TrackAssets | trackAssets | The track asset information for which the screenshot links should be generated. |
CancellationToken | cancellationToken | A token to allow the operation to be cancelled. |
Returns
Type | Description |
---|---|
Task<IEnumerable<Uri>> | A Task that resolves to a series of Uri objects containing links to JPEG images of the track. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
GetScreenshotLinksAsync(int, CancellationToken)
Create a list of links to JPEG images which show the given track.
Declaration
public Task<IEnumerable<Uri>> GetScreenshotLinksAsync(int trackId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | trackId | The unique identifier of the track for which the screenshot links should be generated. |
CancellationToken | cancellationToken | A token to allow the operation to be cancelled. |
Returns
Type | Description |
---|---|
Task<IEnumerable<Uri>> | A Task that resolves to a series of Uri objects containing links to JPEG images of the track. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | The |