Class TextBasedFormatProviderBase<T>
Base for text-based format providers that import and export documents from/to strings, useful when handling document text (such as PDF-derived content).
Inherited Members
Namespace: Telerik.Windows.Documents.Common.FormatProviders
Assembly: Telerik.Windows.Documents.Core.dll
Syntax
public abstract class TextBasedFormatProviderBase<T> : FormatProviderBase<T>, IFormatProvider<T>, ITextBasedFormatProvider<T>
Type Parameters
|
T
The type of the T. |
Constructors
TextBasedFormatProviderBase()
Declaration
protected TextBasedFormatProviderBase()
Methods
Export(T)
Exports the document to a text string representation.
Declaration
[Obsolete("This method is obsolete. Please use Export(T document, TimeSpan? timeout) instead.")]
public string Export(T document)
Parameters
|
T
document
The document. |
Returns
|
System.String
The result string. |
Implements
Export(T, Nullable<TimeSpan>)
Exports the document to a text string with an optional timeout.
Declaration
public string Export(T document, TimeSpan? timeout)
Parameters
|
T
document
The document. |
|
System.Nullable<System.TimeSpan>
timeout
The timeout after which the operation will be cancelled. |
Returns
|
System.String
The result string. |
Implements
Exceptions
|
System.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
[Obsolete("This method is obsolete. Please use Import(string input, TimeSpan? timeout) instead.")]
public T Import(string input)
Parameters
|
System.String
input
The input. |
Returns
|
T
The result document. |
Implements
Import(String, Nullable<TimeSpan>)
Imports a document from a text string with an optional timeout and returns the parsed document.
Declaration
public T Import(string input, TimeSpan? timeout)
Parameters
|
System.String
input
The input. |
|
System.Nullable<System.TimeSpan>
timeout
The timeout after which the operation will be cancelled. |
Returns
|
T
The result document. |
Implements
Exceptions
|
System.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. |