Method CreateSaveOptionsForDocument
- Namespace
- PaintDotNet.FileTypes
- Assembly
- PaintDotNet.FileTypes.dll
CreateSaveOptionsForDocument(IReadOnlyFileTypeDocument, IFileTypeSaveOptions, IReadOnlyFileTypePropertyBag)
Customizes the proposed save options for the given document. This allows the FileType to inspect the document and adjust the options accordingly. This is typically used with special metadata that was provided at load time by the same FileType.
IFileTypeSaveOptions CreateSaveOptionsForDocument(IReadOnlyFileTypeDocument document, IFileTypeSaveOptions proposedOptions, IReadOnlyFileTypePropertyBag metadataFromLoad)
Parameters
documentIReadOnlyFileTypeDocumentThe document to inspect.
proposedOptionsIFileTypeSaveOptionsThe save options that should be customized for the given document.
metadataFromLoadIReadOnlyFileTypePropertyBagThe metadata that was established by the FileType's loader, if available.
Returns
- IFileTypeSaveOptions
Either the
proposedOptionsif no customization is needed, or a new IFileTypeSaveOptions object with the options that should be used instead. These options will then be presented to the user for further configuration.