Class WorkbookFormatProviderBase
Base class for all workbook format providers, implementing common import and export logic with timeout and cancellation support.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Spreadsheet.FormatProviders
Assembly: Telerik.Windows.Documents.Spreadsheet.dll
Syntax
public abstract class WorkbookFormatProviderBase : IWorkbookFormatProvider
Constructors
WorkbookFormatProviderBase()
Initializes a new instance of the WorkbookFormatProviderBase class.
Declaration
protected WorkbookFormatProviderBase()
Properties
CanExport
Gets a value indicating whether this provider supports exporting workbooks to streams.
Declaration
public abstract bool CanExport { get; }
Property Value
|
System.Boolean
The value indicating whether can export. |
Implements
CanImport
Gets a value indicating whether this provider supports importing workbooks from streams.
Declaration
public abstract bool CanImport { get; }
Property Value
|
System.Boolean
The value indicating whether can import. |
Implements
FilesDescription
Gets the human-readable description of files supported by this provider, defaulting to the first extension in uppercase (e.g., "XLSX Files").
Declaration
public virtual string FilesDescription { get; }
Property Value
|
System.String
The files description. |
Implements
Name
Gets the unique identifier name of this format provider.
Declaration
public abstract string Name { get; }
Property Value
|
System.String
The name of the provider. |
Implements
SupportedExtensions
Gets the collection of file extensions supported by this provider, each including the leading dot.
Declaration
public abstract IEnumerable<string> SupportedExtensions { get; }
Property Value
|
System.Collections.Generic.IEnumerable<System.String>
The supported extensions. |
Implements
Methods
Export(Workbook, Stream)
Exports the specified workbook to the output stream, validating export capability and workbook state.
Declaration
[Obsolete("This method is obsolete. Please use Export(Workbook workbook, Stream output, TimeSpan? timeout) instead.")]
public void Export(Workbook workbook, Stream output)
Parameters
|
Workbook
workbook
The workbook. |
|
System.IO.Stream
output
The output. |
Implements
Export(Workbook, Stream, Nullable<TimeSpan>)
Exports the specified workbook to the output stream with an optional timeout, validating export capability and workbook state.
Declaration
public void Export(Workbook workbook, Stream output, TimeSpan? timeout)
Parameters
|
Workbook
workbook
The workbook. |
|
System.IO.Stream
output
The output. |
|
System.Nullable<System.TimeSpan>
timeout
The timeout after which the operation will be cancelled. |
Implements
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. |
ExportOverride(Workbook, Stream)
When overridden in a derived class, performs the format-specific export logic to serialize the workbook to the output stream.
Declaration
[Obsolete("Use ExportOverride(Workbook workbook, Stream output, CancellationToken cancellationToken) instead.")]
protected virtual void ExportOverride(Workbook workbook, Stream output)
Parameters
|
Workbook
workbook
The workbook. |
|
System.IO.Stream
output
The output. |
ExportOverride(Workbook, Stream, CancellationToken)
When overridden in a derived class, performs the format-specific export logic to serialize the workbook to the output stream with cancellation support.
Declaration
protected virtual void ExportOverride(Workbook workbook, Stream output, CancellationToken cancellationToken)
Parameters
|
Workbook
workbook
The workbook. |
|
System.IO.Stream
output
The output. |
|
System.Threading.CancellationToken
cancellationToken
The token used to cancel the operation. |
Import(Stream)
Imports a workbook from the specified stream, validating import capability, and returns the deserialized workbook instance.
Declaration
[Obsolete("This method is obsolete. Please use Import(Stream input, TimeSpan? timeout) instead.")]
public Workbook Import(Stream input)
Parameters
|
System.IO.Stream
input
The input. |
Returns
|
Workbook
The imported workbook. |
Implements
Import(Stream, Nullable<TimeSpan>)
Imports a workbook from the specified stream with an optional timeout, validating import capability, and returns the deserialized workbook instance.
Declaration
public Workbook Import(Stream input, TimeSpan? timeout)
Parameters
|
System.IO.Stream
input
The input. |
|
System.Nullable<System.TimeSpan>
timeout
The timeout after which the operation will be cancelled. |
Returns
|
Workbook
The imported workbook. |
Implements
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. |
ImportOverride(Stream)
When overridden in a derived class, performs the format-specific import logic to deserialize a workbook from the input stream.
Declaration
[Obsolete("Use ImportOverride(Stream input, CancellationToken cancellationToken) instead.")]
protected virtual Workbook ImportOverride(Stream input)
Parameters
|
System.IO.Stream
input
The input. |
Returns
|
Workbook
The imported workbook. |
ImportOverride(Stream, CancellationToken)
When overridden in a derived class, performs the format-specific import logic to deserialize a workbook from the input stream with cancellation support.
Declaration
protected virtual Workbook ImportOverride(Stream input, CancellationToken cancellationToken)
Parameters
|
System.IO.Stream
input
The input. |
|
System.Threading.CancellationToken
cancellationToken
The token used to cancel the operation. |
Returns
|
Workbook
The imported workbook. |