C# 클래스 Bloom.Api.ServerBase

상속: IDisposable
파일 보기 프로젝트 열기: BloomBooks/BloomDesktop 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
portForHttp int

Private Properties

프로퍼티 타입 설명
AttemptToOpenPort bool
EnqueueIncomingRequests void
GetLocalPathWithoutQuery string
GetServerStartFailureMessage string
MakeReply void
QueueRequest void
ReportMissingFile void
RequestProcessorLoop void
SpinUpAWorker void
VerifyWeAreNowListening void

공개 메소드들

메소드 설명
Dispose ( ) : void
GetContentType ( string extension ) : string
StartListening ( ) : void

보호된 메소드들

메소드 설명
Dispose ( bool fDisposing ) : void
GetLocalPathWithoutQuery ( IRequestInfo info ) : string
IgnoreFileIfMissing ( string localPath ) : bool

Check for files that may be missing but that we know aren't important enough to complain about.

IsRecursiveRequestContext ( HttpListenerContext context ) : bool

Return true if producing the result requested by the context may involve making additional requests to the server. (See the fuller discussion on the declaration of _threadsDoingRecursiveRequests.)

ProcessRequest ( IRequestInfo info ) : bool

This method is overridden in classes inheriting from this class to handle specific request types

ServerBase ( ) : System

비공개 메소드들

메소드 설명
AttemptToOpenPort ( ) : bool

Tries to start listening on the currently proposed server url

EnqueueIncomingRequests ( ) : void

The _listenerThread runs this method, and exits when the _stop event is raised

GetLocalPathWithoutQuery ( string localPath ) : string
GetServerStartFailureMessage ( ) : string
MakeReply ( IRequestInfo info ) : void

This is designed to be easily unit testable by not taking actual HttpContext, but doing everything through this IRequestInfo object

QueueRequest ( IAsyncResult ar ) : void

This method is called in the _listenerThread when we obtain an HTTP request from the _listener, and queues it for processing by a worker.

ReportMissingFile ( IRequestInfo info ) : void
RequestProcessorLoop ( ) : void

The worker threads run this function

SpinUpAWorker ( ) : void
VerifyWeAreNowListening ( ) : void

메소드 상세

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool fDisposing ) : void
fDisposing bool
리턴 void

GetContentType() 공개 정적인 메소드

public static GetContentType ( string extension ) : string
extension string
리턴 string

GetLocalPathWithoutQuery() 보호된 정적인 메소드

protected static GetLocalPathWithoutQuery ( IRequestInfo info ) : string
info IRequestInfo
리턴 string

IgnoreFileIfMissing() 보호된 메소드

Check for files that may be missing but that we know aren't important enough to complain about.
protected IgnoreFileIfMissing ( string localPath ) : bool
localPath string
리턴 bool

IsRecursiveRequestContext() 보호된 메소드

Return true if producing the result requested by the context may involve making additional requests to the server. (See the fuller discussion on the declaration of _threadsDoingRecursiveRequests.)
protected IsRecursiveRequestContext ( HttpListenerContext context ) : bool
context System.Net.HttpListenerContext
리턴 bool

ProcessRequest() 보호된 메소드

This method is overridden in classes inheriting from this class to handle specific request types
protected ProcessRequest ( IRequestInfo info ) : bool
info IRequestInfo
리턴 bool

ServerBase() 보호된 메소드

protected ServerBase ( ) : System
리턴 System

StartListening() 공개 메소드

public StartListening ( ) : void
리턴 void

프로퍼티 상세

portForHttp 공개적으로 정적으로 프로퍼티

public static int portForHttp
리턴 int