C# 클래스 CSharpAnalytics.Network.BackgroundHttpRequester

Responsible for requesting a queue of URIs over HTTP or HTTPS in background.
상속: IDisposable
파일 보기 프로젝트 열기: TechSmith/CSharpAnalytics 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
NetworkRetryWaitMax System.TimeSpan
NetworkRetryWaitStep System.TimeSpan

Private Properties

프로퍼티 타입 설명
Dispose void
GetNextQueueEntry bool
RequestLoop void
ShouldUsePostForRequest bool

공개 메소드들

메소드 설명
Add ( Uri uri ) : void

Add a URI to be requested to the queue.

Dispose ( ) : void
Start ( System.TimeSpan uploadInterval, IEnumerable previouslyUnrequested = null ) : void

Start the BackgroundHttpRequester with a given upload interval and a list of previously unrequested URIs.

StopAsync ( ) : Task>

Stop the BackgroundHttpRequester and return a list of URIs that were not requested.

보호된 메소드들

메소드 설명
GetInnermostException ( Exception ex ) : Exception

Obtain the innermost Exception from within an Exception.

RequestWithFailureRetry ( Uri requestUri, CancellationToken cancellationToken ) : void

Request the URI retrying as appropriate if a failure occurs.

WaitBetweenFailedRequests ( System.TimeSpan &previousRetryDelay ) : void

Delay for a period of time between failed network requests.

비공개 메소드들

메소드 설명
Dispose ( bool isDisposing ) : void
GetNextQueueEntry ( Uri &entry ) : bool

Get the next entry from the queue.

RequestLoop ( ) : void

Loop that keeps requesting URIs in the queue until there are none left, then sleeps.

ShouldUsePostForRequest ( Uri requestUri ) : bool

Whether a URI request is too long to be sent as a GET and instead the query parameters should be sent as the body of a POST instead.

메소드 상세

Add() 공개 메소드

Add a URI to be requested to the queue.
public Add ( Uri uri ) : void
uri System.Uri URI to be requested.
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

GetInnermostException() 보호된 정적인 메소드

Obtain the innermost Exception from within an Exception.
protected static GetInnermostException ( Exception ex ) : Exception
ex System.Exception Exception to obtain the innermost exception from.
리턴 System.Exception

RequestWithFailureRetry() 보호된 추상적인 메소드

Request the URI retrying as appropriate if a failure occurs.
protected abstract RequestWithFailureRetry ( Uri requestUri, CancellationToken cancellationToken ) : void
requestUri System.Uri URI to requqest.
cancellationToken System.Threading.CancellationToken
리턴 void

Start() 공개 메소드

Start the BackgroundHttpRequester with a given upload interval and a list of previously unrequested URIs.
public Start ( System.TimeSpan uploadInterval, IEnumerable previouslyUnrequested = null ) : void
uploadInterval System.TimeSpan How often to send the contents of the queue.
previouslyUnrequested IEnumerable List of previously unrequested URIs obtained last time the requester was stopped.
리턴 void

StopAsync() 공개 메소드

Stop the BackgroundHttpRequester and return a list of URIs that were not requested.
public StopAsync ( ) : Task>
리턴 Task>

WaitBetweenFailedRequests() 보호된 메소드

Delay for a period of time between failed network requests.
protected WaitBetweenFailedRequests ( System.TimeSpan &previousRetryDelay ) : void
previousRetryDelay System.TimeSpan Previous retry delay value to base delay on.
리턴 void

프로퍼티 상세

NetworkRetryWaitMax 보호되어 있는 정적으로 프로퍼티

protected static TimeSpan,System NetworkRetryWaitMax
리턴 System.TimeSpan

NetworkRetryWaitStep 보호되어 있는 정적으로 프로퍼티

protected static TimeSpan,System NetworkRetryWaitStep
리턴 System.TimeSpan