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
Methods
CanProcessEntry(IFileSystemDirectory, IFileSystemEntry, string)
Determine whether this context handler can process the given entry.
bool CanProcessEntry(IFileSystemDirectory directory, IFileSystemEntry entry, string relativePathInFileSystem)
Parameters
directoryIFileSystemDirectoryThe directory containing the entry.
entryIFileSystemEntryThe entry to potentially process.
relativePathInFileSystemstringThe relative path in the file system where the entry is located, from the initial directory being loaded.
Returns
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
directoryIFileSystemDirectoryThe directory containing the entry.
entryIFileSystemEntryThe entry to process.
relativePathInFileSystemstringThe 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.