Class MediaTypes
Utility class for official CycloneDX Media Types
Inherited Members
Namespace: CycloneDX
Assembly: CycloneDX.Core.dll
Syntax
public static class MediaTypes
Properties
| Edit this page View SourceJson
The officially IANA registered media type for CycloneDX JSON files.
Declaration
public static string Json { get; }
Property Value
Type | Description |
---|---|
string |
|
Protobuf
The official media type for CycloneDX Protocol Buffer files.
Declaration
public static string Protobuf { get; }
Property Value
Type | Description |
---|---|
string |
|
Xml
The officially IANA registered media type for CycloneDX XML files.
Declaration
public static string Xml { get; }
Property Value
Type | Description |
---|---|
string |
|
Methods
| Edit this page View SourceGetMediaType(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. |
Returns
Type | Description |
---|---|
string |
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. |
SpecificationVersion | specificationVersion | The CycloneDX specification version. i.e. |
Returns
Type | Description |
---|---|
string |