forked from DataDog/dd-trace-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Getting property values: fix potential cache key conflict, improve sp…
…eed (DataDog#642)
- Loading branch information
1 parent
491a637
commit 0ee897a
Showing
29 changed files
with
621 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
.../Datadog.StackExchange.Redis.Abstractions/Datadog.StackExchange.Redis.Abstractions.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Library</OutputType> | ||
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks> | ||
</PropertyGroup> | ||
|
||
</Project> |
6 changes: 6 additions & 0 deletions
6
reproduction-dependencies/Datadog.StackExchange.Redis.Abstractions/Directory.Build.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<Project> | ||
<!-- | ||
This file intentionally left blank... | ||
to stop msbuild from looking up the folder hierarchy | ||
--> | ||
</Project> |
9 changes: 9 additions & 0 deletions
9
reproduction-dependencies/Datadog.StackExchange.Redis.Abstractions/ICache.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace Datadog.StackExchange.Redis.Abstractions | ||
{ | ||
public interface ICache | ||
{ | ||
string GetString(string key); | ||
|
||
void SetString(string key, string value); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...cies/Datadog.StackExchange.Redis.StrongName/Datadog.StackExchange.Redis.StrongName.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Library</OutputType> | ||
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="StackExchange.Redis.StrongName" Version="1.2.6" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Datadog.StackExchange.Redis.Abstractions\Datadog.StackExchange.Redis.Abstractions.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
6 changes: 6 additions & 0 deletions
6
reproduction-dependencies/Datadog.StackExchange.Redis.StrongName/Directory.Build.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<Project> | ||
<!-- | ||
This file intentionally left blank... | ||
to stop msbuild from looking up the folder hierarchy | ||
--> | ||
</Project> |
33 changes: 33 additions & 0 deletions
33
reproduction-dependencies/Datadog.StackExchange.Redis.StrongName/RedisStrongNameClient.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using Datadog.StackExchange.Redis.Abstractions; | ||
using StackExchange.Redis; | ||
|
||
namespace Datadog.StackExchange.Redis.StrongName | ||
{ | ||
public class RedisStrongNameClient : ICache, IDisposable | ||
{ | ||
private readonly ConnectionMultiplexer _connection; | ||
private readonly IDatabase _database; | ||
|
||
public RedisStrongNameClient(string configuration) | ||
{ | ||
_connection = ConnectionMultiplexer.Connect(configuration); | ||
_database = _connection.GetDatabase(); | ||
} | ||
|
||
public void SetString(string key, string value) | ||
{ | ||
_database.StringSet(key, value); | ||
} | ||
|
||
public string GetString(string key) | ||
{ | ||
return _database.StringGet(key); | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
_connection?.Dispose(); | ||
} | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
reproduction-dependencies/Datadog.StackExchange.Redis/Datadog.StackExchange.Redis.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Library</OutputType> | ||
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="StackExchange.Redis" Version="1.2.6" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Datadog.StackExchange.Redis.Abstractions\Datadog.StackExchange.Redis.Abstractions.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
6 changes: 6 additions & 0 deletions
6
reproduction-dependencies/Datadog.StackExchange.Redis/Directory.Build.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<Project> | ||
<!-- | ||
This file intentionally left blank... | ||
to stop msbuild from looking up the folder hierarchy | ||
--> | ||
</Project> |
33 changes: 33 additions & 0 deletions
33
reproduction-dependencies/Datadog.StackExchange.Redis/RedisClient.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using Datadog.StackExchange.Redis.Abstractions; | ||
using StackExchange.Redis; | ||
|
||
namespace Datadog.StackExchange.Redis | ||
{ | ||
public class RedisClient : ICache, IDisposable | ||
{ | ||
private readonly ConnectionMultiplexer _connection; | ||
private readonly IDatabase _database; | ||
|
||
public RedisClient(string configuration) | ||
{ | ||
_connection = ConnectionMultiplexer.Connect(configuration); | ||
_database = _connection.GetDatabase(); | ||
} | ||
|
||
public void SetString(string key, string value) | ||
{ | ||
_database.StringSet(key, value); | ||
} | ||
|
||
public string GetString(string key) | ||
{ | ||
return _database.StringGet(key); | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
_connection?.Dispose(); | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
reproductions/StackExchange.Redis.AssemblyConflict.LegacyProject/App.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"/> | ||
</startup> | ||
</configuration> |
6 changes: 6 additions & 0 deletions
6
reproductions/StackExchange.Redis.AssemblyConflict.LegacyProject/Directory.Build.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<Project> | ||
<!-- | ||
This file intentionally left blank... | ||
to stop msbuild from looking up the folder hierarchy | ||
--> | ||
</Project> |
Oops, something went wrong.