Base for binary format providers that import/export documents from/to byte arrays and streams.
Definition
Namespace:Telerik.Windows.Documents.Common.FormatProviders
Assembly:Telerik.Windows.Documents.Core.dll
Type Parameters:
T
The type of the document.
Syntax:
public abstract class BinaryFormatProviderBase<T> : FormatProviderBase<T>, IFormatProvider<T>, IBinaryFormatProvider<T>
Inheritance: objectFormatProviderBase<T>BinaryFormatProviderBase<T>
Derived Classes:
Implements:
Inherited Members
Constructors
protected BinaryFormatProviderBase()
Methods
Exports the document to a byte array with an optional timeout.
public byte[] Export(T document, TimeSpan? timeout)
The document.
timeoutTimeSpan?The timeout after which the operation will be cancelled.
Returns:byte[]
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 byte array with an optional timeout and returns the parsed document.
[SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
public T Import(byte[] input, TimeSpan? timeout)
The input.
timeoutTimeSpan?The timeout after which the operation will be cancelled.
Returns:T
The 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: