DocumentationContextExtensions.IsFormatSupported Method

Namespace
Kampute.DocToolkit
Assembly
  • Kampute.DocToolkit.dll

Definition

Determines whether the specified file format (based on the file extension) is supported by the content formatter of the documentation context.
public static bool IsFormatSupported(this IDocumentationContext context, string filePath)

Parameters

context IDocumentationContext
The documentation context to check for format support.
filePath string
The file path to check for format support.

Returns

bool
true if the format is supported; otherwise, false.

Exceptions

ArgumentNullException
Thrown when context or filePath is null.
ArgumentException
Thrown when filePath is null or empty.

Remarks

This method checks if the file format specified by the file extension of the given file path is supported by the content formatter associated with the documentation context.
The filePath can be either the full path of a file or a file extension (including the leading period).