StreamReaderEnumerable
QuantConnect.Util.StreamReaderEnumerable
StreamReaderEnumerable(
stream: Stream,
*disposables: Union[IDisposable, Iterable[IDisposable]]
)
StreamReaderEnumerable(
reader: StreamReader,
*disposables: Union[IDisposable, Iterable[IDisposable]]
)
Bases: Object, Iterable[str], IDisposable
Converts a StreamReader into an enumerable of string
Initializes a new instance of the StreamReaderEnumerable class
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stream
|
Optional[Stream]
|
The stream to be read |
None
|
disposables
|
Union[IDisposable, Iterable[IDisposable]]
|
Allows specifying other resources that should be disposed when this instance is disposed |
()
|
reader
|
Optional[StreamReader]
|
The stream reader instance to convert to an enumerable of string |
None
|
__iter__
__iter__() -> Iterator[str]
dispose
dispose() -> None
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
get_enumerator
get_enumerator() -> IEnumerator[str]
Returns an enumerator that iterates through the collection.
Returns:
| Type | Description |
|---|---|
IEnumerator[str]
|
A System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection. |