Interface
IBinaryFormatProvider<T>

Contract for binary format providers that import/export documents from/to byte arrays.

Definition

Namespace:Telerik.Windows.Documents.Common.FormatProviders

Assembly:Telerik.Windows.Documents.Core.dll

Type Parameters:

T

Syntax:

cs-api-definition
public interface IBinaryFormatProvider<T>

Derived Classes: BinaryFormatProviderBase<T>OcrFormatProviderPdfFormatProviderDocFormatProviderDocxFormatProviderPdfFormatProvider

Methods

Export(T)

Exports the document to a byte array representation.

Declaration

cs-api-definition
[Obsolete("This method is obsolete. Please use Export(T document, TimeSpan? timeout) instead.")]
byte[] Export(T document)

Parameters

document

T

The document.

Returns

byte[]

The result byte array.

Export(T, TimeSpan?)

Exports the document to a byte array with an optional timeout.

Declaration

cs-api-definition
byte[] Export(T document, TimeSpan? timeout)

Parameters

document

T

The document.

timeout

TimeSpan?

The timeout after which the operation will be cancelled.

Returns

byte[]

The result byte array.

Exceptions

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(byte[])

Imports a document from a byte array and returns the parsed document instance.

Declaration

cs-api-definition
[Obsolete("This method is obsolete. Please use Import(byte[] input, TimeSpan? timeout) instead.")]
T Import(byte[] input)

Parameters

input

byte[]

The input.

Returns

T

The document.

Import(byte[], TimeSpan?)

Imports a document from a byte array with an optional timeout and returns the parsed document.

Declaration

cs-api-definition
T Import(byte[] input, TimeSpan? timeout)

Parameters

input

byte[]

The input.

timeout

TimeSpan?

The timeout after which the operation will be cancelled.

Returns

T

The document.

Exceptions

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.