Skip to content

Commit 6bc56a0

Browse files
authored
refactor: move storage contracts into Core.Primitives (#120)
1 parent d645751 commit 6bc56a0

9 files changed

Lines changed: 11 additions & 9 deletions

File tree

‎Directory.Build.props‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
<RepositoryUrl>https://github.com/managedcode/Storage</RepositoryUrl>
3030
<PackageProjectUrl>https://github.com/managedcode/Storage</PackageProjectUrl>
3131
<Product>Managed Code - Storage</Product>
32-
<Version>10.0.9</Version>
33-
<PackageVersion>10.0.9</PackageVersion>
32+
<Version>10.0.10</Version>
33+
<PackageVersion>10.0.10</PackageVersion>
3434

3535
</PropertyGroup>
3636

‎ManagedCode.Storage.Core/AGENTS.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,5 @@ Parent: `../AGENTS.md`
5151
- Treat `IStorage`, `IStorageProvider`, and factory abstractions as public contracts; changing them is an ask-first API change.
5252
- Keep shared helpers vendor-agnostic; SDK-specific behavior belongs in provider projects, not in Core.
5353
- Preserve keyed and default storage resolution semantics because VFS, server integrations, and Orleans depend on them.
54+
55+
- Shared low-level storage contracts and value types belong in `ManagedCode.Storage.Core.Primitives`; do not introduce a generic `Objects` namespace.

ManagedCode.Storage.Core/Objects/IObjectStorage.cs renamed to ManagedCode.Storage.Core/Primitives/IObjectStorage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Threading;
55
using System.Threading.Tasks;
66

7-
namespace ManagedCode.Storage.Core.Objects;
7+
namespace ManagedCode.Storage.Core.Primitives;
88

99
/// <summary>Optional atomic object operations. Providers must enforce conditions server-side.</summary>
1010
public interface IObjectStorage

ManagedCode.Storage.Core/Objects/StorageObjectModels.cs renamed to ManagedCode.Storage.Core/Primitives/StorageObjectModels.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33

4-
namespace ManagedCode.Storage.Core.Objects;
4+
namespace ManagedCode.Storage.Core.Primitives;
55

66
public sealed record StorageContainerInfo(string ETag, bool IsPrivate, IReadOnlyDictionary<string, string> Metadata);
77

‎Storages/ManagedCode.Storage.Azure/AzureObjectOperations.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using Azure.Storage.Blobs;
99
using Azure.Storage.Blobs.Models;
1010
using Azure.Storage.Blobs.Specialized;
11-
using ManagedCode.Storage.Core.Objects;
11+
using ManagedCode.Storage.Core.Primitives;
1212

1313
namespace ManagedCode.Storage.Azure;
1414

‎Storages/ManagedCode.Storage.Azure/AzureStorage.ObjectOperations.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.IO;
44
using System.Threading;
55
using System.Threading.Tasks;
6-
using ManagedCode.Storage.Core.Objects;
6+
using ManagedCode.Storage.Core.Primitives;
77

88
namespace ManagedCode.Storage.Azure;
99

‎Storages/ManagedCode.Storage.Azure/AzureStorage.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
namespace ManagedCode.Storage.Azure;
2121

2222
public partial class AzureStorage(IAzureStorageOptions options, ILogger<AzureStorage>? logger = default)
23-
: BaseStorage<BlobContainerClient, IAzureStorageOptions>(options), IAzureStorage, ManagedCode.Storage.Core.Objects.IMultipartObjectStorage
23+
: BaseStorage<BlobContainerClient, IAzureStorageOptions>(options), IAzureStorage, ManagedCode.Storage.Core.Primitives.IMultipartObjectStorage
2424
{
2525
private static readonly StorageTransferOptions DefaultUploadTransferOptions = new()
2626
{

‎Tests/ManagedCode.Storage.Tests/Storages/Azure/AzureObjectStorageTests.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Threading.Tasks;
66
using ManagedCode.Storage.Azure;
77
using ManagedCode.Storage.Azure.Options;
8-
using ManagedCode.Storage.Core.Objects;
8+
using ManagedCode.Storage.Core.Primitives;
99
using ManagedCode.Storage.Tests.Common;
1010
using ManagedCode.Storage.VirtualFileSystem.Extensions;
1111
using ManagedCode.Storage.VirtualFileSystem.Core;

‎docs/Architecture.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Single source of truth: keep this doc navigational and coarse. Detailed behavior
1616
## Atomic object capabilities
1717

1818
`IStorage` retains its existing portable API. AzureStorage additionally implements
19-
`IObjectStorage` and `IMultipartObjectStorage` from Core. Consumers acquire these
19+
`IObjectStorage` and `IMultipartObjectStorage` from `ManagedCode.Storage.Core.Primitives`. Consumers acquire these
2020
capabilities with `RequireObjectStorage` / `RequireMultipartStorage`; unsupported
2121
providers fail explicitly rather than approximating atomic conditions. No Azure
2222
SDK models appear in these capability contracts. `AzureStorageConnection.Create`

0 commit comments

Comments
 (0)