Describe the bug
There's a documentation and API issue with this type. There isn't a way to reproduce this, more that the design should be reviewed.
- The XML docs say
Wraps the <see cref="FileStream" />, but the wrapped field, _stream, is of type Stream. There's no runtime check to ensure that the stream provided in the constructor is of type FileStream. This is confusing because the docs state one thing, but the implementation doesn't seem to match that.
- The
path parameter for the constructor is defined as string?, but the constructor will throw an ArgumentNullException if path is null. This is confusing, as annotating a parameter as nullable means that the method can accept a null value. If path cannot be null, then remove the nullable annotation.
Describe the bug
There's a documentation and API issue with this type. There isn't a way to reproduce this, more that the design should be reviewed.
Wraps the <see cref="FileStream" />, but the wrapped field,_stream, is of typeStream. There's no runtime check to ensure that the stream provided in the constructor is of typeFileStream. This is confusing because the docs state one thing, but the implementation doesn't seem to match that.pathparameter for the constructor is defined asstring?, but the constructor will throw anArgumentNullExceptionifpathis null. This is confusing, as annotating a parameter as nullable means that the method can accept a null value. Ifpathcannot benull, then remove the nullable annotation.