Class Loader
- Namespace
- DirectoryToObject
- Assembly
- DirectoryToObject.dll
Static factory methods for creating directory loader instances implementing IDirectoryToObjectLoader .
public static class Loader
- Inheritance
-
Loader
- Inherited Members
Properties
Default
A default directory loader instance that loads JSON and text files with the ".json" and ".txt" extensions (case-insensitive), respectively.
public static IDirectoryToObjectLoader Default { get; }
Property Value
Methods
FromHandlerCollection(IEnumerable<IDirectoryLoaderContextHandler>)
Create a directory loader instance from the specified handlers, passed as an enumerable collection.
public static IDirectoryToObjectLoader FromHandlerCollection(IEnumerable<IDirectoryLoaderContextHandler> handlers)
Parameters
handlersIEnumerable<IDirectoryLoaderContextHandler>A collection of handlers to use for processing the files and directories discovered.
Returns
- IDirectoryToObjectLoader
A directory loader instance.
FromHandlers(params IDirectoryLoaderContextHandler[])
Create a directory loader instance from the specified handlers, passed as arguments.
public static IDirectoryToObjectLoader FromHandlers(params IDirectoryLoaderContextHandler[] handlers)
Parameters
handlersIDirectoryLoaderContextHandler[]The handlers to use for processing the files and directories discovered.
Returns
- IDirectoryToObjectLoader
A directory loader instance.
Remarks
Note that the returned loader is still independent of the source of files and directories -- extension methods, such as LoadFileSystemPathIntoJsonObjectAsync(IDirectoryToObjectLoader, string) -- make it easy to load directories from the file system, but the loader itself can be called with any IFileSystemDirectory implementation as directory and file source.