C# 클래스 Stumps.Server.Data.DataAccess

A class that provides an implementation of T:Stumps.Server.Data.IDataAccess that uses JSON files and directory structures to persist information about Stumps servers and Stump instances.
상속: IDataAccess
파일 보기 프로젝트 열기: Cayan-LLC/stumps 1 사용 예제들

공개 메소드들

메소드 설명
DataAccess ( string storagePath ) : System

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

ServerCreate ( ServerEntity server ) : void

Creates an entry for a new stumps server.

ServerDelete ( string serverId ) : void

Deletes an existing T:Stumps.Server.Data.ServerEntity.

ServerFind ( string serverId ) : ServerEntity

Finds the persisted T:Stumps.Server.Data.ServerEntity for a specified serverId.

ServerFindAll ( ) : IList

Finds a list of all persisted T:Stumps.Server.Data.ServerEntity.

ServerReadResource ( string serverId, string resourceName ) : byte[]

Loads the contents of a resource for a Stumps server.

A null value is returned if the resource cannot be found.

StumpCreate ( string serverId, StumpEntity entity, byte originalRequestBody, byte originalResponseBody, byte responseBody ) : StumpEntity

Creates a new T:Stumps.Server.Data.StumpEntity for an existing Stumps server.

StumpDelete ( string serverId, string stumpId ) : void

Deletes an existing stump from a Stumps server.

StumpFindAll ( string serverId ) : IList

Finds all a list of all T:Stumps.Server.Data.StumpEntity for the specified serverId.

메소드 상세

DataAccess() 공개 메소드

Initializes a new instance of the T:Stumps.Server.Data.DataAccess class.
is null.
public DataAccess ( string storagePath ) : System
storagePath string The data path.
리턴 System

ServerCreate() 공개 메소드

Creates an entry for a new stumps server.
server
public ServerCreate ( ServerEntity server ) : void
server ServerEntity The to create.
리턴 void

ServerDelete() 공개 메소드

Deletes an existing T:Stumps.Server.Data.ServerEntity.
is null.
public ServerDelete ( string serverId ) : void
serverId string The unique identifier for the to delete.
리턴 void

ServerFind() 공개 메소드

Finds the persisted T:Stumps.Server.Data.ServerEntity for a specified serverId.
public ServerFind ( string serverId ) : ServerEntity
serverId string The unique identifier for the to find.
리턴 ServerEntity

ServerFindAll() 공개 메소드

Finds a list of all persisted T:Stumps.Server.Data.ServerEntity.
public ServerFindAll ( ) : IList
리턴 IList

ServerReadResource() 공개 메소드

Loads the contents of a resource for a Stumps server.
A null value is returned if the resource cannot be found.
/// is null. ///
public ServerReadResource ( string serverId, string resourceName ) : byte[]
serverId string The unique identifier for the Stumps server.
resourceName string Name of the file.
리턴 byte[]

StumpCreate() 공개 메소드

Creates a new T:Stumps.Server.Data.StumpEntity for an existing Stumps server.
/// is null. /// or /// is null. ///
public StumpCreate ( string serverId, StumpEntity entity, byte originalRequestBody, byte originalResponseBody, byte responseBody ) : StumpEntity
serverId string The unique identifier for the Stumps server.
entity StumpEntity The to persist.
originalRequestBody byte The array of bytes representing the original request's HTTP body.
originalResponseBody byte The array of bytes representing the original response's HTTP body.
responseBody byte The array of bytes returned as the HTTP body in response to the stump.
리턴 StumpEntity

StumpDelete() 공개 메소드

Deletes an existing stump from a Stumps server.
public StumpDelete ( string serverId, string stumpId ) : void
serverId string The unique identifier for the Stumps server the Stump is located in.
stumpId string The unique identifier for the stump to delete.
리턴 void

StumpFindAll() 공개 메소드

Finds all a list of all T:Stumps.Server.Data.StumpEntity for the specified serverId.
public StumpFindAll ( string serverId ) : IList
serverId string The unique identifier for the Stumps server.
리턴 IList