Aydsko iRacing Data API
Show / Hide Table of Contents

Class TrackScreenshotService

Contains logic to build links for the screenshots available of tracks.

Inheritance
object
TrackScreenshotService
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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
  • The TrackId and TrackId properties do not contain the same value.
  • The TrackMap value is null or whitespace.

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 track was passed as null.

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 trackAssets was passed as null.

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 trackId value given could not be resolved to a valid track.

In this article
Back to top Generated by DocFX