Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCargo.NatsDistributedCache", "src\CodeCargo.NatsDistributedCache\CodeCargo.NatsDistributedCache.csproj", "{6DA43760-9D03-493E-BA97-AB6AF4C6F8BA}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NatsDistributedCache", "src\NatsDistributedCache\NatsDistributedCache.csproj", "{6DA43760-9D03-493E-BA97-AB6AF4C6F8BA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{0C88DD14-F956-CE84-757C-A364CCF449FC}"
EndProject
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CodeCargo.NatsDistributedCache
# CodeCargo.Nats.DistributedCache

## Updating Packages

Expand Down Expand Up @@ -44,4 +44,4 @@ This will generate lock files for:
These lock files are used automatically based on the runtime identifier specified during build/restore.

**Important**: Always run this script after updating package dependencies to ensure all platform-specific lock files are
properly regenerated.
properly regenerated.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.Extensions.Logging;

namespace CodeCargo.NatsDistributedCache;
namespace CodeCargo.Nats.DistributedCache;

public partial class NatsCache
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using NATS.Client.KeyValueStore;
using NATS.Net;

namespace CodeCargo.NatsDistributedCache;
namespace CodeCargo.Nats.DistributedCache;

/// <summary>
/// Cache entry for storing in NATS Key-Value Store
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Microsoft.Extensions.Options;
using NATS.Client.Core;

namespace CodeCargo.NatsDistributedCache
namespace CodeCargo.Nats.DistributedCache
{
internal sealed class NatsCacheImpl : NatsCache
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.Extensions.Options;

namespace CodeCargo.NatsDistributedCache
namespace CodeCargo.Nats.DistributedCache
{
/// <summary>
/// Configuration options for <see cref="NatsCache"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Microsoft.Extensions.Options;
using NATS.Client.Core;

namespace CodeCargo.NatsDistributedCache
namespace CodeCargo.Nats.DistributedCache
{
/// <summary>
/// Extension methods for setting up NATS distributed cache related services in an <see cref="IServiceCollection" />.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<IsPackable>true</IsPackable>
<Nullable>enable</Nullable>
<RootNamespace>CodeCargo.NatsDistributedCache</RootNamespace>
<RootNamespace>CodeCargo.Nats.DistributedCache</RootNamespace>
<Description>NATS implementation of Microsoft.Extensions.Caching.Distributed.IDistributedCache.</Description>
<PackageTags>cache;caching;distributed;nats</PackageTags>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Microsoft.Extensions.Caching.Hybrid;
using NATS.Client.Core;

namespace CodeCargo.NatsDistributedCache;
namespace CodeCargo.Nats.DistributedCache;

public readonly struct NatsHybridCacheSerializer<T>(INatsSerialize<T> serializer, INatsDeserialize<T> deserializer)
: IHybridCacheSerializer<T>
Expand Down
2 changes: 1 addition & 1 deletion test/IntegrationTests/Cache/NatsCacheSetAndRemoveTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Text;
using Microsoft.Extensions.Caching.Distributed;

namespace CodeCargo.NatsDistributedCache.IntegrationTests.Cache;
namespace CodeCargo.Nats.DistributedCache.IntegrationTests.Cache;

public class NatsCacheSetAndRemoveTests(NatsIntegrationFixture fixture) : TestBase(fixture)
{
Expand Down
2 changes: 1 addition & 1 deletion test/IntegrationTests/Cache/TimeExpirationAsyncTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.Extensions.Caching.Distributed;

namespace CodeCargo.NatsDistributedCache.IntegrationTests.Cache;
namespace CodeCargo.Nats.DistributedCache.IntegrationTests.Cache;

public class TimeExpirationAsyncTests(NatsIntegrationFixture fixture) : TestBase(fixture)
{
Expand Down
2 changes: 1 addition & 1 deletion test/IntegrationTests/Cache/TimeExpirationTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.Extensions.Caching.Distributed;

namespace CodeCargo.NatsDistributedCache.IntegrationTests.Cache;
namespace CodeCargo.Nats.DistributedCache.IntegrationTests.Cache;

public class TimeExpirationTests(NatsIntegrationFixture fixture) : TestBase(fixture)
{
Expand Down
4 changes: 2 additions & 2 deletions test/IntegrationTests/IntegrationTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<IsTestProject>true</IsTestProject>
<RunSettingsFilePath>$(MSBuildProjectDirectory)\..\xunit.runsettings</RunSettingsFilePath>
<OutputType>Exe</OutputType>
<RootNamespace>CodeCargo.NatsDistributedCache.IntegrationTests</RootNamespace>
<RootNamespace>CodeCargo.Nats.DistributedCache.IntegrationTests</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand All @@ -20,7 +20,7 @@

<ItemGroup>
<ProjectReference Include="..\TestUtils\TestUtils.csproj" />
<ProjectReference Include="..\..\src\CodeCargo.NatsDistributedCache\CodeCargo.NatsDistributedCache.csproj" />
<ProjectReference Include="..\..\src\NatsDistributedCache\NatsDistributedCache.csproj" />
<ProjectReference Include="..\..\util\NatsAppHost\NatsAppHost.csproj" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion test/IntegrationTests/NatsCollection.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace CodeCargo.NatsDistributedCache.IntegrationTests;
namespace CodeCargo.Nats.DistributedCache.IntegrationTests;

[CollectionDefinition(Name)]
public class NatsCollection : ICollectionFixture<NatsIntegrationFixture>
Expand Down
4 changes: 2 additions & 2 deletions test/IntegrationTests/NatsIntegrationFixture.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Aspire.Hosting;
using CodeCargo.NatsDistributedCache.TestUtils;
using CodeCargo.Nats.DistributedCache.TestUtils;
using Microsoft.Extensions.Logging;
using NATS.Client.Core;
using NATS.Client.KeyValueStore;
using NATS.Net;

namespace CodeCargo.NatsDistributedCache.IntegrationTests;
namespace CodeCargo.Nats.DistributedCache.IntegrationTests;

/// <summary>
/// Test fixture that starts an Aspire-hosted NATS server for integration tests
Expand Down
4 changes: 2 additions & 2 deletions test/IntegrationTests/TestBase.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System.Runtime.CompilerServices;
using CodeCargo.NatsDistributedCache.TestUtils.Services.Logging;
using CodeCargo.Nats.DistributedCache.TestUtils.Services.Logging;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Logging;
using NATS.Client.Core;
using NATS.Client.JetStream.Models;
using NATS.Net;

namespace CodeCargo.NatsDistributedCache.IntegrationTests;
namespace CodeCargo.Nats.DistributedCache.IntegrationTests;

/// <summary>
/// Base class for NATS integration tests that provides test output logging and fixture access
Expand Down
22 changes: 11 additions & 11 deletions test/IntegrationTests/packages.linux-x64.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -1052,30 +1052,30 @@
"resolved": "16.3.0",
"contentHash": "SgMOdxbz8X65z8hraIs6hOEdnkH6hESTAIUa7viEngHOYaH+6q5XJmwr1+yb9vJpNQ19hCQY69xbFsLtXpobQA=="
},
"codecargo.natsdistributedcache": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Caching.Abstractions": "[9.0.4, )",
"Microsoft.Extensions.Logging.Abstractions": "[9.0.4, )",
"Microsoft.Extensions.Options": "[9.0.4, )",
"NATS.Client.KeyValueStore": "[2.6.0, )"
}
},
"natsapphost": {
"type": "Project",
"dependencies": {
"Aspire.Dashboard.Sdk.linux-x64": "[9.2.1, )",
"Aspire.Hosting.AppHost": "[9.2.1, )",
"Aspire.Hosting.Orchestration.linux-x64": "[9.2.1, )",
"CodeCargo.NatsDistributedCache": "[1.0.0, )"
"NatsDistributedCache": "[1.0.0, )"
}
},
"natsdistributedcache": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Caching.Abstractions": "[9.0.4, )",
"Microsoft.Extensions.Logging.Abstractions": "[9.0.4, )",
"Microsoft.Extensions.Options": "[9.0.4, )",
"NATS.Client.KeyValueStore": "[2.6.0, )"
}
},
"testutils": {
"type": "Project",
"dependencies": {
"CodeCargo.NatsDistributedCache": "[1.0.0, )",
"Microsoft.Extensions.Logging": "[9.0.4, )",
"NATS.Net": "[2.6.0, )",
"NatsDistributedCache": "[1.0.0, )",
"xunit.v3.assert": "[2.0.2, )",
"xunit.v3.extensibility.core": "[2.0.2, )"
}
Expand Down
22 changes: 11 additions & 11 deletions test/IntegrationTests/packages.osx-arm64.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -1052,30 +1052,30 @@
"resolved": "16.3.0",
"contentHash": "SgMOdxbz8X65z8hraIs6hOEdnkH6hESTAIUa7viEngHOYaH+6q5XJmwr1+yb9vJpNQ19hCQY69xbFsLtXpobQA=="
},
"codecargo.natsdistributedcache": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Caching.Abstractions": "[9.0.4, )",
"Microsoft.Extensions.Logging.Abstractions": "[9.0.4, )",
"Microsoft.Extensions.Options": "[9.0.4, )",
"NATS.Client.KeyValueStore": "[2.6.0, )"
}
},
"natsapphost": {
"type": "Project",
"dependencies": {
"Aspire.Dashboard.Sdk.osx-arm64": "[9.2.1, )",
"Aspire.Hosting.AppHost": "[9.2.1, )",
"Aspire.Hosting.Orchestration.osx-arm64": "[9.2.1, )",
"CodeCargo.NatsDistributedCache": "[1.0.0, )"
"NatsDistributedCache": "[1.0.0, )"
}
},
"natsdistributedcache": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Caching.Abstractions": "[9.0.4, )",
"Microsoft.Extensions.Logging.Abstractions": "[9.0.4, )",
"Microsoft.Extensions.Options": "[9.0.4, )",
"NATS.Client.KeyValueStore": "[2.6.0, )"
}
},
"testutils": {
"type": "Project",
"dependencies": {
"CodeCargo.NatsDistributedCache": "[1.0.0, )",
"Microsoft.Extensions.Logging": "[9.0.4, )",
"NATS.Net": "[2.6.0, )",
"NatsDistributedCache": "[1.0.0, )",
"xunit.v3.assert": "[2.0.2, )",
"xunit.v3.extensibility.core": "[2.0.2, )"
}
Expand Down
22 changes: 11 additions & 11 deletions test/IntegrationTests/packages.win-x64.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -1052,30 +1052,30 @@
"resolved": "16.3.0",
"contentHash": "SgMOdxbz8X65z8hraIs6hOEdnkH6hESTAIUa7viEngHOYaH+6q5XJmwr1+yb9vJpNQ19hCQY69xbFsLtXpobQA=="
},
"codecargo.natsdistributedcache": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Caching.Abstractions": "[9.0.4, )",
"Microsoft.Extensions.Logging.Abstractions": "[9.0.4, )",
"Microsoft.Extensions.Options": "[9.0.4, )",
"NATS.Client.KeyValueStore": "[2.6.0, )"
}
},
"natsapphost": {
"type": "Project",
"dependencies": {
"Aspire.Dashboard.Sdk.win-x64": "[9.2.1, )",
"Aspire.Hosting.AppHost": "[9.2.1, )",
"Aspire.Hosting.Orchestration.win-x64": "[9.2.1, )",
"CodeCargo.NatsDistributedCache": "[1.0.0, )"
"NatsDistributedCache": "[1.0.0, )"
}
},
"natsdistributedcache": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Caching.Abstractions": "[9.0.4, )",
"Microsoft.Extensions.Logging.Abstractions": "[9.0.4, )",
"Microsoft.Extensions.Options": "[9.0.4, )",
"NATS.Client.KeyValueStore": "[2.6.0, )"
}
},
"testutils": {
"type": "Project",
"dependencies": {
"CodeCargo.NatsDistributedCache": "[1.0.0, )",
"Microsoft.Extensions.Logging": "[9.0.4, )",
"NATS.Net": "[2.6.0, )",
"NatsDistributedCache": "[1.0.0, )",
"xunit.v3.assert": "[2.0.2, )",
"xunit.v3.extensibility.core": "[2.0.2, )"
}
Expand Down
2 changes: 1 addition & 1 deletion test/TestUtils/Assertions/ExceptionAssert.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Xunit;

namespace CodeCargo.NatsDistributedCache.TestUtils.Assertions;
namespace CodeCargo.Nats.DistributedCache.TestUtils.Assertions;

public static class ExceptionAssert
{
Expand Down
2 changes: 1 addition & 1 deletion test/TestUtils/NatsTestExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using NATS.Client.Core;
using NATS.Client.Hosting;

namespace CodeCargo.NatsDistributedCache.TestUtils;
namespace CodeCargo.Nats.DistributedCache.TestUtils;

public static class NatsTestExtensions
{
Expand Down
2 changes: 1 addition & 1 deletion test/TestUtils/Services/Logging/TestOutputLogger.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.Extensions.Logging;
using Xunit;

namespace CodeCargo.NatsDistributedCache.TestUtils.Services.Logging;
namespace CodeCargo.Nats.DistributedCache.TestUtils.Services.Logging;

/// <summary>
/// Extension methods for configuring logging in test context
Expand Down
4 changes: 2 additions & 2 deletions test/TestUtils/TestUtils.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<RootNamespace>CodeCargo.NatsDistributedCache.TestUtils</RootNamespace>
<RootNamespace>CodeCargo.Nats.DistributedCache.TestUtils</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand All @@ -12,7 +12,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\CodeCargo.NatsDistributedCache\CodeCargo.NatsDistributedCache.csproj" />
<ProjectReference Include="..\..\src\NatsDistributedCache\NatsDistributedCache.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion test/TestUtils/packages.linux-x64.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
"Microsoft.Bcl.AsyncInterfaces": "6.0.0"
}
},
"codecargo.natsdistributedcache": {
"natsdistributedcache": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Caching.Abstractions": "[9.0.4, )",
Expand Down
2 changes: 1 addition & 1 deletion test/TestUtils/packages.osx-arm64.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
"Microsoft.Bcl.AsyncInterfaces": "6.0.0"
}
},
"codecargo.natsdistributedcache": {
"natsdistributedcache": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Caching.Abstractions": "[9.0.4, )",
Expand Down
2 changes: 1 addition & 1 deletion test/TestUtils/packages.win-x64.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
"Microsoft.Bcl.AsyncInterfaces": "6.0.0"
}
},
"codecargo.natsdistributedcache": {
"natsdistributedcache": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Caching.Abstractions": "[9.0.4, )",
Expand Down
4 changes: 2 additions & 2 deletions test/UnitTests/Cache/TimeExpirationAsyncUnitTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using CodeCargo.NatsDistributedCache.TestUtils.Assertions;
using CodeCargo.Nats.DistributedCache.TestUtils.Assertions;
using Microsoft.Extensions.Caching.Distributed;

namespace CodeCargo.NatsDistributedCache.UnitTests.Cache;
namespace CodeCargo.Nats.DistributedCache.UnitTests.Cache;

public class TimeExpirationAsyncUnitTests : TestBase
{
Expand Down
4 changes: 2 additions & 2 deletions test/UnitTests/Cache/TimeExpirationUnitTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using CodeCargo.NatsDistributedCache.TestUtils.Assertions;
using CodeCargo.Nats.DistributedCache.TestUtils.Assertions;
using Microsoft.Extensions.Caching.Distributed;

namespace CodeCargo.NatsDistributedCache.UnitTests.Cache;
namespace CodeCargo.Nats.DistributedCache.UnitTests.Cache;

public class TimeExpirationUnitTests : TestBase
{
Expand Down
2 changes: 1 addition & 1 deletion test/UnitTests/Extensions/CacheServiceExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Moq;
using NATS.Client.Core;

namespace CodeCargo.NatsDistributedCache.UnitTests.Extensions;
namespace CodeCargo.Nats.DistributedCache.UnitTests.Extensions;

public class CacheServiceExtensionsUnitTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using NATS.Client.Core;
using NATS.Net;

namespace CodeCargo.NatsDistributedCache.UnitTests.Serialization;
namespace CodeCargo.Nats.DistributedCache.UnitTests.Serialization;

/// <summary>
/// Tests for the NatsHybridCacheSerializerFactory
Expand Down
Loading