Class InMemoryConnection
Inheritance
InMemoryConnection
Assembly: OpenSearch.Net.dll
Syntax
public class InMemoryConnection : IConnection, IDisposable
Constructors
|
Edit this page
View Source
InMemoryConnection()
Every request will succeed with this overload, note that it won't actually return mocked responses
so using this overload might fail if you are using it to test high level bits that need to deserialize the response.
Declaration
public InMemoryConnection()
|
Edit this page
View Source
InMemoryConnection(byte[], int, Exception, string)
Declaration
public InMemoryConnection(byte[] responseBody, int statusCode = 200, Exception exception = null, string contentType = "application/json")
Parameters
Methods
|
Edit this page
View Source
DisposeManagedResources()
Declaration
protected virtual void DisposeManagedResources()
|
Edit this page
View Source
RequestAsync<TResponse>(RequestData, CancellationToken)
Declaration
public virtual Task<TResponse> RequestAsync<TResponse>(RequestData requestData, CancellationToken cancellationToken) where TResponse : class, IOpenSearchResponse, new()
Parameters
Returns
Type |
Description |
Task<TResponse> |
|
Type Parameters
Name |
Description |
TResponse |
|
|
Edit this page
View Source
Request<TResponse>(RequestData)
Declaration
public virtual TResponse Request<TResponse>(RequestData requestData) where TResponse : class, IOpenSearchResponse, new()
Parameters
Returns
Type |
Description |
TResponse |
|
Type Parameters
Name |
Description |
TResponse |
|
|
Edit this page
View Source
ReturnConnectionStatusAsync<TResponse>(RequestData, CancellationToken, byte[], int?, string)
Declaration
protected Task<TResponse> ReturnConnectionStatusAsync<TResponse>(RequestData requestData, CancellationToken cancellationToken, byte[] responseBody = null, int? statusCode = null, string contentType = null) where TResponse : class, IOpenSearchResponse, new()
Parameters
Returns
Type |
Description |
Task<TResponse> |
|
Type Parameters
Name |
Description |
TResponse |
|
|
Edit this page
View Source
ReturnConnectionStatus<TResponse>(RequestData, byte[], int?, string)
Declaration
protected TResponse ReturnConnectionStatus<TResponse>(RequestData requestData, byte[] responseBody = null, int? statusCode = null, string contentType = null) where TResponse : class, IOpenSearchResponse, new()
Parameters
Returns
Type |
Description |
TResponse |
|
Type Parameters
Name |
Description |
TResponse |
|
Implements
Extension Methods