From 3a815f7fdfba0e1ee5cc51053d0fd954c9bdb9ec Mon Sep 17 00:00:00 2001 From: nhu1997 Date: Tue, 22 Oct 2024 13:21:58 -0700 Subject: [PATCH] update code format Signed-off-by: nhu1997 --- src/OrasProject.Oras/Oci/MediaType.cs | 28 ++++++++++---------- src/OrasProject.Oras/Pack.cs | 8 +++--- src/OrasProject.Oras/PackManifestOptions.cs | 29 ++++++++++++++------- 3 files changed, 37 insertions(+), 28 deletions(-) diff --git a/src/OrasProject.Oras/Oci/MediaType.cs b/src/OrasProject.Oras/Oci/MediaType.cs index b656218..9fe5456 100644 --- a/src/OrasProject.Oras/Oci/MediaType.cs +++ b/src/OrasProject.Oras/Oci/MediaType.cs @@ -80,21 +80,21 @@ public static class MediaType /// compressed layers referenced by the manifest but with distribution /// restrictions. /// - public const string ImageLayerNonDistributableZstd = "application/vnd.oci.image.layer.nondistributable.v1.tar+zstd"; - - /// + public const string ImageLayerNonDistributableZstd = "application/vnd.oci.image.layer.nondistributable.v1.tar+zstd"; + + /// /// MediaTypeUnknownConfig is the default config mediaType used - /// - for [Pack] when PackOptions.PackImageManifest is true and - /// PackOptions.ConfigDescriptor is not specified. - /// - for [PackManifest] when packManifestVersion is PackManifestVersion1_0 - /// and PackManifestOptions.ConfigDescriptor is not specified. - /// - public const string MediaTypeUnknownConfig = "application/vnd.unknown.config.v1+json"; - - /// + /// - for [Pack] when PackOptions.PackImageManifest is true and + /// PackOptions.ConfigDescriptor is not specified. + /// - for [PackManifest] when packManifestVersion is PackManifestVersion1_0 + /// and PackManifestOptions.ConfigDescriptor is not specified. + /// + public const string MediaTypeUnknownConfig = "application/vnd.unknown.config.v1+json"; + + /// /// MediaTypeUnknownArtifact is the default artifactType used for [Pack] - /// when PackOptions.PackImageManifest is false and artifactType is - /// not specified. - /// + /// when PackOptions.PackImageManifest is false and artifactType is + /// not specified. + /// public const string MediaTypeUnknownArtifact = "application/vnd.unknown.artifact.v1"; } diff --git a/src/OrasProject.Oras/Pack.cs b/src/OrasProject.Oras/Pack.cs index a32b85c..1b2c952 100644 --- a/src/OrasProject.Oras/Pack.cs +++ b/src/OrasProject.Oras/Pack.cs @@ -35,10 +35,10 @@ public static class Pack /// Reference: https://www.rfc-editor.org/rfc/rfc3339#section-5.6 /// public const string ErrInvalidDateTimeFormat = "invalid date and time format"; - // ErrMissingArtifactType is returned by [PackManifest] when - // packManifestVersion is PackManifestVersion1_1 and artifactType is - // empty and the config media type is set to - // "application/vnd.oci.empty.v1+json". + // ErrMissingArtifactType is returned by [PackManifest] when + // packManifestVersion is PackManifestVersion1_1 and artifactType is + // empty and the config media type is set to + // "application/vnd.oci.empty.v1+json". public const string ErrMissingArtifactType = "missing artifact type"; /// diff --git a/src/OrasProject.Oras/PackManifestOptions.cs b/src/OrasProject.Oras/PackManifestOptions.cs index 0fd439b..87122b3 100644 --- a/src/OrasProject.Oras/PackManifestOptions.cs +++ b/src/OrasProject.Oras/PackManifestOptions.cs @@ -8,26 +8,35 @@ namespace OrasProject.Oras.Oci; public class PackManifestOptions { - // Config is references a configuration object for a container, by digest - // For more details: https://github.com/opencontainers/image-spec/blob/v1.1.0/manifest.md#:~:text=This%20REQUIRED%20property%20references,of%20the%20reference%20code. + /// + /// Config is references a configuration object for a container, by digest + /// For more details: https://github.com/opencontainers/image-spec/blob/v1.1.0/manifest.md#:~:text=This%20REQUIRED%20property%20references,of%20the%20reference%20code. + /// public Descriptor? Config { get; set; } - // Layers is the layers of the manifest - // For more details: https://github.com/opencontainers/image-spec/blob/v1.1.0/manifest.md#:~:text=Each%20item%20in,the%20layers. + /// + /// Layers is the layers of the manifest + /// For more details: https://github.com/opencontainers/image-spec/blob/v1.1.0/manifest.md#:~:text=Each%20item%20in,the%20layers. + /// public IList? Layers { get; set; } - // Subject is the subject of the manifest. - // This option is only valid when PackManifestVersion is - // NOT PackManifestVersion1_0. - // For more details: + /// + /// Subject is the subject of the manifest. + /// This option is only valid when PackManifestVersion is + /// NOT PackManifestVersion1_0. + /// public Descriptor? Subject { get; set; } - // ManifestAnnotations is OPTIONAL property contains arbitrary metadata for the image manifest + /// + /// ManifestAnnotations is OPTIONAL property contains arbitrary metadata for the image manifest // MUST use the annotation rules + /// public IDictionary? ManifestAnnotations { get; set; } - // ConfigAnnotations is the annotation map of the config descriptor. + /// + /// ConfigAnnotations is the annotation map of the config descriptor. // This option is valid only when Config is null. + /// public IDictionary? ConfigAnnotations { get; set; } }