public override Task<string> ReadLineAsync()
{
// If we have been inherited into a subclass, the following implementation could be incorrect
// since it does not call through to Read() which a subclass might have overridden.
// To be safe we will only use this implementation in cases where we know it is safe to do so,
// and delegate to our base class (which will call into Read) when we are not sure.
if (GetType() != typeof(StreamReader))
{
return base.ReadLineAsync();
}
if (_stream == null)
{
throw new ObjectDisposedException(null, SR.ObjectDisposed_ReaderClosed);
}
CheckAsyncTaskInProgress();
Task<string> task = ReadLineAsyncInternal();
_asyncReadTask = task;
return task;
}