Class
RenderedOutput
ConsoleMonster.Export
One rendered document or image: its format, its bytes and its media type.
Inheritance
- object
- RenderedOutput
Usage
Explore 5 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 5
- Method FrameExporter.Render
- Method Recording.Render
- Extension method IWidget.Render
- Method SessionRecording.Render
- Method WidgetPipeline.Render
Constructors
public RenderedOutput(OutputFormat format, byte[] bytes) #Wraps rendered bytes.
Parameters
- format ConsoleMonster.Export.OutputFormat
- The format.
- bytes byte[]
- The encoded output.
Methods
public static string MediaTypeOf(OutputFormat format) #The media type of a format.
Parameters
- format ConsoleMonster.Export.OutputFormat
- The format.
Returns
string The media type.public byte[] ToBytes() #A copy of the encoded output (UTF-8 without a byte order mark for text).
Returns
byte[] The bytes.public override string ToString() #The text of a text format.
Returns
string The text, or the format name for an image.public string ToText() #The text of a text format.
Returns
string The text.Exceptions
InvalidOperationException– The output is an image.
Inherited Methods
Properties
public bool IsText { get; } #Whether the output is text (everything except OutputFormat.Png).