Skip to content

Commit

Permalink
NuGet v1.3.3, 'Contains' method
Browse files Browse the repository at this point in the history
  • Loading branch information
jchristn committed Jun 14, 2019
1 parent 84d2b7c commit 4efe724
Show file tree
Hide file tree
Showing 204 changed files with 2,137 additions and 10,651 deletions.
Binary file modified .vs/Caching/v15/.suo
Binary file not shown.
File renamed without changes.
Binary file modified .vs/Caching/v15/Server/sqlite3/storage.ide
Binary file not shown.
Binary file modified .vs/Caching/v15/Server/sqlite3/storage.ide-shm
Binary file not shown.
Binary file modified .vs/Caching/v15/Server/sqlite3/storage.ide-wal
Binary file not shown.
4 changes: 1 addition & 3 deletions Caching.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.168
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestNetFramework", "TestNetFramework\TestNetFramework.csproj", "{A39477CC-153F-4254-9EAE-B98F2D2075A0}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test\Test.csproj", "{A39477CC-153F-4254-9EAE-B98F2D2075A0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Caching", "Caching\Caching.csproj", "{9B2CBDA2-B294-4858-87D4-B0B342E17D72}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestNetCore", "TestNetCore\TestNetCore.csproj", "{8DC9CED3-FEA7-436D-AB01-AB4D80FC8E19}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
8 changes: 4 additions & 4 deletions Caching/Caching.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
<TargetFrameworks>netstandard2.0;net452</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageId>Caching.dll</PackageId>
<Version>1.3.2</Version>
<Version>1.3.3</Version>
<Authors>Joel Christner</Authors>
<Description>Simple C# caching library including a FIFO and LRU cache</Description>
<Copyright>(c)2019 Joel Christner</Copyright>
<PackageProjectUrl>https://github.com/jchristn/caching</PackageProjectUrl>
<RepositoryUrl>https://github.com/jchristn/caching</RepositoryUrl>
<RepositoryType>Github</RepositoryType>
<PackageLicenseUrl>https://github.com/jchristn/Caching/blob/master/LICENSE.txt</PackageLicenseUrl>
<PackageReleaseNotes>Retarget to .NET Core 2.0 and .NET Framework 4.5.2, remove CSharpTest.Net.Collections (BTree support) due to licensing and compatibility with .NET Core 2.0</PackageReleaseNotes>
<AssemblyVersion>1.3.2.0</AssemblyVersion>
<FileVersion>1.3.2.0</FileVersion>
<PackageReleaseNotes>Contains method.</PackageReleaseNotes>
<AssemblyVersion>1.3.3.0</AssemblyVersion>
<FileVersion>1.3.3.0</FileVersion>
<PackageTags>fifo lru cache caching least recently used first in first out simple</PackageTags>
<PackageIconUrl>https://raw.githubusercontent.com/jchristn/caching/master/assets/icon.ico</PackageIconUrl>
</PropertyGroup>
Expand Down
20 changes: 20 additions & 0 deletions Caching/FIFOCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,26 @@ public bool TryGet(T1 key, out T2 val)
}
}

/// <summary>
/// See if a key exists in the cache.
/// </summary>
/// <param name="key">The key of the cached items.</param>
/// <returns>True if cached.</returns>
public bool Contains(T1 key)
{
if (key == null) throw new ArgumentNullException(nameof(key));

lock (_CacheLock)
{
if (_Cache.ContainsKey(key))
{
return true;
}
}

return false;
}

/// <summary>
/// Add or replace a key's value in the cache.
/// </summary>
Expand Down
20 changes: 20 additions & 0 deletions Caching/LRUCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,26 @@ public bool TryGet(T1 key, out T2 val)
}
}

/// <summary>
/// See if a key exists in the cache.
/// </summary>
/// <param name="key">The key of the cached items.</param>
/// <returns>True if cached.</returns>
public bool Contains(T1 key)
{
if (key == null) throw new ArgumentNullException(nameof(key));

lock (_CacheLock)
{
if (_Cache.ContainsKey(key))
{
return true;
}
}

return false;
}

