Search Results for

    Show / Hide Table of Contents

    Interface IPreviewSetsFactory

    Interface used for instantiating a set of preview types available for a specific file.

    Inherited Members
    IFileTypeDefinitionAware.FileTypeDefinition
    Namespace: Sdl.FileTypeSupport.Framework.IntegrationApi
    Assembly: Sdl.FileTypeSupport.Framework.Core.dll
    Syntax
    public interface IPreviewSetsFactory : IFileTypeDefinitionAware
    Remarks

    Normally accessed via BuildPreviewSetsFactory().

    The set of available preview types for a file type sometimes depends on the actual file itself (e.g. for TTX where the underlying file format can vary significantly). However, for most file formats the set is the same for all document instances. You can check the IsFileAgnostic property to determine if this is the case.

    Properties

    IsFileAgnostic

    Returns true if the set of previews is the same for all files that the factory applies to, in which case passing null to GetPreviewSets(IFileProperties) will yield all previews that are specifically available for this document type.

    Declaration
    bool IsFileAgnostic { get; }
    Property Value
    Type Description
    bool

    Methods

    CreatePreviewSet()

    Provides access to the creation of a new preview set.

    Declaration
    IPreviewSet CreatePreviewSet()
    Returns
    Type Description
    IPreviewSet

    CreatePreviewType<T>()

    Creates a preview type of type T. T can either be an IApplicationPreviewType or an IControlPreviewType.

    Declaration
    IPreviewType CreatePreviewType<T>()
    Returns
    Type Description
    IPreviewType
    Type Parameters
    Name Description
    T

    The type of preview type to create.

    GetPreviewSets(IFileProperties)

    Gets the set of previews that can be used with the specified file.

    Declaration
    IPreviewSets GetPreviewSets(IFileProperties fileProperties)
    Parameters
    Type Name Description
    IFileProperties fileProperties

    Properties of the file instance for which previews should be specialized, or null to get previews that are available for all files of this type.

    Returns
    Type Description
    IPreviewSets

    The preview sets available from this factory, or null if none.

    Remarks

    The file properties are used to determine available previews for file types like TTX, for which the previews depend on the underlying file format.

    For most file formats, the preview sets do not depend on the file properties.

    In this article
    • Properties
      • IsFileAgnostic
    • Methods
      • CreatePreviewSet()
      • CreatePreviewType<T>()
      • GetPreviewSets(IFileProperties)
    Back to top Generated by DocFX