Class FileTypeProfile
This class is a collection of data that's required to build up an XML chunk for file type information override
Implements
Inherited Members
Namespace: SdlSdl.FileTypeSupportFrameworkIntegrationApi
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
[DataContract(Namespace = "http://www.sdl.com/filetypesupport", Name = "FileTypeInformation")]
public sealed class FileTypeProfile : IExtensibleDataObject
Constructors
FileTypeProfile()
Declaration
public FileTypeProfile()
Properties
Description
Descriptive text for the file type definition.
Declaration
[DataMember(Name = "Description", EmitDefaultValue = false)]
public string Description { get; set; }
Property Value
Type | Description |
---|---|
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 |
---|---|
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 |
---|---|
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
[DataMember(Name = "FileDialogWildcardExpression", EmitDefaultValue = false)]
public string FileDialogWildcardExpression { get; set; }
Property Value
Type | Description |
---|---|
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
[DataMember(Name = "FileTypeDefinitionId", EmitDefaultValue = false)]
public string FileTypeDefinitionId { get; set; }
Property Value
Type | Description |
---|---|
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
[DataMember(Name = "FileTypeDocumentName", EmitDefaultValue = false)]
public string FileTypeDocumentName { get; set; }
Property Value
Type | Description |
---|---|
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
[DataMember(Name = "FileTypeDocumentsName", EmitDefaultValue = false)]
public string FileTypeDocumentsName { get; set; }
Property Value
Type | Description |
---|---|
string |
FileTypeName
Friendly name for the file type, which may be shown to the user.
Declaration
[DataMember(Name = "FileTypeName", EmitDefaultValue = false)]
public string FileTypeName { get; set; }
Property Value
Type | Description |
---|---|
string |
IconContent
Icon base-64 content.
Declaration
[DataMember(Name = "IconContent", EmitDefaultValue = false)]
public string IconContent { get; set; }
Property Value
Type | Description |
---|---|
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
[DataMember(Name = "IsStandardCustomization", EmitDefaultValue = false)]
public bool IsStandardCustomization { get; set; }
Property Value
Type | Description |
---|---|
bool |
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 |
---|---|---|
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 |
---|---|
string | file type profile xml |