Show / Hide Table of Contents

Class MediaTypes

Utility class for official CycloneDX Media Types

Inheritance
System.Object
MediaTypes
Namespace: CycloneDX
Assembly: CycloneDX.Core.dll
Syntax
public static class MediaTypes : object

Properties

| Improve this Doc View Source

Json

The officially IANA registered media type for CycloneDX JSON files.

Declaration
public static string Json { get; }
Property Value
Type Description
System.String

"application/vnd.cyclonedx+json"

| Improve this Doc View Source

Protobuf

The official media type for CycloneDX Protocol Buffer files.

Declaration
public static string Protobuf { get; }
Property Value
Type Description
System.String

"application/x.vnd.cyclonedx+protobuf"

| Improve this Doc View Source

Xml

The officially IANA registered media type for CycloneDX XML files.

Declaration
public static string Xml { get; }
Property Value
Type Description
System.String

"application/vnd.cyclonedx+xml"

Methods

| Improve this Doc View Source

GetMediaType(SerializationFormat)

Utility method to return the CycloneDX media type for a supported Format.

Declaration
public static string GetMediaType(SerializationFormat format)
Parameters
Type Name Description
SerializationFormat format

The CycloneDX format. i.e. Format.Xml

Returns
Type Description
System.String
| Improve this Doc View Source

GetMediaType(SerializationFormat, SpecificationVersion)

Utility method to return the CycloneDX media type with the specification version specified.

Declaration
public static string GetMediaType(SerializationFormat format, SpecificationVersion specificationVersion)
Parameters
Type Name Description
SerializationFormat format

The CycloneDX format. i.e. Format.Xml

SpecificationVersion specificationVersion

The CycloneDX specification version. i.e. SpecificationVersion.v1_3

Returns
Type Description
System.String
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX