Skip to content

Commit

Permalink
Final fixup dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Morris committed Sep 21, 2022
1 parent c5df325 commit 3207279
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Couchbase.Extensions.sln
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Couchbase.Extensions.Compre
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Couchbase.Extensions.Session.Example", "..\temp\Couchbase.Extensions\example\Couchbase.Extensions.Session.Example\Couchbase.Extensions.Session.Example.csproj", "{2002815D-BB04-4EE7-A671-D2A8A4E0A498}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Couchbase.Extensions.Caching.Example", "example\Couchbase.Extensions.Caching.Example\Couchbase.Extensions.Caching.Example.csproj", "{02FC8C26-DD40-4944-B897-B30598F8BC58}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Couchbase.Extensions.Caching.Example", "example\Couchbase.Extensions.Caching.Example\Couchbase.Extensions.Caching.Example.csproj", "{02FC8C26-DD40-4944-B897-B30598F8BC58}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Couchbase.Extensions.Caching" Version="3.3.4" />
<PackageReference Include="Couchbase.Extensions.Caching" Version="3.3.5" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions example/Couchbase.Extensions.Caching.Example/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Couchbase.Extensions.Caching;
using Couchbase.Extensions.DependencyInjection;

namespace Couchbase.Extensions.Caching.Example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<Version>3.3.4</Version>
<Version>3.3.5</Version>
<Description>A custom ASP.NET Core Middleware plugin for distributed cache using Couchbase server as the backing store. Supports both Memcached (in-memory) and Couchbase (persistent) buckets.</Description>
<PackageTags>Couchbase;netcore;cache;session;caching;distributed;middleware;database;nosql;json</PackageTags>
<Copyright>Couchbase, Inc. 2022</Copyright>
Expand All @@ -17,15 +17,16 @@

<LangVersion>9</LangVersion>
<Nullable>enable</Nullable>
<SignAssembly>true</SignAssembly>
<SignAssembly>False</SignAssembly>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<PackageIcon>couchbase.png</PackageIcon>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<AssemblyOriginatorKeyFile>C:\keys\Couchbase.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CouchbaseNetClient" Version="3.3.4" />
<PackageReference Include="Couchbase.Extensions.DependencyInjection" Version="3.3.4" />
<PackageReference Include="CouchbaseNetClient" Version="3.3.5" />
<PackageReference Include="Couchbase.Extensions.DependencyInjection" Version="3.3.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static IServiceCollection AddDistributedCouchbaseCache(this IServiceColle

var descriptor = services.FirstOrDefault(x => x.ServiceType == typeof(IDistributedCache));
if (descriptor != null) services.Remove(descriptor);
services.TryAddSingleton<IDistributedCache, CouchbaseCache>();
services.TryAddSingleton<ICouchbaseCache, CouchbaseCache>();

return services;
}
Expand Down Expand Up @@ -62,10 +62,14 @@ public static IServiceCollection AddDistributedCouchbaseCache(this IServiceColle
services.AddOptions();
services.Configure(setupAction);

var descriptor = services.FirstOrDefault(x => x.ServiceType == typeof(IDistributedCache));
if (descriptor != null) services.Remove(descriptor);
var distCacheDescriptor = services.FirstOrDefault(x => x.ServiceType == typeof(IDistributedCache));
if (distCacheDescriptor != null) services.Remove(distCacheDescriptor);
services.TryAddSingleton<IDistributedCache, CouchbaseCache>();

var couchbaseCachedescriptor = services.FirstOrDefault(x => x.ServiceType == typeof(ICouchbaseCache));
if (couchbaseCachedescriptor != null) services.Remove(couchbaseCachedescriptor);
services.TryAddSingleton<ICouchbaseCache, CouchbaseCache>();

return services;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
<RepositoryType>git</RepositoryType>
<PackageTags>aspnetcore;session;sessionstate;Couchbase;netcore;cache;session;caching;distributed;middleware;database;nosql;json</PackageTags>
<LangVersion>9</LangVersion>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<PackageIcon>couchbase.png</PackageIcon>
<GenerateDocumentationFile>False</GenerateDocumentationFile>
<SignAssembly>True</SignAssembly>
<Version>3.3.4</Version>
<SignAssembly>False</SignAssembly>
<Version>3.3.5</Version>
<AssemblyOriginatorKeyFile>C:\keys\Couchbase.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CouchbaseNetClient" Version="3.3.4" />
<PackageReference Include="CouchbaseNetClient" Version="3.3.5" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="5.0.17" />
<PackageReference Include="Microsoft.AspNetCore.Session" Version="2.2.0" />
Expand Down

0 comments on commit 3207279

Please sign in to comment.