IFormatProvider<T>
Contract for format providers that import/export documents via streams and expose capabilities and extensions.
Definition
Namespace:Telerik.Windows.Documents.Common.FormatProviders
Assembly:Telerik.Windows.Documents.Core.dll
Type Parameters:
T
Syntax:
public interface IFormatProvider<T>
Derived Classes:
Properties
Gets a value indicating whether this provider supports export.
bool CanExport { get; }
The value indicating whether can export.
Gets a value indicating whether this provider supports import.
bool CanImport { get; }
The value indicating whether can import.
Gets the file extensions supported by this provider.
IEnumerable<string> SupportedExtensions { get; }
The supported extensions.
Methods
Exports the document to the output stream with an optional timeout.
void Export(T document, Stream output, TimeSpan? timeout)
The document.
outputStreamThe output stream.
timeoutTimeSpan?The timeout after which the operation will be cancelled.
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.
Imports a document from the input stream with an optional timeout and returns the parsed document.
T Import(Stream input, TimeSpan? timeout)
The input stream.
timeoutTimeSpan?The timeout after which the operation will be cancelled.
Returns:T
The imported 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.