Class
TextContent

Represents text-based content with a specified MIME type.

Definition

Namespace:Telerik.Reporting.AI

Assembly:Telerik.Reporting.dll

Syntax:

cs-api-definition
public sealed class TextContent : IContent

Inheritance: objectTextContent

Implements: IContent

Constructors

TextContent(string)

Initializes a new instance with the specified text using "text/plain" as the default MIME type.

Declaration

cs-api-definition
public TextContent(string text)

Parameters

text

string

The text content.

TextContent(string, string)

Initializes a new instance with the specified text and MIME type.

Declaration

cs-api-definition
public TextContent(string text, string mimeType)

Parameters

text

string

The text content.

mimeType

string

The MIME type of the text content.

Fields

ContentType

Defines the type identifier for TextContent.

Declaration

cs-api-definition
public const string ContentType = "TextContent"

Field Value

string

DefaultMimeType

Defines the default MIME type for TextContent.

Declaration

cs-api-definition
public const string DefaultMimeType = "text/plain"

Field Value

string

Properties

Text

Gets the text content.

Declaration

cs-api-definition
public string Text { get; }

Property Value

string

Methods

AsString()

Returns the text content as a string.

Declaration

cs-api-definition
public string AsString()

Returns

string

The text content.

Implements IContent.AsString()