Table of Contents

Interface IFileViewer

Namespace
Acuit.Pinpoint.Workstation.ReferenceContent
Assembly
Acuit.Pinpoint.Workstation.Interfaces.dll

A reference content file viewer interface.

public interface IFileViewer

Properties

SupportedFileExtensions

Gets the collection of file extensions (including the period) that this viewer can handle (e.g., ".htm", ".html").

IEnumerable<string> SupportedFileExtensions { get; }

Property Value

IEnumerable<string>

Methods

CreateViewerAsync(string, IEnumerable<KeyValuePair<string, string>>)

Creates a viewer for a file.

Task<object> CreateViewerAsync(string fileName, IEnumerable<KeyValuePair<string, string>> parameters)

Parameters

fileName string

The file name.

parameters IEnumerable<KeyValuePair<string, string>>

Viewer-specific parameters.

Returns

Task<object>

A task that represents the asynchronous operation. The value of its Result property contains the file viewer content, which will be displayed via a ContentControl (i.e., its Content property will be set to this value).

Remarks

This will be called from the UI thread. Any WPF elements that are created for the viewer must be created from the UI thread.

If this throws an exception (either synchronously or asynchronously), the exception message will be shown as an error message where the content would be displayed.

Exceptions

Exception

The viewer could not be created due to any error, such as a corrupt file.