Aydsko iRacing Data API
Show / Hide Table of Contents

Class LegacyUsernamePasswordApiClient

Inheritance
object
LegacyUsernamePasswordApiClient
Implements
IAuthenticatingHttpClient
IDisposable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Aydsko.iRacingData
Assembly: Aydsko.iRacingData.dll
Syntax
public class LegacyUsernamePasswordApiClient : IAuthenticatingHttpClient, IDisposable

Constructors

LegacyUsernamePasswordApiClient(HttpClient, iRacingDataClientOptions, CookieContainer, ILogger<LegacyUsernamePasswordApiClient>)

Declaration
public LegacyUsernamePasswordApiClient(HttpClient httpClient, iRacingDataClientOptions options, CookieContainer cookieContainer, ILogger<LegacyUsernamePasswordApiClient> logger)
Parameters
Type Name Description
HttpClient httpClient
iRacingDataClientOptions options
CookieContainer cookieContainer
ILogger<LegacyUsernamePasswordApiClient> logger

Fields

isLoggedIn

Declaration
protected bool isLoggedIn
Field Value
Type Description
bool

Methods

ClearLoggedInState()

Declaration
public void ClearLoggedInState()

Dispose()

Declaration
public void Dispose()

Dispose(bool)

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
bool disposing

EnsureLoggedInAsync(CancellationToken)

Will ensure the client is authenticated by checking the isLoggedIn property and executing the login process if required.

Declaration
protected Task EnsureLoggedInAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken

A token to allow the operation to be cancelled.

Returns
Type Description
Task

A Task that resolves when the process is complete.

SendAsync(HttpRequestMessage, HttpCompletionOption, CancellationToken)

Declaration
public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead, CancellationToken cancellationToken = default)
Parameters
Type Name Description
HttpRequestMessage request
HttpCompletionOption completionOption
CancellationToken cancellationToken
Returns
Type Description
Task<HttpResponseMessage>

SendAuthenticatedRequestAsync(HttpRequestMessage, HttpCompletionOption, CancellationToken)

Declaration
public Task<HttpResponseMessage> SendAuthenticatedRequestAsync(HttpRequestMessage request, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead, CancellationToken cancellationToken = default)
Parameters
Type Name Description
HttpRequestMessage request
HttpCompletionOption completionOption
CancellationToken cancellationToken
Returns
Type Description
Task<HttpResponseMessage>

UseUsernameAndPassword(string, string, bool)

Declaration
[Obsolete("Configure via the \"AddIRacingDataApi\" extension method on the IServiceCollection which allows you to configure the \"iRacingDataClientOptions\".")]
public void UseUsernameAndPassword(string username, string password, bool passwordIsEncoded)
Parameters
Type Name Description
string username
string password
bool passwordIsEncoded

Implements

IAuthenticatingHttpClient
IDisposable
In this article
Back to top Generated by DocFX