Table of Contents

Interface IDirectoryLoaderContextHandler

Namespace
DirectoryToObject
Assembly
DirectoryToObject.dll

Interface provided to the directory loader to serve as the strategy for processing entries within a directory. The directory loader will call CanProcessEntry(IFileSystemDirectory, IFileSystemEntry, string) to determine if this context handler can process a given entry, and if so, ProcessEntry(IFileSystemDirectory, IFileSystemEntry, string) to perform the processing.

public interface IDirectoryLoaderContextHandler

Properties

Name

Context handle name -- for debugging purposes.

string Name { get; }

Property Value

string

Methods

CanProcessEntry(IFileSystemDirectory, IFileSystemEntry, string)

Determine whether this context handler can process the given entry.

bool CanProcessEntry(IFileSystemDirectory directory, IFileSystemEntry entry, string relativePathInFileSystem)

Parameters

directory IFileSystemDirectory

The directory containing the entry.

entry IFileSystemEntry

The entry to potentially process.

relativePathInFileSystem string

The relative path in the file system where the entry is located, from the initial directory being loaded.

Returns

bool

ProcessEntry(IFileSystemDirectory, IFileSystemEntry, string)

Process the given entry using this context handler. CanProcessEntry(IFileSystemDirectory, IFileSystemEntry, string) must have returned true for this method to be called.

Task<ContextResponse> ProcessEntry(IFileSystemDirectory directory, IFileSystemEntry entry, string relativePathInFileSystem)

Parameters

directory IFileSystemDirectory

The directory containing the entry.

entry IFileSystemEntry

The entry to process.

relativePathInFileSystem string

The relative path in the file system where the entry is located, from the initial directory being loaded.

Returns

Task<ContextResponse>

A task resolving to a ContextResponse indicating the result of processing the entry.