FileTopicFactory.Register Method
- Namespace
- Kampute.DocToolkit
- Assembly
- Kampute.DocToolkit.dll
Definition
Registers a topic type for the specified file extensions with the specified factory delegate.
public static void Register<TTopic>(Func<string, string, TTopic> factory, params IEnumerable<string> fileExtensions)
where TTopic : FileTopicType Parameters
TTopic- The type of the topic to register.
Parameters
factoryFunc<string, string, TTopic>- A factory delegate that creates a new instance of the topic. The first parameter is the topic identifier, and the second is the file path.
fileExtensionsIEnumerable<string>- The file extensions (including the leading period) to register the topic type for.
Exceptions
- ArgumentNullException
- Thrown when
factoryorfileExtensionsisnull.
