Show / Hide Table of Contents

Class MediaTypes

Utility class for official CycloneDX Media Types

Inheritance
object
MediaTypes
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: CycloneDX
Assembly: CycloneDX.Core.dll
Syntax
public static class MediaTypes

Properties

| Edit this page View Source

Json

The officially IANA registered media type for CycloneDX JSON files.

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

"application/vnd.cyclonedx+json"

| Edit this page View Source

Protobuf

The official media type for CycloneDX Protocol Buffer files.

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

"application/x.vnd.cyclonedx+protobuf"

| Edit this page View Source

Xml

The officially IANA registered media type for CycloneDX XML files.

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

"application/vnd.cyclonedx+xml"

Methods

| Edit this page 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
string
| Edit this page 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
string
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX