C# Class Raven.Client.Connection.HttpJsonRequestFactory

Create the HTTP Json Requests to the RavenDB Server and manages the http cache
Inheritance: IDisposable
显示文件 Open project: robashton/ravendb Class Usage Examples

Public Methods

Method Description
CreateHttpJsonRequest ( CreateHttpJsonRequestParams createHttpJsonRequestParams ) : HttpJsonRequest

Creates the HTTP json request.

DisableAllCaching ( ) : IDisposable

Disable all caching within the given scope

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

ExpireItemsFromCache ( string db ) : void
HttpJsonRequestFactory ( int maxNumberOfCachedRequests ) : System

default ctor

ResetCache ( ) : void

Reset the number of cached requests and clear the entire cache Mostly used for testing

Private Methods

Method Description
CacheResponse ( string url, RavenJToken data, NameValueCollection headers ) : void
ConfigureCaching ( string url, string>.Action setHeader ) : CachedRequestOp
GetCachedResponse ( HttpJsonRequest httpJsonRequest, NameValueCollection additionalHeaders = null ) : RavenJToken
IncrementCachedRequests ( ) : void
InvokeLogRequest ( IHoldProfilingInformation sender, Func generateRequestResult ) : void

Invoke the LogRequest event

UpdateCacheTime ( HttpJsonRequest httpJsonRequest ) : void

Method Details

CreateHttpJsonRequest() public method

Creates the HTTP json request.
public CreateHttpJsonRequest ( CreateHttpJsonRequestParams createHttpJsonRequestParams ) : HttpJsonRequest
createHttpJsonRequestParams CreateHttpJsonRequestParams
return HttpJsonRequest

DisableAllCaching() public method

Disable all caching within the given scope
public DisableAllCaching ( ) : IDisposable
return IDisposable

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

ExpireItemsFromCache() public method

public ExpireItemsFromCache ( string db ) : void
db string
return void

HttpJsonRequestFactory() public method

default ctor
public HttpJsonRequestFactory ( int maxNumberOfCachedRequests ) : System
maxNumberOfCachedRequests int
return System

ResetCache() public method

Reset the number of cached requests and clear the entire cache Mostly used for testing
public ResetCache ( ) : void
return void