Interface
ITextBasedFormatProvider<T>

Contract for text-based format providers that import/export documents from/to strings.

Definition

Namespace:Telerik.Windows.Documents.Common.FormatProviders

Assembly:Telerik.Windows.Documents.Core.dll

Type Parameters:

T

Syntax:

cs-api-definition
public interface ITextBasedFormatProvider<T>

Derived Classes: TextBasedFormatProviderBase<T>HtmlFormatProviderRtfFormatProviderTxtFormatProvider

Methods

Export(T)

Exports the document to a text string representation.

Declaration

cs-api-definition
string Export(T document)

Parameters

document

T

The document.

Returns

string

The result string.

Export(T, TimeSpan?)

Exports the document to a text string with an optional timeout.

Declaration

cs-api-definition
string Export(T document, TimeSpan? timeout)

Parameters

document

T

The document.

timeout

TimeSpan?

The timeout after which the operation will be cancelled.

Returns

string

The result string.

Exceptions

ArgumentOutOfRangeException

The exception that is thrown when timeout is less than -1 or greater than Int32.MaxValue. Note that this upper bound is more restrictive than TimeSpan.MaxValue.

Import(string)

Imports a document from a text string and returns the parsed document instance.

Declaration

cs-api-definition
T Import(string input)

Parameters

input

string

The input.

Returns

T

The document.

Import(string, TimeSpan?)

Imports a document from a text string with an optional timeout and returns the parsed document.

Declaration

cs-api-definition
T Import(string input, TimeSpan? timeout)

Parameters

input

string

The input.

timeout

TimeSpan?

The timeout after which the operation will be cancelled.

Returns

T

The document.

Exceptions

ArgumentOutOfRangeException

The exception that is thrown when timeout is less than -1 or greater than Int32.MaxValue. Note that this upper bound is more restrictive than TimeSpan.MaxValue.