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
Показать файл Открыть проект Примеры использования класса

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