Class
FrameExporter
ConsoleMonster.Export
One core/add-on dispatch boundary for frame exports, without runtime assembly discovery.
Inheritance
- object
- FrameExporter
Methods
Export 2 overloads
public static byte[] Export(IWidget widget, string format, ExportOptions? options = null, IFrameExportProvider? provider = null) #Exports a widget as deterministic bytes in a core or registered add-on format.
Parameters
- widget ConsoleMonster.Layout.IWidget
- The widget.
- format string
- The public format name.
- options ConsoleMonster.Export.ExportOptions? = null
- Frame size, theme and typography.
- provider ConsoleMonster.Export.IFrameExportProvider? = null
- Optional per-call add-on provider with typed add-on settings.
Returns
byte[] The encoded document or image.public static byte[] Export(CellBuffer frame, string format, ExportOptions? options = null, IFrameExportProvider? provider = null) #Exports a rendered frame through the same core/add-on dispatch.
Parameters
- frame ConsoleMonster.Canvas.CellBuffer
- format string
- options ConsoleMonster.Export.ExportOptions? = null
- provider ConsoleMonster.Export.IFrameExportProvider? = null
Returns
byte[]public static void Register(IFrameExportProvider provider) #Registers an add-on format for this application. Existing registrations are replaced explicitly.
Parameters
- provider ConsoleMonster.Export.IFrameExportProvider
- The add-on's typed provider; no reflection is used.
public static string ResolveFormat(string? format = null, string? path = null) #Resolves a format name or file extension without loading an add-on.
Parameters
- format string? = null
- The explicit name, or null to infer it from path.
- path string? = null
- The output path, when available.
Returns
string The normalized public format name.public static void Save(IWidget widget, string path, string? format = null, ExportOptions? options = null, IFrameExportProvider? provider = null) #Saves a widget through the same dispatch used by a fluent Export ending.
Parameters
- widget ConsoleMonster.Layout.IWidget
- path string
- format string? = null
- options ConsoleMonster.Export.ExportOptions? = null
- provider ConsoleMonster.Export.IFrameExportProvider? = null