Base for text-based format providers that import and export documents from/to strings, useful when handling document text (such as PDF-derived content).
Definition
Namespace:Telerik.Windows.Documents.Common.FormatProviders
Assembly:Telerik.Windows.Documents.Core.dll
Type Parameters:
T
The type of the T.
Syntax:
public abstract class TextBasedFormatProviderBase<T> : FormatProviderBase<T>, IFormatProvider<T>, ITextBasedFormatProvider<T>
Inheritance: objectFormatProviderBase<T>TextBasedFormatProviderBase<T>
Derived Classes:
Implements:
Inherited Members
Constructors
protected TextBasedFormatProviderBase()
Methods
Exports the document to a text string with an optional timeout.
public string Export(T document, TimeSpan? timeout)
The document.
timeoutTimeSpan?The timeout after which the operation will be cancelled.
Returns:The result string.
Exceptions: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.
Implements:
Imports a document from a text string with an optional timeout and returns the parsed document.
public T Import(string input, TimeSpan? timeout)
The input.
timeoutTimeSpan?The timeout after which the operation will be cancelled.
Returns:T
The result document.
Exceptions: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.
Implements: