Zero Install .NET API 2.20.0
ZeroInstall.Model.Capabilities.FileTypeExtension Class Reference

A specific file extension used to identify a file type. More...

Inheritance diagram for ZeroInstall.Model.Capabilities.FileTypeExtension:
ZeroInstall.Model.XmlUnknown NanoByte.Common.ICloneable< FileTypeExtension >

Public Member Functions

void Normalize ()
 Converts legacy elements, sets default values, etc.. More...
 
override string ToString ()
 Returns the extension in the form "Value (MimeType)". Not safe for parsing!
 
FileTypeExtension Clone ()
 Creates a deep copy of this FileTypeExtension instance. More...
 
bool Equals (FileTypeExtension? other)
 
override bool Equals (object? obj)
 
override int GetHashCode ()
 
- Public Member Functions inherited from ZeroInstall.Model.XmlUnknown
string ToShortXml ()
 Returns a shortened XML representation (with attributes but without child elements). More...
 
override int GetHashCode ()
 
- Public Member Functions inherited from NanoByte.Common.ICloneable< FileTypeExtension >
FileTypeExtension Clone ()
 

Static Public Attributes

const string TypeFolder = "folder"
 Canonical PerceivedType.
 
const string TypeText = "text"
 
const string TypeImage = "image"
 
const string TypeAudio = "audio"
 
const string TypeVideo = "video"
 
const string TypeCompressed = "compressed"
 
const string TypeDocument = "document"
 
const string TypeSystem = "system"
 
const string TypeApplication = "application"
 
const string TypeGameMedia = "gamemedia"
 
const string TypeContacts = "contacts"
 

Properties

string Value = default! [getset]
 The file extension including the leading dot (e.g., ".jpg").
 
string? MimeType [getset]
 The MIME type associated with the file extension.
 
string? PerceivedType [getset]
 Defines the broad category of file types this extension falls into. Well-known values on Windows are: folder, text, image, audio, video, compressed, document, system, application
 

Additional Inherited Members

- Public Attributes inherited from ZeroInstall.Model.XmlUnknown
XmlAttribute?[] UnknownAttributes
 Contains any unknown additional XML attributes.
 
XmlElement?[] UnknownElements
 Contains any unknown additional XML elements.
 
- Protected Member Functions inherited from ZeroInstall.Model.XmlUnknown
void EnsureAttribute (object? value, string attributeName)
 Ensures that a value deserialized from an XML attribute is set (not null). More...
 
void EnsureAttributeSafeID (string? value, string attributeName)
 Ensures that a value deserialized from an XML attribute is set (not null) and only contains alphanumeric characters, spaces ( ), dots (.), underscores (_), hyphens (-) and plus signs (+). More...
 
bool Equals (XmlUnknown? other)
 

Detailed Description

A specific file extension used to identify a file type.

Member Function Documentation

◆ Clone()

FileTypeExtension ZeroInstall.Model.Capabilities.FileTypeExtension.Clone ( )

Creates a deep copy of this FileTypeExtension instance.

Returns
The new copy of the FileTypeExtension.

◆ Normalize()

void ZeroInstall.Model.Capabilities.FileTypeExtension.Normalize ( )
inline

Converts legacy elements, sets default values, etc..

Exceptions
InvalidDataExceptionA required property is not set or invalid.

The documentation for this class was generated from the following file: