Table of Contents

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

directory IFileSystemDirectory

The file syste directory abstraction to wrap.

StreamOrDirectory(Stream)

Create a new instance of StreamOrDirectory that encapsulates the provided Stream.

public StreamOrDirectory(Stream stream)

Parameters

stream Stream

The stream to wrap.

Fields

Directory

The wrapped directory abstraction, if any.

public readonly IFileSystemDirectory? Directory

Field Value

IFileSystemDirectory

Stream

The wrapped stream, if any.

public readonly Stream? Stream

Field Value

Stream

Methods

Dispose()

Dispose of the structure contents, if applicable.

public void Dispose()