FileTopicFactory.Create Method
- Namespace
- Kampute.DocToolkit
- Assembly
- Kampute.DocToolkit.dll
| FileTopicFactory.Create(string) | Creates a topic instance based on the specified file path, using the file name (without extension) as the topic name. |
| FileTopicFactory.Create(string, string) | Creates a topic instance with the specified name based on the specified file path. |
FileTopicFactory.Create(string)
Creates a topic instance based on the specified file path, using the file name (without extension) as the topic name.
public static FileTopic Create(string filePath)Parameters
filePathstring- The path to the file that contains the topic content.
Returns
Exceptions
- ArgumentException
- Thrown when
filePathisnullor whitespace, or does not have a valid file name.
FileTopicFactory.Create(string, string)
Creates a topic instance with the specified name based on the specified file path.
public static FileTopic Create(string id, string filePath)Parameters
idstring- The unique identifier of the topic among its siblings, typically used for URLs or filenames.
filePathstring- The path to the file that contains the topic content.
Returns
Exceptions
- ArgumentException
- Thrown when
idorfilePathisnull, whitespace, oridcontains invalid characters. - FileNotFoundException
- Thrown when the file specified by
filePathdoes not exist.