/// <summary>
/// Add or replace a key's value in the cache.
/// </summary>
Expand Down
Binary file added Caching/bin/Debug/Caching.dll.1.3.3.nupkg
Binary file not shown.
Binary file modified Caching/bin/Debug/net452/Caching.dll
Binary file not shown.
Binary file modified Caching/bin/Debug/net452/Caching.pdb
Binary file not shown.
4 changes: 2 additions & 2 deletions Caching/bin/Debug/netstandard2.0/Caching.deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"targets": {
".NETStandard,Version=v2.0": {},
".NETStandard,Version=v2.0/": {
"Caching/1.3.2": {
"Caching/1.3.3": {
"dependencies": {
"Microsoft.CSharp": "4.5.0",
"NETStandard.Library": "2.0.3"
Expand All @@ -33,7 +33,7 @@
}
},
"libraries": {
"Caching/1.3.2": {
"Caching/1.3.3": {
"type": "project",
"serviceable": false,
"sha512": ""
Expand Down
Binary file modified Caching/bin/Debug/netstandard2.0/Caching.dll
Binary file not shown.
Binary file modified Caching/bin/Debug/netstandard2.0/Caching.pdb
Binary file not shown.
Binary file added Caching/bin/Release/Caching.dll.1.3.3.nupkg
Binary file not shown.
Binary file modified Caching/bin/Release/net452/Caching.dll
Binary file not shown.
Binary file modified Caching/bin/Release/net452/Caching.pdb
Binary file not shown.
4 changes: 2 additions & 2 deletions Caching/bin/Release/netstandard2.0/Caching.deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"targets": {
".NETStandard,Version=v2.0": {},
".NETStandard,Version=v2.0/": {
"Caching/1.3.2": {
"Caching/1.3.3": {
"dependencies": {
"Microsoft.CSharp": "4.5.0",
"NETStandard.Library": "2.0.3"
Expand All @@ -33,7 +33,7 @@
}
},
"libraries": {
"Caching/1.3.2": {
"Caching/1.3.3": {
"type": "project",
"serviceable": false,
"sha512": ""
Expand Down
Binary file modified Caching/bin/Release/netstandard2.0/Caching.dll
Binary file not shown.
Binary file modified Caching/bin/Release/netstandard2.0/Caching.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion Caching/obj/Caching.csproj.nuget.cache
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"dgSpecHash": "LPl2LtfQC2I5WAK1S6m0NcXmBy9pBqVY8II6peX3mztN4KIo71W+9IC8A19njzr+3vuWSLVOwF56DPILqCHnJQ==",
"dgSpecHash": "qInDQjKSw4pg1mCiKoTgjXMMsH1bD8F3dhjAv+OD65PYxK1IC09Xpe9KX/XhG4RapD4M6dXWVAOx8x5Hqx5XfA==",
"success": true
}
30 changes: 30 additions & 0 deletions Caching/obj/Debug/Caching.dll.1.3.3.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Caching.dll</id>
<version>1.3.3</version>
<authors>Joel Christner</authors>
<owners>Joel Christner</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<licenseUrl>https://github.com/jchristn/Caching/blob/master/LICENSE.txt</licenseUrl>
<projectUrl>https://github.com/jchristn/caching</projectUrl>
<iconUrl>https://raw.githubusercontent.com/jchristn/caching/master/assets/icon.ico</iconUrl>
<description>Simple C# caching library including a FIFO and LRU cache</description>
<releaseNotes>Contains method.</releaseNotes>
<copyright>(c)2019 Joel Christner</copyright>
<tags>fifo lru cache caching least recently used first in first out simple</tags>
<repository type="Github" url="https://github.com/jchristn/caching" />
<dependencies>
<group targetFramework=".NETFramework4.5.2">
<dependency id="Microsoft.CSharp" version="4.5.0" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETStandard2.0">
<dependency id="Microsoft.CSharp" version="4.5.0" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
<files>
<file src="C:\Code\Misc\Caching\Caching\bin\Debug\net452\Caching.dll" target="lib\net452\Caching.dll" />
<file src="C:\Code\Misc\Caching\Caching\bin\Debug\netstandard2.0\Caching.dll" target="lib\netstandard2.0\Caching.dll" />
</files>
</package>
6 changes: 3 additions & 3 deletions Caching/obj/Debug/net452/Caching.AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("(c)2019 Joel Christner")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("Simple C# caching library including a FIFO and LRU cache")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.3.2.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.3.2")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.3.3.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.3.3")]
[assembly: System.Reflection.AssemblyProductAttribute("Caching")]
[assembly: System.Reflection.AssemblyTitleAttribute("Caching")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.3.2.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.3.3.0")]

// Generated by the MSBuild WriteCodeFragment class.

2 changes: 1 addition & 1 deletion Caching/obj/Debug/net452/Caching.AssemblyInfoInputs.cache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9fa7603a987232e2bf1212aa8efb989048d747b8
e0fa7fa5aad3e063f385ff2bfb5c83b2424d8c1c
Binary file modified Caching/obj/Debug/net452/Caching.dll
Binary file not shown.
Binary file modified Caching/obj/Debug/net452/Caching.pdb
Binary file not shown.
6 changes: 3 additions & 3 deletions Caching/obj/Debug/netstandard2.0/Caching.AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("(c)2019 Joel Christner")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("Simple C# caching library including a FIFO and LRU cache")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.3.2.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.3.2")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.3.3.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.3.3")]
[assembly: System.Reflection.AssemblyProductAttribute("Caching")]
[assembly: System.Reflection.AssemblyTitleAttribute("Caching")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.3.2.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.3.3.0")]

// Generated by the MSBuild WriteCodeFragment class.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
9fa7603a987232e2bf1212aa8efb989048d747b8
e0fa7fa5aad3e063f385ff2bfb5c83b2424d8c1c
Binary file not shown.
Binary file modified Caching/obj/Debug/netstandard2.0/Caching.dll
Binary file not shown.
Binary file modified Caching/obj/Debug/netstandard2.0/Caching.pdb
Binary file not shown.
30 changes: 30 additions & 0 deletions Caching/obj/Release/Caching.dll.1.3.3.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Caching.dll</id>
<version>1.3.3</version>
<authors>Joel Christner</authors>
<owners>Joel Christner</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<licenseUrl>https://github.com/jchristn/Caching/blob/master/LICENSE.txt</licenseUrl>
<projectUrl>https://github.com/jchristn/caching</projectUrl>
<iconUrl>https://raw.githubusercontent.com/jchristn/caching/master/assets/icon.ico</iconUrl>
<description>Simple C# caching library including a FIFO and LRU cache</description>
<releaseNotes>Contains method.</releaseNotes>
<copyright>(c)2019 Joel Christner</copyright>
<tags>fifo lru cache caching least recently used first in first out simple</tags>
<repository type="Github" url="https://github.com/jchristn/caching" />
<dependencies>
<group targetFramework=".NETFramework4.5.2">
<dependency id="Microsoft.CSharp" version="4.5.0" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETStandard2.0">
<dependency id="Microsoft.CSharp" version="4.5.0" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
<files>
<file src="C:\Code\Misc\Caching\Caching\bin\Release\net452\Caching.dll" target="lib\net452\Caching.dll" />
<file src="C:\Code\Misc\Caching\Caching\bin\Release\netstandard2.0\Caching.dll" target="lib\netstandard2.0\Caching.dll" />
</files>
</package>
6 changes: 3 additions & 3 deletions Caching/obj/Release/net452/Caching.AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("(c)2019 Joel Christner")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("Simple C# caching library including a FIFO and LRU cache")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.3.2.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.3.2")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.3.3.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.3.3")]
[assembly: System.Reflection.AssemblyProductAttribute("Caching")]
[assembly: System.Reflection.AssemblyTitleAttribute("Caching")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.3.2.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.3.3.0")]

// Generated by the MSBuild WriteCodeFragment class.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
46c00f1cd12ad65dc41359862ba00a6bcceacf5c
cfe3f8df5a97b7ef41120950e4cae66b54c361da
Binary file modified Caching/obj/Release/net452/Caching.dll
Binary file not shown.
Binary file modified Caching/obj/Release/net452/Caching.pdb
Binary file not shown.
6 changes: 3 additions & 3 deletions Caching/obj/Release/netstandard2.0/Caching.AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("(c)2019 Joel Christner")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("Simple C# caching library including a FIFO and LRU cache")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.3.2.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.3.2")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.3.3.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.3.3")]
[assembly: System.Reflection.AssemblyProductAttribute("Caching")]
[assembly: System.Reflection.AssemblyTitleAttribute("Caching")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.3.2.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.3.3.0")]

// Generated by the MSBuild WriteCodeFragment class.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
46c00f1cd12ad65dc41359862ba00a6bcceacf5c
cfe3f8df5a97b7ef41120950e4cae66b54c361da
Binary file modified Caching/obj/Release/netstandard2.0/Caching.dll
Binary file not shown.
Binary file modified Caching/obj/Release/netstandard2.0/Caching.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion Caching/obj/project.assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder": {}
},
"project": {
"version": "1.3.2",
"version": "1.3.3",
"restore": {
"projectUniqueName": "C:\\Code\\Misc\\Caching\\Caching\\Caching.csproj",
"projectName": "Caching.dll",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion TestNetCore/TestNetCore.csproj → Test/Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFrameworks>netcoreapp2.2;net452</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Binary file added Test/bin/Debug/net452/Caching.dll
Binary file not shown.
Binary file added Test/bin/Debug/net452/Caching.pdb
Binary file not shown.
Binary file added Test/bin/Debug/net452/Test.exe
Binary file not shown.
6 changes: 6 additions & 0 deletions Test/bin/Debug/net452/Test.exe.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>
Binary file added Test/bin/Debug/net452/Test.pdb
Binary file not shown.
Binary file added Test/bin/Debug/netcoreapp2.2/Caching.dll
Binary file not shown.
Binary file added Test/bin/Debug/netcoreapp2.2/Caching.pdb
Binary file not shown.
47 changes: 47 additions & 0 deletions Test/bin/Debug/netcoreapp2.2/Test.deps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v2.2",
"signature": "ddfaeae436e140dd5647a8209cb2004484674069"
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v2.2": {
"Test/1.0.0": {
"dependencies": {
"Caching.dll": "1.3.3"
},
"runtime": {
"Test.dll": {}
}
},
"Microsoft.CSharp/4.5.0": {},
"Caching.dll/1.3.3": {
"dependencies": {
"Microsoft.CSharp": "4.5.0"
},
"runtime": {
"Caching.dll": {}
}
}
}
},
"libraries": {
"Test/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Microsoft.CSharp/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-kaj6Wb4qoMuH3HySFJhxwQfe8R/sJsNJnANrvv8WdFPMoNbKY5htfNscv+LHCu5ipz+49m2e+WQXpLXr9XYemQ==",
"path": "microsoft.csharp/4.5.0",
"hashPath": "microsoft.csharp.4.5.0.nupkg.sha512"
},
"Caching.dll/1.3.3": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}
Binary file added Test/bin/Debug/netcoreapp2.2/Test.dll
Binary file not shown.
Binary file added Test/bin/Debug/netcoreapp2.2/Test.pdb
Binary file not shown.
Binary file added Test/bin/Release/net452/Caching.dll
Binary file not shown.
Binary file added Test/bin/Release/net452/Caching.pdb
Binary file not shown.
Binary file added Test/bin/Release/net452/Test.exe
Binary file not shown.
6 changes: 6 additions & 0 deletions Test/bin/Release/net452/Test.exe.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>
Binary file added Test/bin/Release/net452/Test.pdb
Binary file not shown.
Binary file added Test/bin/Release/netcoreapp2.2/Caching.dll
Binary file not shown.
Binary file added Test/bin/Release/netcoreapp2.2/Caching.pdb
Binary file not shown.
Loading

0 comments on commit 4efe724

Please sign in to comment.