Table of Contents

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

service IFileTypesService1

The service to use for finding and creating IFileType instances.

filePath string

The path of the file to load from.

Returns

IFileTypeDocument