Struct StreamOrDirectory
- Namespace
- DirectoryToObject
- Assembly
- DirectoryToObject.dll
Value type that represents either a Stream or a IFileSystemDirectory, also implementing IDisposable so that the contents can be disposed cleanly.
public readonly struct StreamOrDirectory : IDisposable
- Implements
- Inherited Members
Constructors
StreamOrDirectory(IFileSystemDirectory)
Create a new instance of StreamOrDirectory that encapsulates the provided IFileSystemDirectory.
public StreamOrDirectory(IFileSystemDirectory directory)
Parameters
directoryIFileSystemDirectoryThe file syste directory abstraction to wrap.
StreamOrDirectory(Stream)
Create a new instance of StreamOrDirectory that encapsulates the provided Stream.
public StreamOrDirectory(Stream stream)
Parameters
streamStreamThe stream to wrap.
Fields
Directory
The wrapped directory abstraction, if any.
public readonly IFileSystemDirectory? Directory
Field Value
Stream
The wrapped stream, if any.
public readonly Stream? Stream
Field Value
Methods
Dispose()
Dispose of the structure contents, if applicable.
public void Dispose()