C# Class Microsoft.Silverlight.Testing.Tools.TestServiceEngine

The underlying service implementation.
显示文件 Open project: garyjohnson/wpnest Class Usage Examples

Private Properties

Property Type Description
BeginShutdownProcess void
DirectoryIsWithinDirectory bool
DirectoryIsWithinDirectory bool
FileIsWithinDirectory bool
GetLocalPath string
GetMimeType string
GetMimeTypeFromRegistry string
ListDirectoryContents void
Log void
ProcessGetRequest void
ProcessPostRequest void
ProcessResult void
SaveResults void
SendBasicHeader void
SendInformationalFooter void
ServeCrossDomainFile void
ServeFile void
ServeFunction void
ServeFunction void
ServeRequests void
ServeString void
SetContentType void
SetHttpStatus void
StartShutdownMonitorThread void

Public Methods

Method Description
TestServiceEngine ( TestServiceOptions options ) : System

Initializes a new instance of the test service.

Private Methods

Method Description
BeginShutdownProcess ( ) : void

Begins the shutdown process by setting the shutdown time to the current time plus the delay.

DirectoryIsWithinDirectory ( DirectoryInfo dir, DirectoryInfo root ) : bool

Checks whether the directory is within another root directory.

DirectoryIsWithinDirectory ( string dir, string root ) : bool

Checks whether the directory is within another root directory.

FileIsWithinDirectory ( string file, string directory ) : bool

Checks whether the file is within a root directory.

GetLocalPath ( HttpListenerRequest request ) : string

Returns the local path from an HTTP listener request.

GetMimeType ( string path ) : string

Retrieves a simple MIME type from the path.

GetMimeTypeFromRegistry ( string ext ) : string

Retrieves the MIME type for an extension from the registry.

ListDirectoryContents ( HttpListenerResponse response, string directory ) : void

Lists the directory contents in a simple HTML format. Writes to the HTTP response.

Log ( string value ) : void

Logs to the debug stream a message.

ProcessGetRequest ( HttpListenerRequest request, HttpListenerResponse response, string rootDirectory ) : void
ProcessPostRequest ( HttpListenerRequest request, HttpListenerResponse response, string rootDirectory ) : void
ProcessResult ( TestRunResult result ) : void

Process a test run result and then begin the shutdown process.

SaveResults ( string directory, HttpListenerRequest request ) : void

Store the results from the request.

SendBasicHeader ( StreamWriter sw, string title ) : void

Sends a basic header back on the request wire.

SendInformationalFooter ( StreamWriter sw ) : void

Sends an HTML footer.

ServeCrossDomainFile ( HttpListenerResponse response ) : void

Serves up the XML cross domain policy file.

ServeFile ( string directory, HttpListenerRequest request, HttpListenerResponse response ) : void

Save a file in the directory.

ServeFunction ( HttpListenerRequest request, HttpListenerResponse response ) : void

Serve a function without any POST data.

ServeFunction ( HttpListenerRequest request, HttpListenerResponse response, string postData ) : void

Serve a function.

ServeRequests ( ) : void
ServeString ( HttpListenerResponse response, string value ) : void

Serve a string back through the stream.

SetContentType ( HttpListenerResponse response, string contentType ) : void

Sets the content type on the HTTP response.

SetHttpStatus ( HttpListenerResponse response, HttpStatusCode status ) : void

Sets the HTTP status.

StartShutdownMonitorThread ( ) : void

Method Details

TestServiceEngine() public method

Initializes a new instance of the test service.
public TestServiceEngine ( TestServiceOptions options ) : System
options TestServiceOptions The test service options.
return System