C# 클래스 FiftyOne.Foundation.Mobile.Detection.Entities.Stream.Pool

As multiple threads need to read from the SourceBase concurrently this class provides a mechanisim for readers to be recycled across threads and requests.
The DataSet must be disposed of to ensure the readers in the pool are closed.
상속: IDisposable
파일 보기 프로젝트 열기: 51Degrees/dotNET-Device-Detection 1 사용 예제들

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
GetReader ( ) : Reader

Returns a reader to the temp file for exclusive use. Release method must be called to return the reader to the pool when finished.

Pool ( SourceBase source ) : System

Constructs a new pool of readers for SourceBase provided.

Release ( Reader reader ) : void

Returns the reader to the pool to be used by another process later.

메소드 상세

GetReader() 공개 메소드

Returns a reader to the temp file for exclusive use. Release method must be called to return the reader to the pool when finished.
public GetReader ( ) : Reader
리턴 FiftyOne.Foundation.Mobile.Detection.Readers.Reader

Pool() 공개 메소드

Constructs a new pool of readers for SourceBase provided.
public Pool ( SourceBase source ) : System
source SourceBase /// The data source for the list. ///
리턴 System

Release() 공개 메소드

Returns the reader to the pool to be used by another process later.
public Release ( Reader reader ) : void
reader FiftyOne.Foundation.Mobile.Detection.Readers.Reader /// Reader open and ready to read from the temp file. ///
리턴 void