Interface ITextBasedFormatProvider<T>
Contract for text-based format providers that import/export documents from/to strings.
Namespace: Telerik.Windows.Documents.Common.FormatProviders
Assembly: Telerik.Windows.Documents.Core.dll
Syntax
public interface ITextBasedFormatProvider<T>
Type Parameters
|
T
|
Methods
Export(T)
Exports the document to a text string representation.
Declaration
string Export(T document)
Parameters
|
T
document
The document. |
Returns
|
System.String
The result string. |
Export(T, Nullable<TimeSpan>)
Exports the document to a text string with an optional timeout.
Declaration
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. |
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
T Import(string input)
Parameters
|
System.String
input
The input. |
Returns
|
T
The document. |
Import(String, Nullable<TimeSpan>)
Imports a document from a text string with an optional timeout and returns the parsed document.
Declaration
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 document. |
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. |