C# Class Smrf.SocialNetworkLib.RequestStatistics

Keeps track of requests that have been made while getting a network.
Call OnSuccessfulRequest each time a network request succeeds. Call OnUnexpectedException each time a network request fails (after retries) with an unexpected exception. After all requests have been made, read the SuccessfulRequests, , and LastUnexpectedException properties to create a request summary.
Inheritance: Object
Show file Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Property Type Description
m_iSuccessfulRequests System.Int32
m_iUnexpectedExceptions System.Int32
m_oLastUnexpectedException System.Exception
m_oStartTimeUtc System.DateTime

Public Methods

Method Description
OnSuccessfulRequest ( ) : void
OnUnexpectedException ( Exception unexpectedException ) : void
RequestStatistics ( ) : System

Initializes a new instance of the RequestStatistics class.

Private Methods

Method Description
AssertValid ( ) : void

Method Details

OnSuccessfulRequest() public method

public OnSuccessfulRequest ( ) : void
return void

OnUnexpectedException() public method

public OnUnexpectedException ( Exception unexpectedException ) : void
unexpectedException System.Exception
return void

RequestStatistics() public method

Initializes a new instance of the RequestStatistics class.
public RequestStatistics ( ) : System
return System

Property Details

m_iSuccessfulRequests protected property

protected Int32,System m_iSuccessfulRequests
return System.Int32

m_iUnexpectedExceptions protected property

protected Int32,System m_iUnexpectedExceptions
return System.Int32

m_oLastUnexpectedException protected property

protected Exception,System m_oLastUnexpectedException
return System.Exception

m_oStartTimeUtc protected property

protected DateTime,System m_oStartTimeUtc
return System.DateTime