C# Class Stumps.Server.RecordedContextPartBase

A class that provides the foundation for recorded HTTP requests and responses.
Inheritance: IStumpsHttpContextPart
显示文件 Open project: Cayan-LLC/stumps

Public Methods

Method Description
GetBody ( ) : byte[]

Gets the bytes for the HTTP body.

GetBodyAsString ( ) : string

Gets the HTTP body as a T:System.String.

The body is decoded using UTF8 encoding.

GetBodyAsString ( Encoding encoding ) : string

Gets the HTTP body as a T:System.String.

The body is decoded using UTF8 encoding.

Protected Methods

Method Description
AppendToBody ( byte buffer ) : void

Appends a byte array to the body of the HTTP response.

ClearBody ( ) : void

Clears the existing body of the HTTP response.

ExamineBody ( ) : void

Examines the body for the classification, and the MD5 hash.

RecordedContextPartBase ( IStumpsHttpContextPart contextPart, ContentDecoderHandling decoderHandling ) : System

Initializes a new instance of the T:Stumps.Server.RecordedContextPartBase class.

Private Methods

Method Description
DecodeBody ( ) : void

Decodes the body of a based on the content encoding.

DetermineBodyClassification ( ) : void

Determines the HTTP body to determine its classification.

GenerateMd5Hash ( ) : void

Generates the MD5 hash for the HTTP body.

Method Details

AppendToBody() protected method

Appends a byte array to the body of the HTTP response.
protected AppendToBody ( byte buffer ) : void
buffer byte The bytes to append to the body of the response.
return void

ClearBody() protected method

Clears the existing body of the HTTP response.
protected ClearBody ( ) : void
return void

ExamineBody() protected method

Examines the body for the classification, and the MD5 hash.
protected ExamineBody ( ) : void
return void

GetBody() public method

Gets the bytes for the HTTP body.
public GetBody ( ) : byte[]
return byte[]

GetBodyAsString() public method

Gets the HTTP body as a T:System.String.
The body is decoded using UTF8 encoding.
public GetBodyAsString ( ) : string
return string

GetBodyAsString() public method

Gets the HTTP body as a T:System.String.
The body is decoded using UTF8 encoding.
public GetBodyAsString ( Encoding encoding ) : string
encoding System.Text.Encoding The encoding used to convert the HTTP body into a .
return string

RecordedContextPartBase() protected method

Initializes a new instance of the T:Stumps.Server.RecordedContextPartBase class.
is null.
protected RecordedContextPartBase ( IStumpsHttpContextPart contextPart, ContentDecoderHandling decoderHandling ) : System
contextPart IStumpsHttpContextPart The context part.
decoderHandling ContentDecoderHandling The requirements for the HTTP body.
return System