Skip to main content

Definition

Assembly: CloudNimble.Breakdance.Assemblies.dll Namespace: CloudNimble.Breakdance.Assemblies.Http Inheritance: CloudNimble.Breakdance.Assemblies.Http.TestCacheDelegatingHandlerBase

Syntax

CloudNimble.Breakdance.Assemblies.Http.TestCacheReadDelegatingHandler

Summary

Handler for mocking the HttpResponse returned by an HttpRequest using a UTF-8 encoded file.

Constructors

.ctor

Constructor overload for specifying the root folder path.

Syntax

public TestCacheReadDelegatingHandler(string responseFilesPath)

Parameters

NameTypeDescription
responseFilesPathstringRoot folder path for storing static response files.

.ctor Inherited

Inherited from CloudNimble.Breakdance.Assemblies.Http.TestCacheDelegatingHandlerBase
Constructor overload for specifying the root folder path.

Syntax

public TestCacheDelegatingHandlerBase(string responseFilesPath)

Parameters

NameTypeDescription
responseFilesPathstringRoot folder path for storing static response files.

Properties

ResponseFilesPath Inherited

Inherited from CloudNimble.Breakdance.Assemblies.Http.TestCacheDelegatingHandlerBase
Stores the root folder for reading/writing static response files.

Syntax

public string ResponseFilesPath { get; private set; }

Property Value

Type: string

Methods

GetFileExtensionString Inherited

Inherited from CloudNimble.Breakdance.Assemblies.Http.TestCacheDelegatingHandlerBase
Maps the MediaType header in the HttpRequestMessage to a known list of file extensions.

Syntax

public static string GetFileExtensionString(System.Net.Http.HttpRequestMessage request)

Parameters

NameTypeDescription
requestSystem.Net.Http.HttpRequestMessage-

Returns

Type: string

GetPathInfo Inherited

Inherited from CloudNimble.Breakdance.Assemblies.Http.TestCacheDelegatingHandlerBase
Parses the RequestUri in the HttpRequestMessage into a Path-safe string.

Syntax

internal static (string, string) GetPathInfo(System.Net.Http.HttpRequestMessage request, string responseFilePath)

Parameters

NameTypeDescription
requestSystem.Net.Http.HttpRequestMessageThe HttpRequestMessage to parse.
responseFilePathstringRoot folder for storing cache files.

Returns

Type: (string, string)

GetResponseMediaTypeString Inherited

Inherited from CloudNimble.Breakdance.Assemblies.Http.TestCacheDelegatingHandlerBase
Maps the file extension in the specified path to a known list of media types.

Syntax

public static string GetResponseMediaTypeString(string filePath)

Parameters

NameTypeDescription
filePathstring-

Returns

Type: string