C# 클래스 Microsoft.HockeyApp.Channel.Sender

Fetch transmissions from the storage and sends it.
상속: IDisposable
파일 보기 프로젝트 열기: bitstadium/HockeySDK-Windows

보호된 프로퍼티들

프로퍼티 타입 설명
DelayHandler System.Threading.AutoResetEvent

Private Properties

프로퍼티 타입 설명
CalculateNextInterval System.TimeSpan
GetStatusCode int?
IsRetryable bool
LogInterval void
Sender System
StopAsync Task

공개 메소드들

메소드 설명
Dispose ( ) : void

Disposes the managed objects.

보호된 메소드들

메소드 설명
Send ( StorageTransmission transmission, System.TimeSpan &nextSendInterval ) : bool

Sends a transmission and handle errors.

SendLoop ( ) : void

Send transmissions in a loop.

비공개 메소드들

메소드 설명
CalculateNextInterval ( int httpStatusCode, System.TimeSpan currentSendInterval, System.TimeSpan maxInterval ) : System.TimeSpan

Calculates the next interval using exponential back-off algorithm (with the exceptions of few error codes that reset the interval to SendingInterval.

GetStatusCode ( WebException e ) : int?

Return the status code from the web exception or null if no such code exists.

IsRetryable ( int httpStatusCode, WebExceptionStatus webExceptionStatus ) : bool

Returns true if httpStatusCode or webExceptionStatus are retriable.

LogInterval ( System.TimeSpan prevSendInterval, System.TimeSpan nextSendInterval ) : void

Log next interval. Only log the interval when it changes by more then a minute. So if interval grow by 1 minute or decreased by 1 minute it will be logged. Logging every interval will just make the log noisy.

Sender ( BaseStorageService storage, PersistenceTransmitter transmitter, bool startSending = true ) : System

Initializes a new instance of the Sender class.

StopAsync ( ) : Task

Stops the sender.

메소드 상세

Dispose() 공개 메소드

Disposes the managed objects.
public Dispose ( ) : void
리턴 void

Send() 보호된 메소드

Sends a transmission and handle errors.
protected Send ( StorageTransmission transmission, System.TimeSpan &nextSendInterval ) : bool
transmission StorageTransmission The transmission to send.
nextSendInterval System.TimeSpan When this value returns it will hold a recommendation for when to start the next sending iteration.
리턴 bool

SendLoop() 보호된 메소드

Send transmissions in a loop.
protected SendLoop ( ) : void
리턴 void

프로퍼티 상세

DelayHandler 보호되어 있는 프로퍼티

A wait handle that flags the sender when to start sending again. The type is protected for unit test.
protected AutoResetEvent,System.Threading DelayHandler
리턴 System.Threading.AutoResetEvent