Interface IBinaryFormatProvider<T>
Contract for binary format providers that import/export documents from/to byte arrays.
Namespace: Telerik.Windows.Documents.Common.FormatProviders
Assembly: Telerik.Windows.Documents.Core.dll
Syntax
public interface IBinaryFormatProvider<T>
Type Parameters
|
T
|
Methods
Export(T)
Exports the document to a byte array representation.
Declaration
[Obsolete("This method is obsolete. Please use Export(T document, TimeSpan? timeout) instead.")]
byte[] Export(T document)
Parameters
|
T
document
The document. |
Returns
|
System.Byte[]
The result byte array. |
Export(T, Nullable<TimeSpan>)
Exports the document to a byte array with an optional timeout.
Declaration
byte[] 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.Byte[]
The result byte array. |
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(Byte[])
Imports a document from a byte array and returns the parsed document instance.
Declaration
[Obsolete("This method is obsolete. Please use Import(byte[] input, TimeSpan? timeout) instead.")]
T Import(byte[] input)
Parameters
|
System.Byte[]
input
The input. |
Returns
|
T
The document. |
Import(Byte[], Nullable<TimeSpan>)
Imports a document from a byte array with an optional timeout and returns the parsed document.
Declaration
T Import(byte[] input, TimeSpan? timeout)
Parameters
|
System.Byte[]
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. |