public sealed record DesktopContentType : IEquatable<DesktopContentType> A content type the desktop knows, such as a MIME type, with its description and relations.
Parameters
IdThe platform's identifier of the type.
Exceptions
ArgumentExceptionAn identifier is empty or contains NUL.
Remarks
On Linux DesktopContentType.Id is the canonical MIME type from the shared MIME-info database, such as text/plain, inode/directory or x-scheme-handler/https, and equals DesktopContentType.MimeType. Windows identifies a type by its MIME type when the registry maps that type back to the same extension, else by its extension, such as .txt; macOS by its uniform type identifier, such as public.plain-text. x-scheme-handler/<scheme> names a URL scheme on every platform.
Constructors
DesktopContentType
public DesktopContentType(string Id) A content type the desktop knows, such as a MIME type, with its description and relations.
Parameters
IdThe platform's identifier of the type.
Exceptions
ArgumentExceptionAn identifier is empty or contains NUL.
Remarks
On Linux DesktopContentType.Id is the canonical MIME type from the shared MIME-info database, such as text/plain, inode/directory or x-scheme-handler/https, and equals DesktopContentType.MimeType. Windows identifies a type by its MIME type when the registry maps that type back to the same extension, else by its extension, such as .txt; macOS by its uniform type identifier, such as public.plain-text. x-scheme-handler/<scheme> names a URL scheme on every platform.
Properties
Description
public string? Description { get; init; } A description of the type in the user's language, such as "PNG image", when the desktop has one.
Extensions
public ImmutableArray<string> Extensions { get; init; } File name extensions without the dot, such as png, main extension first, when the desktop knows them.
IconName
public string? IconName { get; init; } The name of the type's icon in the desktop's icon theme, when the desktop names one.
Id
public string Id { get; init; } The platform's identifier of the type.
MimeType
public string? MimeType { get; init; } The MIME type, when the type has one; on Linux the same as DesktopContentType.Id.
Parents
public ImmutableArray<string> Parents { get; init; } The identifiers of the types this type is also an instance of, nearest first, such as text/plain and application/octet-stream for text/x-csrc.