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 SourceJson
The officially IANA registered media type for CycloneDX JSON files.
Declaration
public static string Json { get; }
Property Value
Type | Description |
---|---|
System.String |
|
Protobuf
The official media type for CycloneDX Protocol Buffer files.
Declaration
public static string Protobuf { get; }
Property Value
Type | Description |
---|---|
System.String |
|
Xml
The officially IANA registered media type for CycloneDX XML files.
Declaration
public static string Xml { get; }
Property Value
Type | Description |
---|---|
System.String |
|
Methods
| Improve this Doc 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 |
---|---|
System.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 |
---|---|
System.String |