Search Results for

    Show / Hide Table of Contents

    Interface IFileTypeDefinitionFactory

    Factory for file type definitions. This is typically accessed from FileTypeDefinitionFactory.

    Namespace: Sdl.FileTypeSupport.Framework.IntegrationApi
    Assembly: Sdl.FileTypeSupport.Framework.Core.dll
    Syntax
    public interface IFileTypeDefinitionFactory

    Methods

    ApplyFileTypeInformation(IFileTypeDefinition, FileTypeProfile)

    Modify all or parts of the file type information in the file type definition by applying properties defined in the file type profile.

    Declaration
    void ApplyFileTypeInformation(IFileTypeDefinition definition, FileTypeProfile fileTypeProfile)
    Parameters
    Type Name Description
    IFileTypeDefinition definition

    the file type definition to be modified

    FileTypeProfile fileTypeProfile

    the file type profile

    CreateFromFile(string)

    Create a file type definition from an *.sdlfiletype file, transforming the file content if necessary to support older file type definition files.

    Declaration
    IFileTypeDefinition CreateFromFile(string filePath)
    Parameters
    Type Name Description
    string filePath
    Returns
    Type Description
    IFileTypeDefinition
    Remarks

    If the file is in an older format, the content will be adopted after it has been read, so that it can be used with this version of the framework (if possible).

    CreateFromResource(string)

    Create a file type definition from the specified path or resource, without adapting the content to support older file type definitions.

    Declaration
    IFileTypeDefinition CreateFromResource(string path)
    Parameters
    Type Name Description
    string path
    Returns
    Type Description
    IFileTypeDefinition
    Remarks

    The path can be any type of path that is supported by the factory implementation. The default factory implementation supports, for example:

    • A file on disk: C:\My Documents\MyFileType.sdlfiletype
    • An embedded resource in an assembly: assembly://MyAssembly/ResourceNamespace/ResourceId
    • A URI: http://my.company.com/my-filetype-definition

    No detection and adaptation of older file type definitions will be attempted when using this factory method.

    In this article
    • Methods
      • ApplyFileTypeInformation(IFileTypeDefinition, FileTypeProfile)
      • CreateFromFile(string)
      • CreateFromResource(string)
    Back to top Generated by DocFX