C# Class FluentRest.Fake.FileMessageStore

A file based fake message store. The fake response messages are saved and loaded from the StorePath directory.
Inheritance: FluentRest.Fake.FakeMessageStore
Afficher le fichier Open project: loresoft/FluentRest Class Usage Examples

Méthodes publiques

Méthode Description
GenerateHash ( string text ) : string

Generates a hash for the specified text.

LoadAsync ( HttpRequestMessage request ) : Task

Loads an HTTP fake response message for the specified HTTP request as an asynchronous operation.

SaveAsync ( HttpRequestMessage request, HttpResponseMessage response ) : Task

Saves the specified HTTP response to the message store as an asynchronous operation.

Private Methods

Méthode Description
GetPaths ( HttpRequestMessage request, string &responsePath, string &contentPath ) : void
LoadContent ( string contentPath ) : HttpContent
LoadResponse ( HttpContent httpContent, string responsePath ) : Task
SaveContent ( HttpResponseMessage response, string contentPath ) : Task
SaveResponse ( HttpResponseMessage response, string responsePath ) : Task

Method Details

GenerateHash() public static méthode

Generates a hash for the specified text.
public static GenerateHash ( string text ) : string
text string The value to hash.
Résultat string

LoadAsync() public méthode

Loads an HTTP fake response message for the specified HTTP request as an asynchronous operation.
public LoadAsync ( HttpRequestMessage request ) : Task
request System.Net.Http.HttpRequestMessage The HTTP request message to load response for.
Résultat Task

SaveAsync() public méthode

Saves the specified HTTP response to the message store as an asynchronous operation.
public SaveAsync ( HttpRequestMessage request, HttpResponseMessage response ) : Task
request HttpRequestMessage The HTTP request message that was sent.
response HttpResponseMessage The HTTP response messsage to save.
Résultat Task