From 6debbd65a3d224b3c3925a1ed8591cd5484bb554 Mon Sep 17 00:00:00 2001 From: Shiwei Zhang Date: Tue, 26 Dec 2023 19:26:48 +0800 Subject: [PATCH] refactor!: rename namespaces to prefix OrasProject.Oras (#76) Signed-off-by: Shiwei Zhang --- Oras.sln => OrasProject.Oras.sln | 56 +++++++++---------- .../Constants/DockerMediaTypes.cs | 2 +- .../Constants/OCIMediaTypes .cs | 2 +- src/OrasProject.Oras/Content/Content.cs | 14 ++--- src/OrasProject.Oras/Content/DigestUtility.cs | 4 +- src/OrasProject.Oras/Copy.cs | 8 +-- .../Exceptions/AlreadyExistsException.cs | 2 +- .../InvalidDescriptorSizeException.cs | 2 +- .../Exceptions/InvalidDigestException.cs | 2 +- .../Exceptions/InvalidReferenceException.cs | 2 +- .../Exceptions/MismatchedDigestException.cs | 2 +- .../Exceptions/MissingReferenceException.cs | 2 +- .../Exceptions/NotFoundException.cs | 2 +- .../Exceptions/SizeExceedsLimitException.cs | 2 +- .../Exceptions/UnsupportedException.cs | 2 +- .../Exceptions/UnsupportedVersionException.cs | 2 +- src/OrasProject.Oras/Interfaces/IDeleter.cs | 4 +- src/OrasProject.Oras/Interfaces/IFetcher.cs | 4 +- .../Interfaces/IReadOnlyStorage.cs | 4 +- .../Interfaces/IReadOnlyTarget.cs | 2 +- src/OrasProject.Oras/Interfaces/IResolver.cs | 4 +- src/OrasProject.Oras/Interfaces/IStorage.cs | 4 +- .../Interfaces/ITagResolver.cs | 2 +- src/OrasProject.Oras/Interfaces/ITagger.cs | 4 +- src/OrasProject.Oras/Interfaces/ITarget.cs | 2 +- .../Interfaces/Registry/IBlobStore.cs | 2 +- .../Interfaces/Registry/IManifestStore.cs | 2 +- .../Interfaces/Registry/IReferenceFetcher.cs | 4 +- .../Interfaces/Registry/IReferencePusher.cs | 4 +- .../Interfaces/Registry/IRegistry.cs | 2 +- .../Interfaces/Registry/IRepository.cs | 2 +- .../Interfaces/Registry/IRepositoryOption.cs | 4 +- .../Interfaces/Registry/ITagLister.cs | 2 +- src/OrasProject.Oras/Memory/MemoryGraph.cs | 8 +-- src/OrasProject.Oras/Memory/MemoryStorage.cs | 10 ++-- .../Memory/MemoryTagResolver.cs | 8 +-- src/OrasProject.Oras/Memory/MemoryTarget.cs | 8 +-- src/OrasProject.Oras/Models/Descriptor.cs | 2 +- src/OrasProject.Oras/Models/Index.cs | 2 +- src/OrasProject.Oras/Models/Manifest.cs | 2 +- .../Models/MinimumDescriptor.cs | 2 +- src/OrasProject.Oras/OrasProject.Oras.csproj | 2 +- .../Remote/Auth/HttpClientWithBasicAuth.cs | 2 +- src/OrasProject.Oras/Remote/ErrorUtility.cs | 2 +- .../Remote/HttpClientExtensions.cs | 2 +- src/OrasProject.Oras/Remote/LinkUtility.cs | 2 +- .../Remote/ManifestUtility.cs | 6 +- src/OrasProject.Oras/Remote/Registry.cs | 6 +- .../Remote/RemoteReference.cs | 6 +- src/OrasProject.Oras/Remote/Repository.cs | 10 ++-- src/OrasProject.Oras/Remote/ResponseTypes.cs | 2 +- src/OrasProject.Oras/Remote/URLUtiliity.cs | 2 +- .../ContentTest/ContentTest.cs | 4 +- tests/OrasProject.Oras.Tests/CopyTest.cs | 11 ++-- .../MemoryTest/MemoryTargetTest.cs | 14 ++--- ...s.csproj => OrasProject.Oras.Tests.csproj} | 0 .../RemoteTest/AuthTest.cs | 6 +- .../RemoteTest/RegistryTest.cs | 30 +++++----- .../RemoteTest/RepositoryTest.cs | 17 +++--- 59 files changed, 163 insertions(+), 161 deletions(-) rename Oras.sln => OrasProject.Oras.sln (86%) rename tests/OrasProject.Oras.Tests/{Oras.Tests.csproj => OrasProject.Oras.Tests.csproj} (100%) diff --git a/Oras.sln b/OrasProject.Oras.sln similarity index 86% rename from Oras.sln rename to OrasProject.Oras.sln index 549c1f2..4c86bf7 100644 --- a/Oras.sln +++ b/OrasProject.Oras.sln @@ -1,28 +1,28 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31903.59 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Oras.Tests", "tests\OrasProject.Oras.Tests\Oras.Tests.csproj", "{70DFCE13-53AA-4CC2-8E1A-F73A1344A0CB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrasProject.Oras", "src\OrasProject.Oras\OrasProject.Oras.csproj", "{547F152F-6F4D-4E5A-AD3A-C3BC5CDCFD27}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {70DFCE13-53AA-4CC2-8E1A-F73A1344A0CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {70DFCE13-53AA-4CC2-8E1A-F73A1344A0CB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {70DFCE13-53AA-4CC2-8E1A-F73A1344A0CB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {70DFCE13-53AA-4CC2-8E1A-F73A1344A0CB}.Release|Any CPU.Build.0 = Release|Any CPU - {547F152F-6F4D-4E5A-AD3A-C3BC5CDCFD27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {547F152F-6F4D-4E5A-AD3A-C3BC5CDCFD27}.Debug|Any CPU.Build.0 = Debug|Any CPU - {547F152F-6F4D-4E5A-AD3A-C3BC5CDCFD27}.Release|Any CPU.ActiveCfg = Release|Any CPU - {547F152F-6F4D-4E5A-AD3A-C3BC5CDCFD27}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrasProject.Oras.Tests", "tests\OrasProject.Oras.Tests\OrasProject.Oras.Tests.csproj", "{70DFCE13-53AA-4CC2-8E1A-F73A1344A0CB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrasProject.Oras", "src\OrasProject.Oras\OrasProject.Oras.csproj", "{547F152F-6F4D-4E5A-AD3A-C3BC5CDCFD27}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {70DFCE13-53AA-4CC2-8E1A-F73A1344A0CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {70DFCE13-53AA-4CC2-8E1A-F73A1344A0CB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {70DFCE13-53AA-4CC2-8E1A-F73A1344A0CB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {70DFCE13-53AA-4CC2-8E1A-F73A1344A0CB}.Release|Any CPU.Build.0 = Release|Any CPU + {547F152F-6F4D-4E5A-AD3A-C3BC5CDCFD27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {547F152F-6F4D-4E5A-AD3A-C3BC5CDCFD27}.Debug|Any CPU.Build.0 = Debug|Any CPU + {547F152F-6F4D-4E5A-AD3A-C3BC5CDCFD27}.Release|Any CPU.ActiveCfg = Release|Any CPU + {547F152F-6F4D-4E5A-AD3A-C3BC5CDCFD27}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/OrasProject.Oras/Constants/DockerMediaTypes.cs b/src/OrasProject.Oras/Constants/DockerMediaTypes.cs index 0d3ebc0..e9067a1 100644 --- a/src/OrasProject.Oras/Constants/DockerMediaTypes.cs +++ b/src/OrasProject.Oras/Constants/DockerMediaTypes.cs @@ -1,4 +1,4 @@ -namespace Oras.Constants +namespace OrasProject.Oras.Constants { public static class DockerMediaTypes { diff --git a/src/OrasProject.Oras/Constants/OCIMediaTypes .cs b/src/OrasProject.Oras/Constants/OCIMediaTypes .cs index d734dbd..328a43f 100644 --- a/src/OrasProject.Oras/Constants/OCIMediaTypes .cs +++ b/src/OrasProject.Oras/Constants/OCIMediaTypes .cs @@ -1,4 +1,4 @@ -namespace Oras.Constants +namespace OrasProject.Oras.Constants { public static class OCIMediaTypes { diff --git a/src/OrasProject.Oras/Content/Content.cs b/src/OrasProject.Oras/Content/Content.cs index 91954b0..9b26def 100644 --- a/src/OrasProject.Oras/Content/Content.cs +++ b/src/OrasProject.Oras/Content/Content.cs @@ -1,7 +1,7 @@ -using Oras.Constants; -using Oras.Exceptions; -using Oras.Interfaces; -using Oras.Models; +using OrasProject.Oras.Exceptions; +using OrasProject.Oras.Interfaces; +using OrasProject.Oras.Models; +using OrasProject.Oras.Constants; using System; using System.Collections.Generic; using System.IO; @@ -9,9 +9,9 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; -using Index = Oras.Models.Index; +using Index = OrasProject.Oras.Models.Index; -namespace Oras.Content +namespace OrasProject.Oras.Content { public static class Content { @@ -55,7 +55,7 @@ public static async Task> SuccessorsAsync(IFetcher fetcher, De /// /// /// - public static async Task FetchAllAsync(IFetcher fetcher, Descriptor desc, CancellationToken cancellationToken) + public static async Task FetchAllAsync(IFetcher fetcher, Descriptor desc, CancellationToken cancellationToken) { var stream = await fetcher.FetchAsync(desc, cancellationToken); return await ReadAllAsync(stream, desc); diff --git a/src/OrasProject.Oras/Content/DigestUtility.cs b/src/OrasProject.Oras/Content/DigestUtility.cs index 1f384ae..8a485e3 100644 --- a/src/OrasProject.Oras/Content/DigestUtility.cs +++ b/src/OrasProject.Oras/Content/DigestUtility.cs @@ -1,9 +1,9 @@ -using Oras.Exceptions; +using OrasProject.Oras.Exceptions; using System; using System.Security.Cryptography; using System.Text.RegularExpressions; -namespace Oras.Content +namespace OrasProject.Oras.Content { internal static class DigestUtility { diff --git a/src/OrasProject.Oras/Copy.cs b/src/OrasProject.Oras/Copy.cs index 305619e..8e14bc3 100644 --- a/src/OrasProject.Oras/Copy.cs +++ b/src/OrasProject.Oras/Copy.cs @@ -1,11 +1,11 @@ -using Oras.Interfaces; -using Oras.Models; +using OrasProject.Oras.Interfaces; +using OrasProject.Oras.Models; using System; using System.Threading; using System.Threading.Tasks; -using static Oras.Content.Content; +using static OrasProject.Oras.Content.Content; -namespace Oras +namespace OrasProject.Oras { public class Copy { diff --git a/src/OrasProject.Oras/Exceptions/AlreadyExistsException.cs b/src/OrasProject.Oras/Exceptions/AlreadyExistsException.cs index ebfcb2e..05efe5b 100644 --- a/src/OrasProject.Oras/Exceptions/AlreadyExistsException.cs +++ b/src/OrasProject.Oras/Exceptions/AlreadyExistsException.cs @@ -1,6 +1,6 @@ using System; -namespace Oras.Exceptions +namespace OrasProject.Oras.Exceptions { /// /// AlreadyExistsException is thrown when a resource already exists. diff --git a/src/OrasProject.Oras/Exceptions/InvalidDescriptorSizeException.cs b/src/OrasProject.Oras/Exceptions/InvalidDescriptorSizeException.cs index cd48a19..a07caa8 100644 --- a/src/OrasProject.Oras/Exceptions/InvalidDescriptorSizeException.cs +++ b/src/OrasProject.Oras/Exceptions/InvalidDescriptorSizeException.cs @@ -1,6 +1,6 @@ using System; -namespace Oras.Exceptions +namespace OrasProject.Oras.Exceptions { /// /// InvalidDescriptorSizeException is thrown when a descriptor size is invalid. diff --git a/src/OrasProject.Oras/Exceptions/InvalidDigestException.cs b/src/OrasProject.Oras/Exceptions/InvalidDigestException.cs index 47eae63..4da6338 100644 --- a/src/OrasProject.Oras/Exceptions/InvalidDigestException.cs +++ b/src/OrasProject.Oras/Exceptions/InvalidDigestException.cs @@ -1,6 +1,6 @@ using System; -namespace Oras.Exceptions +namespace OrasProject.Oras.Exceptions { /// /// InvalidDigestException is thrown when a digest is invalid. diff --git a/src/OrasProject.Oras/Exceptions/InvalidReferenceException.cs b/src/OrasProject.Oras/Exceptions/InvalidReferenceException.cs index 815b118..7a5735d 100644 --- a/src/OrasProject.Oras/Exceptions/InvalidReferenceException.cs +++ b/src/OrasProject.Oras/Exceptions/InvalidReferenceException.cs @@ -1,6 +1,6 @@ using System; -namespace Oras.Exceptions +namespace OrasProject.Oras.Exceptions { /// /// InvalidReferenceException is thrown when the reference is invlid diff --git a/src/OrasProject.Oras/Exceptions/MismatchedDigestException.cs b/src/OrasProject.Oras/Exceptions/MismatchedDigestException.cs index 005c17b..08b0f1a 100644 --- a/src/OrasProject.Oras/Exceptions/MismatchedDigestException.cs +++ b/src/OrasProject.Oras/Exceptions/MismatchedDigestException.cs @@ -1,6 +1,6 @@ using System; -namespace Oras.Exceptions +namespace OrasProject.Oras.Exceptions { /// /// MismatchedDigestException is thrown when a digest does not match the content. diff --git a/src/OrasProject.Oras/Exceptions/MissingReferenceException.cs b/src/OrasProject.Oras/Exceptions/MissingReferenceException.cs index 3fab90e..8f1f0a6 100644 --- a/src/OrasProject.Oras/Exceptions/MissingReferenceException.cs +++ b/src/OrasProject.Oras/Exceptions/MissingReferenceException.cs @@ -1,6 +1,6 @@ using System; -namespace Oras.Exceptions +namespace OrasProject.Oras.Exceptions { /// /// MissingReferenceException is thrown when a reference is missing. diff --git a/src/OrasProject.Oras/Exceptions/NotFoundException.cs b/src/OrasProject.Oras/Exceptions/NotFoundException.cs index 2c486b9..11c991d 100644 --- a/src/OrasProject.Oras/Exceptions/NotFoundException.cs +++ b/src/OrasProject.Oras/Exceptions/NotFoundException.cs @@ -1,6 +1,6 @@ using System; -namespace Oras.Exceptions +namespace OrasProject.Oras.Exceptions { /// /// NotFoundException is thrown when a resource is not found. diff --git a/src/OrasProject.Oras/Exceptions/SizeExceedsLimitException.cs b/src/OrasProject.Oras/Exceptions/SizeExceedsLimitException.cs index cfa0baa..5115605 100644 --- a/src/OrasProject.Oras/Exceptions/SizeExceedsLimitException.cs +++ b/src/OrasProject.Oras/Exceptions/SizeExceedsLimitException.cs @@ -1,6 +1,6 @@ using System; -namespace Oras.Exceptions +namespace OrasProject.Oras.Exceptions { /// /// SizeExceedsLimitException is thrown when a size exceeds the limit. diff --git a/src/OrasProject.Oras/Exceptions/UnsupportedException.cs b/src/OrasProject.Oras/Exceptions/UnsupportedException.cs index 1d7fa7e..99bf294 100644 --- a/src/OrasProject.Oras/Exceptions/UnsupportedException.cs +++ b/src/OrasProject.Oras/Exceptions/UnsupportedException.cs @@ -1,6 +1,6 @@ using System; -namespace Oras.Exceptions +namespace OrasProject.Oras.Exceptions { /// /// UnsupportedException is thrown when a feature is not supported. diff --git a/src/OrasProject.Oras/Exceptions/UnsupportedVersionException.cs b/src/OrasProject.Oras/Exceptions/UnsupportedVersionException.cs index 5b7857d..3c15723 100644 --- a/src/OrasProject.Oras/Exceptions/UnsupportedVersionException.cs +++ b/src/OrasProject.Oras/Exceptions/UnsupportedVersionException.cs @@ -1,6 +1,6 @@ using System; -namespace Oras.Exceptions +namespace OrasProject.Oras.Exceptions { public class UnsupportedVersionException : Exception { diff --git a/src/OrasProject.Oras/Interfaces/IDeleter.cs b/src/OrasProject.Oras/Interfaces/IDeleter.cs index 8c46404..a8220fd 100644 --- a/src/OrasProject.Oras/Interfaces/IDeleter.cs +++ b/src/OrasProject.Oras/Interfaces/IDeleter.cs @@ -1,8 +1,8 @@ -using Oras.Models; +using OrasProject.Oras.Models; using System.Threading; using System.Threading.Tasks; -namespace Oras.Interfaces +namespace OrasProject.Oras.Interfaces { /// /// IDeleter removes content. diff --git a/src/OrasProject.Oras/Interfaces/IFetcher.cs b/src/OrasProject.Oras/Interfaces/IFetcher.cs index e63511c..ed2e634 100644 --- a/src/OrasProject.Oras/Interfaces/IFetcher.cs +++ b/src/OrasProject.Oras/Interfaces/IFetcher.cs @@ -1,9 +1,9 @@ -using Oras.Models; +using OrasProject.Oras.Models; using System.IO; using System.Threading; using System.Threading.Tasks; -namespace Oras.Interfaces +namespace OrasProject.Oras.Interfaces { /// /// IFetcher fetches content. diff --git a/src/OrasProject.Oras/Interfaces/IReadOnlyStorage.cs b/src/OrasProject.Oras/Interfaces/IReadOnlyStorage.cs index ccb2af2..5f191d3 100644 --- a/src/OrasProject.Oras/Interfaces/IReadOnlyStorage.cs +++ b/src/OrasProject.Oras/Interfaces/IReadOnlyStorage.cs @@ -1,8 +1,8 @@ -using Oras.Models; +using OrasProject.Oras.Models; using System.Threading; using System.Threading.Tasks; -namespace Oras.Interfaces +namespace OrasProject.Oras.Interfaces { /// /// IReadOnlyStorage represents a read-only Storage. diff --git a/src/OrasProject.Oras/Interfaces/IReadOnlyTarget.cs b/src/OrasProject.Oras/Interfaces/IReadOnlyTarget.cs index f7ada16..ad6948e 100644 --- a/src/OrasProject.Oras/Interfaces/IReadOnlyTarget.cs +++ b/src/OrasProject.Oras/Interfaces/IReadOnlyTarget.cs @@ -1,4 +1,4 @@ -namespace Oras.Interfaces +namespace OrasProject.Oras.Interfaces { /// /// IReadOnlyTarget represents a read-only Target. diff --git a/src/OrasProject.Oras/Interfaces/IResolver.cs b/src/OrasProject.Oras/Interfaces/IResolver.cs index 73dc57e..1f0f40f 100644 --- a/src/OrasProject.Oras/Interfaces/IResolver.cs +++ b/src/OrasProject.Oras/Interfaces/IResolver.cs @@ -1,8 +1,8 @@ -using Oras.Models; +using OrasProject.Oras.Models; using System.Threading; using System.Threading.Tasks; -namespace Oras.Interfaces +namespace OrasProject.Oras.Interfaces { /// /// IResolver resolves reference tags. diff --git a/src/OrasProject.Oras/Interfaces/IStorage.cs b/src/OrasProject.Oras/Interfaces/IStorage.cs index 522201a..19cfaa6 100644 --- a/src/OrasProject.Oras/Interfaces/IStorage.cs +++ b/src/OrasProject.Oras/Interfaces/IStorage.cs @@ -1,9 +1,9 @@ -using Oras.Models; +using OrasProject.Oras.Models; using System.IO; using System.Threading; using System.Threading.Tasks; -namespace Oras.Interfaces +namespace OrasProject.Oras.Interfaces { /// /// IStorage represents a content-addressable storage (CAS) where contents are accessed via Descriptors. diff --git a/src/OrasProject.Oras/Interfaces/ITagResolver.cs b/src/OrasProject.Oras/Interfaces/ITagResolver.cs index cae2cfd..3ec6865 100644 --- a/src/OrasProject.Oras/Interfaces/ITagResolver.cs +++ b/src/OrasProject.Oras/Interfaces/ITagResolver.cs @@ -1,4 +1,4 @@ -namespace Oras.Interfaces +namespace OrasProject.Oras.Interfaces { /// /// ITagResolver provides reference tag indexing services. diff --git a/src/OrasProject.Oras/Interfaces/ITagger.cs b/src/OrasProject.Oras/Interfaces/ITagger.cs index c3146a0..044087d 100644 --- a/src/OrasProject.Oras/Interfaces/ITagger.cs +++ b/src/OrasProject.Oras/Interfaces/ITagger.cs @@ -1,8 +1,8 @@ -using Oras.Models; +using OrasProject.Oras.Models; using System.Threading; using System.Threading.Tasks; -namespace Oras.Interfaces +namespace OrasProject.Oras.Interfaces { /// /// ITagger tags reference tags diff --git a/src/OrasProject.Oras/Interfaces/ITarget.cs b/src/OrasProject.Oras/Interfaces/ITarget.cs index d836e1f..19ab198 100644 --- a/src/OrasProject.Oras/Interfaces/ITarget.cs +++ b/src/OrasProject.Oras/Interfaces/ITarget.cs @@ -1,4 +1,4 @@ -namespace Oras.Interfaces +namespace OrasProject.Oras.Interfaces { /// /// Target is a CAS with generic tags diff --git a/src/OrasProject.Oras/Interfaces/Registry/IBlobStore.cs b/src/OrasProject.Oras/Interfaces/Registry/IBlobStore.cs index cedada4..e2ae676 100644 --- a/src/OrasProject.Oras/Interfaces/Registry/IBlobStore.cs +++ b/src/OrasProject.Oras/Interfaces/Registry/IBlobStore.cs @@ -1,4 +1,4 @@ -namespace Oras.Interfaces.Registry +namespace OrasProject.Oras.Interfaces.Registry { /// /// IBlobStore is a CAS with the ability to stat and delete its content. diff --git a/src/OrasProject.Oras/Interfaces/Registry/IManifestStore.cs b/src/OrasProject.Oras/Interfaces/Registry/IManifestStore.cs index 5d73b6b..b9d3f86 100644 --- a/src/OrasProject.Oras/Interfaces/Registry/IManifestStore.cs +++ b/src/OrasProject.Oras/Interfaces/Registry/IManifestStore.cs @@ -1,4 +1,4 @@ -namespace Oras.Interfaces.Registry +namespace OrasProject.Oras.Interfaces.Registry { /// /// IManifestStore is a CAS with the ability to stat and delete its content. diff --git a/src/OrasProject.Oras/Interfaces/Registry/IReferenceFetcher.cs b/src/OrasProject.Oras/Interfaces/Registry/IReferenceFetcher.cs index d13a680..ea6030f 100644 --- a/src/OrasProject.Oras/Interfaces/Registry/IReferenceFetcher.cs +++ b/src/OrasProject.Oras/Interfaces/Registry/IReferenceFetcher.cs @@ -1,9 +1,9 @@ -using Oras.Models; +using OrasProject.Oras.Models; using System.IO; using System.Threading; using System.Threading.Tasks; -namespace Oras.Interfaces.Registry +namespace OrasProject.Oras.Interfaces.Registry { /// /// IReferenceFetcher provides advanced fetch with the tag service. diff --git a/src/OrasProject.Oras/Interfaces/Registry/IReferencePusher.cs b/src/OrasProject.Oras/Interfaces/Registry/IReferencePusher.cs index cb21b0a..7953290 100644 --- a/src/OrasProject.Oras/Interfaces/Registry/IReferencePusher.cs +++ b/src/OrasProject.Oras/Interfaces/Registry/IReferencePusher.cs @@ -1,9 +1,9 @@ -using Oras.Models; +using OrasProject.Oras.Models; using System.IO; using System.Threading; using System.Threading.Tasks; -namespace Oras.Interfaces.Registry +namespace OrasProject.Oras.Interfaces.Registry { /// /// IReferencePusher provides advanced push with the tag service. diff --git a/src/OrasProject.Oras/Interfaces/Registry/IRegistry.cs b/src/OrasProject.Oras/Interfaces/Registry/IRegistry.cs index df7a890..da7655c 100644 --- a/src/OrasProject.Oras/Interfaces/Registry/IRegistry.cs +++ b/src/OrasProject.Oras/Interfaces/Registry/IRegistry.cs @@ -2,7 +2,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Oras.Interfaces.Registry +namespace OrasProject.Oras.Interfaces.Registry { public interface IRegistry { diff --git a/src/OrasProject.Oras/Interfaces/Registry/IRepository.cs b/src/OrasProject.Oras/Interfaces/Registry/IRepository.cs index 9edeed4..82a28c5 100644 --- a/src/OrasProject.Oras/Interfaces/Registry/IRepository.cs +++ b/src/OrasProject.Oras/Interfaces/Registry/IRepository.cs @@ -1,4 +1,4 @@ -namespace Oras.Interfaces.Registry +namespace OrasProject.Oras.Interfaces.Registry { /// /// Repository is an ORAS target and an union of the blob and the manifest CASs. diff --git a/src/OrasProject.Oras/Interfaces/Registry/IRepositoryOption.cs b/src/OrasProject.Oras/Interfaces/Registry/IRepositoryOption.cs index 80b4693..781ea15 100644 --- a/src/OrasProject.Oras/Interfaces/Registry/IRepositoryOption.cs +++ b/src/OrasProject.Oras/Interfaces/Registry/IRepositoryOption.cs @@ -1,7 +1,7 @@ -using Oras.Remote; +using OrasProject.Oras.Remote; using System.Net.Http; -namespace Oras.Interfaces.Registry +namespace OrasProject.Oras.Interfaces.Registry { /// /// IRepositoryOption is used to configure a remote repository. diff --git a/src/OrasProject.Oras/Interfaces/Registry/ITagLister.cs b/src/OrasProject.Oras/Interfaces/Registry/ITagLister.cs index a273127..5577552 100644 --- a/src/OrasProject.Oras/Interfaces/Registry/ITagLister.cs +++ b/src/OrasProject.Oras/Interfaces/Registry/ITagLister.cs @@ -2,7 +2,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Oras.Interfaces.Registry +namespace OrasProject.Oras.Interfaces.Registry { /// /// ITagLister lists tags by the tag service. diff --git a/src/OrasProject.Oras/Memory/MemoryGraph.cs b/src/OrasProject.Oras/Memory/MemoryGraph.cs index 0a2c178..1862d22 100644 --- a/src/OrasProject.Oras/Memory/MemoryGraph.cs +++ b/src/OrasProject.Oras/Memory/MemoryGraph.cs @@ -1,13 +1,13 @@ -using Oras.Interfaces; -using Oras.Models; +using OrasProject.Oras.Interfaces; +using OrasProject.Oras.Models; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; -using static Oras.Content.Content; +using static OrasProject.Oras.Content.Content; -namespace Oras.Memory +namespace OrasProject.Oras.Memory { internal class MemoryGraph { diff --git a/src/OrasProject.Oras/Memory/MemoryStorage.cs b/src/OrasProject.Oras/Memory/MemoryStorage.cs index f95e59f..bba02b1 100644 --- a/src/OrasProject.Oras/Memory/MemoryStorage.cs +++ b/src/OrasProject.Oras/Memory/MemoryStorage.cs @@ -1,13 +1,13 @@ -using Oras.Exceptions; -using Oras.Interfaces; -using Oras.Models; +using OrasProject.Oras.Exceptions; +using OrasProject.Oras.Interfaces; +using OrasProject.Oras.Models; using System.Collections.Concurrent; using System.IO; using System.Threading; using System.Threading.Tasks; -using static Oras.Content.Content; +using static OrasProject.Oras.Content.Content; -namespace Oras.Memory +namespace OrasProject.Oras.Memory { internal class MemoryStorage : IStorage { diff --git a/src/OrasProject.Oras/Memory/MemoryTagResolver.cs b/src/OrasProject.Oras/Memory/MemoryTagResolver.cs index 5f3a3fc..7e09ea8 100644 --- a/src/OrasProject.Oras/Memory/MemoryTagResolver.cs +++ b/src/OrasProject.Oras/Memory/MemoryTagResolver.cs @@ -1,11 +1,11 @@ -using Oras.Exceptions; -using Oras.Interfaces; -using Oras.Models; +using OrasProject.Oras.Exceptions; +using OrasProject.Oras.Interfaces; +using OrasProject.Oras.Models; using System.Collections.Concurrent; using System.Threading; using System.Threading.Tasks; -namespace Oras.Memory +namespace OrasProject.Oras.Memory { internal class MemoryTagResolver : ITagResolver { diff --git a/src/OrasProject.Oras/Memory/MemoryTarget.cs b/src/OrasProject.Oras/Memory/MemoryTarget.cs index 2c16c76..139be9a 100644 --- a/src/OrasProject.Oras/Memory/MemoryTarget.cs +++ b/src/OrasProject.Oras/Memory/MemoryTarget.cs @@ -1,12 +1,12 @@ -using Oras.Exceptions; -using Oras.Interfaces; -using Oras.Models; +using OrasProject.Oras.Exceptions; +using OrasProject.Oras.Interfaces; +using OrasProject.Oras.Models; using System.Collections.Generic; using System.IO; using System.Threading; using System.Threading.Tasks; -namespace Oras.Memory +namespace OrasProject.Oras.Memory { public class MemoryTarget : ITarget { diff --git a/src/OrasProject.Oras/Models/Descriptor.cs b/src/OrasProject.Oras/Models/Descriptor.cs index 2ef549b..748f18b 100644 --- a/src/OrasProject.Oras/Models/Descriptor.cs +++ b/src/OrasProject.Oras/Models/Descriptor.cs @@ -2,7 +2,7 @@ using System.Text.Json.Serialization; -namespace Oras.Models +namespace OrasProject.Oras.Models { public class Descriptor { diff --git a/src/OrasProject.Oras/Models/Index.cs b/src/OrasProject.Oras/Models/Index.cs index 04143f7..9d5e435 100644 --- a/src/OrasProject.Oras/Models/Index.cs +++ b/src/OrasProject.Oras/Models/Index.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -namespace Oras.Models +namespace OrasProject.Oras.Models { public class Index { diff --git a/src/OrasProject.Oras/Models/Manifest.cs b/src/OrasProject.Oras/Models/Manifest.cs index e757214..14d6db3 100644 --- a/src/OrasProject.Oras/Models/Manifest.cs +++ b/src/OrasProject.Oras/Models/Manifest.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Text.Json.Serialization; -namespace Oras.Models +namespace OrasProject.Oras.Models { public class Manifest { diff --git a/src/OrasProject.Oras/Models/MinimumDescriptor.cs b/src/OrasProject.Oras/Models/MinimumDescriptor.cs index 2665d24..39726e4 100644 --- a/src/OrasProject.Oras/Models/MinimumDescriptor.cs +++ b/src/OrasProject.Oras/Models/MinimumDescriptor.cs @@ -2,7 +2,7 @@ using System.Text.Json.Serialization; -namespace Oras.Models +namespace OrasProject.Oras.Models { internal class MinimumDescriptor : IEquatable { diff --git a/src/OrasProject.Oras/OrasProject.Oras.csproj b/src/OrasProject.Oras/OrasProject.Oras.csproj index 40edc54..b987556 100644 --- a/src/OrasProject.Oras/OrasProject.Oras.csproj +++ b/src/OrasProject.Oras/OrasProject.Oras.csproj @@ -13,7 +13,7 @@ - <_Parameter1>Oras.Tests + <_Parameter1>OrasProject.Oras.Tests diff --git a/src/OrasProject.Oras/Remote/Auth/HttpClientWithBasicAuth.cs b/src/OrasProject.Oras/Remote/Auth/HttpClientWithBasicAuth.cs index 5acb00b..07031c0 100644 --- a/src/OrasProject.Oras/Remote/Auth/HttpClientWithBasicAuth.cs +++ b/src/OrasProject.Oras/Remote/Auth/HttpClientWithBasicAuth.cs @@ -3,7 +3,7 @@ using System.Net.Http.Headers; using System.Text; -namespace Oras.Remote.Auth +namespace OrasProject.Oras.Remote.Auth { /// /// HttpClientWithBasicAuth adds the Basic Auth Scheme to the Authorization Header diff --git a/src/OrasProject.Oras/Remote/ErrorUtility.cs b/src/OrasProject.Oras/Remote/ErrorUtility.cs index ef0a163..be77e20 100644 --- a/src/OrasProject.Oras/Remote/ErrorUtility.cs +++ b/src/OrasProject.Oras/Remote/ErrorUtility.cs @@ -2,7 +2,7 @@ using System.Net.Http; using System.Threading.Tasks; -namespace Oras.Remote +namespace OrasProject.Oras.Remote { internal class ErrorUtility { diff --git a/src/OrasProject.Oras/Remote/HttpClientExtensions.cs b/src/OrasProject.Oras/Remote/HttpClientExtensions.cs index 63c488a..8d209c6 100644 --- a/src/OrasProject.Oras/Remote/HttpClientExtensions.cs +++ b/src/OrasProject.Oras/Remote/HttpClientExtensions.cs @@ -1,6 +1,6 @@ using System.Net.Http; -namespace Oras.Remote +namespace OrasProject.Oras.Remote { internal static class HttpClientExtensions { diff --git a/src/OrasProject.Oras/Remote/LinkUtility.cs b/src/OrasProject.Oras/Remote/LinkUtility.cs index 5482c53..2999c4e 100644 --- a/src/OrasProject.Oras/Remote/LinkUtility.cs +++ b/src/OrasProject.Oras/Remote/LinkUtility.cs @@ -2,7 +2,7 @@ using System.Linq; using System.Net.Http; -namespace Oras.Remote +namespace OrasProject.Oras.Remote { internal class LinkUtility { diff --git a/src/OrasProject.Oras/Remote/ManifestUtility.cs b/src/OrasProject.Oras/Remote/ManifestUtility.cs index af6a2b4..4e5baa6 100644 --- a/src/OrasProject.Oras/Remote/ManifestUtility.cs +++ b/src/OrasProject.Oras/Remote/ManifestUtility.cs @@ -1,8 +1,8 @@ -using Oras.Constants; -using Oras.Models; +using OrasProject.Oras.Models; +using OrasProject.Oras.Constants; using System.Linq; -namespace Oras.Remote +namespace OrasProject.Oras.Remote { internal static class ManifestUtility { diff --git a/src/OrasProject.Oras/Remote/Registry.cs b/src/OrasProject.Oras/Remote/Registry.cs index 4fa7c3d..1931971 100644 --- a/src/OrasProject.Oras/Remote/Registry.cs +++ b/src/OrasProject.Oras/Remote/Registry.cs @@ -1,5 +1,5 @@ -using Oras.Exceptions; -using Oras.Interfaces.Registry; +using OrasProject.Oras.Exceptions; +using OrasProject.Oras.Interfaces.Registry; using System; using System.Net; using System.Net.Http; @@ -8,7 +8,7 @@ using System.Threading.Tasks; using static System.Web.HttpUtility; -namespace Oras.Remote +namespace OrasProject.Oras.Remote { public class Registry : IRegistry, IRepositoryOption { diff --git a/src/OrasProject.Oras/Remote/RemoteReference.cs b/src/OrasProject.Oras/Remote/RemoteReference.cs index 2d4aef2..a42a19d 100644 --- a/src/OrasProject.Oras/Remote/RemoteReference.cs +++ b/src/OrasProject.Oras/Remote/RemoteReference.cs @@ -1,10 +1,10 @@ -using Oras.Content; -using Oras.Exceptions; +using OrasProject.Oras.Content; +using OrasProject.Oras.Exceptions; using System; using System.Net.NetworkInformation; using System.Text.RegularExpressions; -namespace Oras.Remote +namespace OrasProject.Oras.Remote { public class RemoteReference { diff --git a/src/OrasProject.Oras/Remote/Repository.cs b/src/OrasProject.Oras/Remote/Repository.cs index af34353..e41334a 100644 --- a/src/OrasProject.Oras/Remote/Repository.cs +++ b/src/OrasProject.Oras/Remote/Repository.cs @@ -1,7 +1,7 @@ -using Oras.Content; -using Oras.Exceptions; -using Oras.Interfaces.Registry; -using Oras.Models; +using OrasProject.Oras.Content; +using OrasProject.Oras.Exceptions; +using OrasProject.Oras.Interfaces.Registry; +using OrasProject.Oras.Models; using System; using System.Collections.Generic; using System.IO; @@ -13,7 +13,7 @@ using System.Threading; using System.Threading.Tasks; using static System.Web.HttpUtility; -namespace Oras.Remote +namespace OrasProject.Oras.Remote { /// diff --git a/src/OrasProject.Oras/Remote/ResponseTypes.cs b/src/OrasProject.Oras/Remote/ResponseTypes.cs index 0fdf200..3e1f2e8 100644 --- a/src/OrasProject.Oras/Remote/ResponseTypes.cs +++ b/src/OrasProject.Oras/Remote/ResponseTypes.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Oras.Remote +namespace OrasProject.Oras.Remote { internal static class ResponseTypes { diff --git a/src/OrasProject.Oras/Remote/URLUtiliity.cs b/src/OrasProject.Oras/Remote/URLUtiliity.cs index 45f5b08..69c1b38 100644 --- a/src/OrasProject.Oras/Remote/URLUtiliity.cs +++ b/src/OrasProject.Oras/Remote/URLUtiliity.cs @@ -1,4 +1,4 @@ -namespace Oras.Remote +namespace OrasProject.Oras.Remote { internal static class URLUtiliity diff --git a/tests/OrasProject.Oras.Tests/ContentTest/ContentTest.cs b/tests/OrasProject.Oras.Tests/ContentTest/ContentTest.cs index 8a04981..69b1b56 100644 --- a/tests/OrasProject.Oras.Tests/ContentTest/ContentTest.cs +++ b/tests/OrasProject.Oras.Tests/ContentTest/ContentTest.cs @@ -1,8 +1,8 @@ using System.Text; using Xunit; -using static Oras.Content.Content; +using static OrasProject.Oras.Content.Content; -namespace Oras.Tests.ContentTest +namespace OrasProject.Oras.Tests.ContentTest { public class CalculateDigest { diff --git a/tests/OrasProject.Oras.Tests/CopyTest.cs b/tests/OrasProject.Oras.Tests/CopyTest.cs index a759eae..fdb0c1c 100644 --- a/tests/OrasProject.Oras.Tests/CopyTest.cs +++ b/tests/OrasProject.Oras.Tests/CopyTest.cs @@ -1,12 +1,13 @@ -using Oras.Constants; -using Oras.Memory; -using Oras.Models; +using OrasProject.Oras.Memory; +using OrasProject.Oras.Models; +using OrasProject.Oras; +using OrasProject.Oras.Constants; using System.Text; using System.Text.Json; using Xunit; -using static Oras.Content.Content; +using static OrasProject.Oras.Content.Content; -namespace Oras.Tests +namespace OrasProject.Oras.Tests { public class CopyTest { diff --git a/tests/OrasProject.Oras.Tests/MemoryTest/MemoryTargetTest.cs b/tests/OrasProject.Oras.Tests/MemoryTest/MemoryTargetTest.cs index a4a26ad..cb8fdad 100644 --- a/tests/OrasProject.Oras.Tests/MemoryTest/MemoryTargetTest.cs +++ b/tests/OrasProject.Oras.Tests/MemoryTest/MemoryTargetTest.cs @@ -1,14 +1,14 @@ -using Oras.Constants; -using Oras.Exceptions; -using Oras.Memory; -using Oras.Models; +using OrasProject.Oras.Exceptions; +using OrasProject.Oras.Memory; +using OrasProject.Oras.Models; +using OrasProject.Oras.Constants; using System.Text; using System.Text.Json; using Xunit; -using static Oras.Content.Content; -using Index = Oras.Models.Index; +using static OrasProject.Oras.Content.Content; +using Index = OrasProject.Oras.Models.Index; -namespace Oras.Tests.MemoryTest +namespace OrasProject.Oras.Tests.MemoryTest { public class MemoryTargetTest { diff --git a/tests/OrasProject.Oras.Tests/Oras.Tests.csproj b/tests/OrasProject.Oras.Tests/OrasProject.Oras.Tests.csproj similarity index 100% rename from tests/OrasProject.Oras.Tests/Oras.Tests.csproj rename to tests/OrasProject.Oras.Tests/OrasProject.Oras.Tests.csproj diff --git a/tests/OrasProject.Oras.Tests/RemoteTest/AuthTest.cs b/tests/OrasProject.Oras.Tests/RemoteTest/AuthTest.cs index 8afac9a..ec23970 100644 --- a/tests/OrasProject.Oras.Tests/RemoteTest/AuthTest.cs +++ b/tests/OrasProject.Oras.Tests/RemoteTest/AuthTest.cs @@ -1,12 +1,12 @@ using Moq; using Moq.Protected; -using Oras.Remote; -using Oras.Remote.Auth; +using OrasProject.Oras.Remote; +using OrasProject.Oras.Remote.Auth; using System.Net; using System.Text; using Xunit; -namespace Oras.Tests.RemoteTest +namespace OrasProject.Oras.Tests.RemoteTest { public class AuthTest { diff --git a/tests/OrasProject.Oras.Tests/RemoteTest/RegistryTest.cs b/tests/OrasProject.Oras.Tests/RemoteTest/RegistryTest.cs index 03454f9..b2731c4 100644 --- a/tests/OrasProject.Oras.Tests/RemoteTest/RegistryTest.cs +++ b/tests/OrasProject.Oras.Tests/RemoteTest/RegistryTest.cs @@ -1,12 +1,12 @@ using Moq; using Moq.Protected; -using Oras.Remote; +using OrasProject.Oras.Remote; using System.Net; using System.Text.Json; using System.Text.RegularExpressions; using Xunit; -namespace Oras.Tests.RemoteTest +namespace OrasProject.Oras.Tests.RemoteTest { public class RegistryTest { @@ -36,23 +36,23 @@ public async Task PingAsync() res.RequestMessage = req; if (req.Method != HttpMethod.Get && req.RequestUri?.AbsolutePath == $"/v2/") - { - res.StatusCode = HttpStatusCode.NotFound; + { + res.StatusCode = HttpStatusCode.NotFound; return res; } - if (V2Implemented) - { - res.StatusCode = HttpStatusCode.OK; - return res; - } - else - { - res.StatusCode = HttpStatusCode.NotFound; - return res; + if (V2Implemented) + { + res.StatusCode = HttpStatusCode.OK; + return res; + } + else + { + res.StatusCode = HttpStatusCode.NotFound; + return res; } }; - var registry = new Oras.Remote.Registry("localhost:5000"); + var registry = new OrasProject.Oras.Remote.Registry("localhost:5000"); registry.PlainHTTP = true; registry.HttpClient = CustomClient(func); var cancellationToken = new CancellationToken(); @@ -125,7 +125,7 @@ public async Task Repositories() }; - var registry = new Oras.Remote.Registry("localhost:5000"); + var registry = new OrasProject.Oras.Remote.Registry("localhost:5000"); registry.PlainHTTP = true; registry.HttpClient = CustomClient(func); var cancellationToken = new CancellationToken(); diff --git a/tests/OrasProject.Oras.Tests/RemoteTest/RepositoryTest.cs b/tests/OrasProject.Oras.Tests/RemoteTest/RepositoryTest.cs index 47e4e5b..a3e7cf0 100644 --- a/tests/OrasProject.Oras.Tests/RemoteTest/RepositoryTest.cs +++ b/tests/OrasProject.Oras.Tests/RemoteTest/RepositoryTest.cs @@ -1,10 +1,11 @@ using Moq; using Moq.Protected; -using Oras.Constants; -using Oras.Exceptions; -using Oras.Memory; -using Oras.Models; -using Oras.Remote; +using OrasProject.Oras.Exceptions; +using OrasProject.Oras.Memory; +using OrasProject.Oras.Models; +using OrasProject.Oras.Remote; +using OrasProject.Oras; +using OrasProject.Oras.Constants; using System.Collections.Immutable; using System.Diagnostics; using System.Net; @@ -14,10 +15,10 @@ using System.Text.RegularExpressions; using System.Web; using Xunit; -using static Oras.Content.Content; -using static Oras.Content.DigestUtility; +using static OrasProject.Oras.Content.Content; +using static OrasProject.Oras.Content.DigestUtility; -namespace Oras.Tests.RemoteTest +namespace OrasProject.Oras.Tests.RemoteTest { public class RepositoryTest {