Search Results for

    Show / Hide Table of Contents

    Interface IDependencyFileProperties

    Information on a dependency file used during file conversion.

    Inherited Members
    System.ICloneable.Clone()
    Namespace: Sdl.FileTypeSupport.Framework.NativeApi
    Assembly: Sdl.FileTypeSupport.Framework.Core.dll
    Syntax
    public interface IDependencyFileProperties : ICloneable
    Remarks

    Some examples of dependency files include:

    Dependency files are not processed for localizable content.

    Information on dependency files is particularly important when moving bilingual documents between systems (or even between different locations on the same system). After saving a bilingual document LinkedDependencyFiles, this contains information on which dependency files (if any) were explicitly linked rather than embedded in the bilingual file.

    Properties

    CurrentFilePath

    The current path to the dependency file

    Declaration
    string CurrentFilePath { get; set; }
    Property Value
    Type Description
    System.String

    Description

    Optional clear text description of the file. This can be used e.g. to explain the origin and purpose of the file to other users and developers.

    Declaration
    string Description { get; set; }
    Property Value
    Type Description
    System.String

    DisposableObject

    This property can be used to hold a reference to a disposable object, such as a temp file that should be deleted when it has no more references. (optional)

    Declaration
    IDisposable DisposableObject { get; set; }
    Property Value
    Type Description
    System.IDisposable
    Remarks

    You can assign a temp file object with a finalizer that deletes the temp file to this property, and the file should be kept alive as long as anyone has a reference to it (unless, of course, someone explicitly calls Dispose on it).

    Normally, users should NOT explicitly invoke Dispose on this object, as it may still be referenced by others. The IDisposable interface is used here mainly to indicate that the object is expected to do some clean-up work at some point when it is no longer needed.

    This property is (for obvious reasons) not serialized.

    ExpectedUsage

    Expected usage for this dependency file (optional)

    Declaration
    DependencyFileUsage ExpectedUsage { get; set; }
    Property Value
    Type Description
    DependencyFileUsage
    Remarks

    This does not limit the possible usage of the file, it merely serves as a hint on what it is used for.

    FileExists

    True if the CurrentFilePath references a file that exists.

    Declaration
    bool FileExists { get; }
    Property Value
    Type Description
    System.Boolean

    Id

    Id associated with this dependency file. (optional)

    Declaration
    string Id { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Can be used by related file type components to ensure that they pick the right file to use for the right purpose.

    To avoid interference between unrelated components working together it is recommended to use a URI as the id.

    OriginalFilePath

    The original path of the dependency file (if known)

    Declaration
    string OriginalFilePath { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Temporarily generated dependency files may not have an original file path.

    OriginalLastChangeDate

    The timestamp (the last change date) of the original dependency file (if known)

    Declaration
    DateTime OriginalLastChangeDate { get; set; }
    Property Value
    Type Description
    System.DateTime

    PathRelativeToConverted

    If the file is a direct dependency of the file being converted, and it is linked rather than embedded, then this property may contain the path to the linked dependency file relative to the .sdlxliff file that refers to it.

    Declaration
    string PathRelativeToConverted { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    This property can be null if no relative path should be associated with this dependency.

    PreferredLinkage

    Indicates the preferred way of handling this file when writing intermediate bilingual content. (optional)

    Declaration
    DependencyFileLinkOption PreferredLinkage { get; set; }
    Property Value
    Type Description
    DependencyFileLinkOption
    Remarks

    Set this value e.g. to specifically request that the dependency file gets referenced as an external link rather than being embedded when saving to an intermediate bilingual format such as SDL XLIFF.

    Note that this serves as a recommendation only, the writer is not required to honor this setting. For some file formats it may e.g. not be possible to embed dependency files. The host application needs to check the properties of the writer after conversion to find out which external dependencies it produced.

    ZippedCurrentFile

    A FileJanitor instance managing the lifetime of a temporary .zip file containing a copy of the file stored in CurrentFilePath.

    Declaration
    FileJanitor ZippedCurrentFile { get; }
    Property Value
    Type Description
    FileJanitor
    Remarks

    The zipped file is generated on demand, and will also be deleted during garbage collection.

    On this page

    • Properties
      • CurrentFilePath
      • Description
      • DisposableObject
      • ExpectedUsage
      • FileExists
      • Id
      • OriginalFilePath
      • OriginalLastChangeDate
      • PathRelativeToConverted
      • PreferredLinkage
      • ZippedCurrentFile
    Back to top Generated by DocFX