Class FileTypeProfile
This class is a collection of data that's required to build up an XML chunk for file type information override
Inheritance
Implements
Inherited Members
Namespace: Sdl.FileTypeSupport.Framework.IntegrationApi
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public sealed class FileTypeProfile : IExtensibleDataObject
Constructors
FileTypeProfile()
Declaration
public FileTypeProfile()
Properties
Description
Descriptive text for the file type definition.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Expression
This regular expression is applied to the file name to determine if it matches, when the file is about to be opened. It provides more control than the wildcard name that is used in the open dialog.
If this property is null, the FileDialogWildcardExpression is used instead.
Declaration
public Regex Expression { get; set; }
Property Value
Type | Description |
---|---|
System.Text.RegularExpressions.Regex |
ExtensionData
ExtensionData stores data not in the contract and allows round tripping between different versions.
Declaration
public ExtensionDataObject ExtensionData { get; set; }
Property Value
Type | Description |
---|---|
System.Runtime.Serialization.ExtensionDataObject |
FileDialogWildcardExpression
The wildcard expression shows up with the file type name in File Open dialogs.
This is used both for displaying and for filtering file types in the file dialog.
Declaration
public string FileDialogWildcardExpression { get; set; }
Property Value
Type | Description |
---|---|
System.String |
FileTypeDefinitionId
Unique file type definition identifier. The convention is to use the following format: "[Document Type] [Document Type Version] v [File Type Definition version]", where the file type definition version is a four digit version number. Example: "SDL XLIFF 1.0 v 1.0.0.0", for version 1.0.0.0 of the file type definition for the SDL XLIFF file format, version 1.0, or "Microsoft Word 2007 v 1.1.0.0", and so on.
Declaration
public string FileTypeDefinitionId { get; set; }
Property Value
Type | Description |
---|---|
System.String |
FileTypeDocumentName
Friendly name of the type of an individual file of this file type. This is used when referring to a single item, e.g. in a File Save As dialog.
Declaration
public string FileTypeDocumentName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
FileTypeDocumentsName
Friendly name of a set of files of this file type. This name is used when referring to a collection of files, e.g. in a File Open dialog.
Declaration
public string FileTypeDocumentsName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
FileTypeName
Friendly name for the file type, which may be shown to the user.
Declaration
public string FileTypeName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IconContent
Icon base-64 content.
Declaration
public string IconContent { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
If null then the icon from the underlying file type definition would be used.
IsStandardCustomization
Returns true when FileTypeProfile is used to override Standard File Type Definition rather than creating custom one.
Declaration
public bool IsStandardCustomization { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
ApplyProfile(IFileTypeDefinition, FileTypeProfile)
Applies the profile to the provided file type definition
Declaration
public static void ApplyProfile(IFileTypeDefinition fileTypeDefinition, FileTypeProfile fileTypeProfile)
Parameters
Type | Name | Description |
---|---|---|
IFileTypeDefinition | fileTypeDefinition | The file type definition to override with the profile. |
FileTypeProfile | fileTypeProfile | The profile to use. |
GetFileTypeProfile(String)
Gets the file type profile from the given file type profile xml.
Declaration
public static FileTypeProfile GetFileTypeProfile(string fileTypeProfileXml)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileTypeProfileXml | file type profile xml |
Returns
Type | Description |
---|---|
FileTypeProfile | file type profile |
GetFileTypeProfileXml(FileTypeProfile)
Gets the file type profile xml from the given file type profile.
Declaration
public static string GetFileTypeProfileXml(FileTypeProfile fileTypeProfile)
Parameters
Type | Name | Description |
---|---|---|
FileTypeProfile | fileTypeProfile | file type profile |
Returns
Type | Description |
---|---|
System.String | file type profile xml |