Method TryLoadFileAsDocument
- Namespace
- PaintDotNet.FileTypes
- Assembly
- PaintDotNet.FileTypes.dll
TryLoadFileAsDocument(IFileTypesService1, string)
Like LoadFileAsDocument(IFileTypesService1, string), but returns null instead of throwing an exception when an error is encountered.
public static IFileTypeDocument? TryLoadFileAsDocument(this IFileTypesService1 service, string filePath)
Parameters
serviceIFileTypesService1The service to use for finding and creating IFileType instances.
filePathstringThe path of the file to load from.