Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
94dfd9b1
Commit
94dfd9b1
authored
Sep 25, 2014
by
Marc Gravell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #92 from mwikstrom/master
Key space isolation extension to IDatabase
parents
651c5604
92765c7c
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1732 additions
and
174 deletions
+1732
-174
StackExchange.Redis.StrongName.csproj
StackExchange.Redis/StackExchange.Redis.StrongName.csproj
+5
-0
StackExchange.Redis.csproj
StackExchange.Redis/StackExchange.Redis.csproj
+170
-165
Condition.cs
StackExchange.Redis/StackExchange/Redis/Condition.cs
+9
-9
BatchWrapper.cs
...dis/StackExchange/Redis/KeyspaceIsolation/BatchWrapper.cs
+17
-0
DatabaseExtension.cs
...tackExchange/Redis/KeyspaceIsolation/DatabaseExtension.cs
+55
-0
DatabaseWrapper.cs
.../StackExchange/Redis/KeyspaceIsolation/DatabaseWrapper.cs
+636
-0
TransactionWrapper.cs
...ackExchange/Redis/KeyspaceIsolation/TransactionWrapper.cs
+33
-0
WrapperBase.cs
...edis/StackExchange/Redis/KeyspaceIsolation/WrapperBase.cs
+797
-0
StackExchange.Redis_Net40.StrongName.csproj
...e.Redis_Net40/StackExchange.Redis_Net40.StrongName.csproj
+5
-0
StackExchange.Redis_Net40.csproj
StackExchange.Redis_Net40/StackExchange.Redis_Net40.csproj
+5
-0
No files found.
StackExchange.Redis/StackExchange.Redis.StrongName.csproj
View file @
94dfd9b1
...
@@ -155,6 +155,11 @@
...
@@ -155,6 +155,11 @@
<Compile
Include=
"StackExchange\Redis\When.cs"
/>
<Compile
Include=
"StackExchange\Redis\When.cs"
/>
<Compile
Include=
"StackExchange\Redis\ShutdownMode.cs"
/>
<Compile
Include=
"StackExchange\Redis\ShutdownMode.cs"
/>
<Compile
Include=
"StackExchange\Redis\SaveType.cs"
/>
<Compile
Include=
"StackExchange\Redis\SaveType.cs"
/>
<Compile
Include=
"StackExchange\Redis\KeyspaceIsolation\BatchWrapper.cs"
/>
<Compile
Include=
"StackExchange\Redis\KeyspaceIsolation\DatabaseExtension.cs"
/>
<Compile
Include=
"StackExchange\Redis\KeyspaceIsolation\DatabaseWrapper.cs"
/>
<Compile
Include=
"StackExchange\Redis\KeyspaceIsolation\TransactionWrapper.cs"
/>
<Compile
Include=
"StackExchange\Redis\KeyspaceIsolation\WrapperBase.cs"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile
Include=
"StackExchange\Redis\SocketManager.Poll.cs"
>
<Compile
Include=
"StackExchange\Redis\SocketManager.Poll.cs"
>
...
...
StackExchange.Redis/StackExchange.Redis.csproj
View file @
94dfd9b1
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"12.0"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Project
ToolsVersion=
"12.0"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Import
Project=
"$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition=
"Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"
/>
<Import
Project=
"$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition=
"Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"
/>
<PropertyGroup>
<PropertyGroup>
<Configuration
Condition=
" '$(Configuration)' == '' "
>
Debug
</Configuration>
<Configuration
Condition=
" '$(Configuration)' == '' "
>
Debug
</Configuration>
<Platform
Condition=
" '$(Platform)' == '' "
>
AnyCPU
</Platform>
<Platform
Condition=
" '$(Platform)' == '' "
>
AnyCPU
</Platform>
<ProjectGuid>
{7CEC07F2-8C03-4C42-B048-738B215824C1}
</ProjectGuid>
<ProjectGuid>
{7CEC07F2-8C03-4C42-B048-738B215824C1}
</ProjectGuid>
<OutputType>
Library
</OutputType>
<OutputType>
Library
</OutputType>
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
StackExchange.Redis
</RootNamespace>
<RootNamespace>
StackExchange.Redis
</RootNamespace>
<AssemblyName>
StackExchange.Redis
</AssemblyName>
<AssemblyName>
StackExchange.Redis
</AssemblyName>
<TargetFrameworkVersion>
v4.5
</TargetFrameworkVersion>
<TargetFrameworkVersion>
v4.5
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<FileAlignment>
512
</FileAlignment>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "
>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "
>
<DebugSymbols>
true
</DebugSymbols>
<DebugSymbols>
true
</DebugSymbols>
<DebugType>
full
</DebugType>
<DebugType>
full
</DebugType>
<Optimize>
false
</Optimize>
<Optimize>
false
</Optimize>
<OutputPath>
bin\Debug\
</OutputPath>
<OutputPath>
bin\Debug\
</OutputPath>
<DefineConstants>
TRACE;DEBUG
</DefineConstants>
<DefineConstants>
TRACE;DEBUG
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<WarningLevel>
4
</WarningLevel>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<DocumentationFile>
bin\Debug\StackExchange.Redis.XML
</DocumentationFile>
<DocumentationFile>
bin\Debug\StackExchange.Redis.XML
</DocumentationFile>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "
>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "
>
<DebugType>
pdbonly
</DebugType>
<DebugType>
pdbonly
</DebugType>
<Optimize>
true
</Optimize>
<Optimize>
true
</Optimize>
<OutputPath>
bin\Release\
</OutputPath>
<OutputPath>
bin\Release\
</OutputPath>
<DefineConstants>
TRACE
</DefineConstants>
<DefineConstants>
TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<WarningLevel>
4
</WarningLevel>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<DocumentationFile>
bin\Release\StackExchange.Redis.xml
</DocumentationFile>
<DocumentationFile>
bin\Release\StackExchange.Redis.xml
</DocumentationFile>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)' == 'Verbose|AnyCPU'"
>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)' == 'Verbose|AnyCPU'"
>
<DebugSymbols>
true
</DebugSymbols>
<DebugSymbols>
true
</DebugSymbols>
<OutputPath>
bin\Verbose\
</OutputPath>
<OutputPath>
bin\Verbose\
</OutputPath>
<DefineConstants>
TRACE;DEBUG;VERBOSE
</DefineConstants>
<DefineConstants>
TRACE;DEBUG;VERBOSE
</DefineConstants>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<DocumentationFile>
bin\Debug\StackExchange.Redis.xml
</DocumentationFile>
<DocumentationFile>
bin\Debug\StackExchange.Redis.xml
</DocumentationFile>
<DebugType>
full
</DebugType>
<DebugType>
full
</DebugType>
<PlatformTarget>
AnyCPU
</PlatformTarget>
<PlatformTarget>
AnyCPU
</PlatformTarget>
<ErrorReport>
prompt
</ErrorReport>
<ErrorReport>
prompt
</ErrorReport>
<CodeAnalysisRuleSet>
MinimumRecommendedRules.ruleset
</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>
MinimumRecommendedRules.ruleset
</CodeAnalysisRuleSet>
<UseVSHostingProcess>
false
</UseVSHostingProcess>
<UseVSHostingProcess>
false
</UseVSHostingProcess>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)' == 'Log Output|AnyCPU'"
>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)' == 'Log Output|AnyCPU'"
>
<DebugSymbols>
true
</DebugSymbols>
<DebugSymbols>
true
</DebugSymbols>
<OutputPath>
bin\Log Output\
</OutputPath>
<OutputPath>
bin\Log Output\
</OutputPath>
<DefineConstants>
TRACE;DEBUG;LOGOUTPUT
</DefineConstants>
<DefineConstants>
TRACE;DEBUG;LOGOUTPUT
</DefineConstants>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<AllowUnsafeBlocks>
true
</AllowUnsafeBlocks>
<DocumentationFile>
bin\Debug\StackExchange.Redis.xml
</DocumentationFile>
<DocumentationFile>
bin\Debug\StackExchange.Redis.xml
</DocumentationFile>
<DebugType>
full
</DebugType>
<DebugType>
full
</DebugType>
<PlatformTarget>
AnyCPU
</PlatformTarget>
<PlatformTarget>
AnyCPU
</PlatformTarget>
<ErrorReport>
prompt
</ErrorReport>
<ErrorReport>
prompt
</ErrorReport>
<CodeAnalysisRuleSet>
MinimumRecommendedRules.ruleset
</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>
MinimumRecommendedRules.ruleset
</CodeAnalysisRuleSet>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<Reference
Include=
"System"
/>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Core"
/>
<Reference
Include=
"System.Core"
/>
<Reference
Include=
"System.IO.Compression"
/>
<Reference
Include=
"System.IO.Compression"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile
Include=
"StackExchange\Redis\Aggregate.cs"
/>
<Compile
Include=
"StackExchange\Redis\Aggregate.cs"
/>
<Compile
Include=
"StackExchange\Redis\ClientType.cs"
/>
<Compile
Include=
"StackExchange\Redis\ClientType.cs"
/>
<Compile
Include=
"StackExchange\Redis\ExtensionMethods.cs"
/>
<Compile
Include=
"StackExchange\Redis\ExtensionMethods.cs"
/>
<Compile
Include=
"StackExchange\Redis\HashEntry.cs"
/>
<Compile
Include=
"StackExchange\Redis\HashEntry.cs"
/>
<Compile
Include=
"StackExchange\Redis\InternalErrorEventArgs.cs"
/>
<Compile
Include=
"StackExchange\Redis\InternalErrorEventArgs.cs"
/>
<Compile
Include=
"StackExchange\Redis\MigrateOptions.cs"
/>
<Compile
Include=
"StackExchange\Redis\MigrateOptions.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisChannel.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisChannel.cs"
/>
<Compile
Include=
"StackExchange\Redis\Bitwise.cs"
/>
<Compile
Include=
"StackExchange\Redis\Bitwise.cs"
/>
<Compile
Include=
"StackExchange\Redis\ClientFlags.cs"
/>
<Compile
Include=
"StackExchange\Redis\ClientFlags.cs"
/>
<Compile
Include=
"StackExchange\Redis\ClientInfo.cs"
/>
<Compile
Include=
"StackExchange\Redis\ClientInfo.cs"
/>
<Compile
Include=
"StackExchange\Redis\ClusterConfiguration.cs"
/>
<Compile
Include=
"StackExchange\Redis\ClusterConfiguration.cs"
/>
<Compile
Include=
"StackExchange\Redis\CommandTrace.cs"
/>
<Compile
Include=
"StackExchange\Redis\CommandTrace.cs"
/>
<Compile
Include=
"StackExchange\Redis\Condition.cs"
/>
<Compile
Include=
"StackExchange\Redis\Condition.cs"
/>
<Compile
Include=
"StackExchange\Redis\ConfigurationOptions.cs"
/>
<Compile
Include=
"StackExchange\Redis\ConfigurationOptions.cs"
/>
<Compile
Include=
"StackExchange\Redis\ConnectionCounters.cs"
/>
<Compile
Include=
"StackExchange\Redis\ConnectionCounters.cs"
/>
<Compile
Include=
"StackExchange\Redis\ConnectionFailedEventArgs.cs"
/>
<Compile
Include=
"StackExchange\Redis\ConnectionFailedEventArgs.cs"
/>
<Compile
Include=
"StackExchange\Redis\ConnectionFailureType.cs"
/>
<Compile
Include=
"StackExchange\Redis\ConnectionFailureType.cs"
/>
<Compile
Include=
"StackExchange\Redis\ConnectionMultiplexer.ReaderWriter.cs"
>
<Compile
Include=
"StackExchange\Redis\ConnectionMultiplexer.ReaderWriter.cs"
>
<DependentUpon>
ConnectionMultiplexer.cs
</DependentUpon>
<DependentUpon>
ConnectionMultiplexer.cs
</DependentUpon>
</Compile>
</Compile>
<Compile
Include=
"StackExchange\Redis\ConnectionType.cs"
/>
<Compile
Include=
"StackExchange\Redis\ConnectionType.cs"
/>
<Compile
Include=
"StackExchange\Redis\DebuggingAids.cs"
/>
<Compile
Include=
"StackExchange\Redis\DebuggingAids.cs"
/>
<Compile
Include=
"StackExchange\Redis\EndPointCollection.cs"
/>
<Compile
Include=
"StackExchange\Redis\EndPointCollection.cs"
/>
<Compile
Include=
"StackExchange\Redis\EndPointEventArgs.cs"
/>
<Compile
Include=
"StackExchange\Redis\EndPointEventArgs.cs"
/>
<Compile
Include=
"StackExchange\Redis\ExceptionFactory.cs"
/>
<Compile
Include=
"StackExchange\Redis\ExceptionFactory.cs"
/>
<Compile
Include=
"StackExchange\Redis\Exclude.cs"
/>
<Compile
Include=
"StackExchange\Redis\Exclude.cs"
/>
<Compile
Include=
"StackExchange\Redis\ExportOptions.cs"
/>
<Compile
Include=
"StackExchange\Redis\ExportOptions.cs"
/>
<Compile
Include=
"StackExchange\Redis\Format.cs"
/>
<Compile
Include=
"StackExchange\Redis\Format.cs"
/>
<Compile
Include=
"StackExchange\Redis\IBatch.cs"
/>
<Compile
Include=
"StackExchange\Redis\IBatch.cs"
/>
<Compile
Include=
"StackExchange\Redis\IMultiMessage.cs"
/>
<Compile
Include=
"StackExchange\Redis\IMultiMessage.cs"
/>
<Compile
Include=
"StackExchange\Redis\Order.cs"
/>
<Compile
Include=
"StackExchange\Redis\Order.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisBatch.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisBatch.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisCommand.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisCommand.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisErrorEventArgs.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisErrorEventArgs.cs"
/>
<Compile
Include=
"StackExchange\Redis\HashSlotMovedEventArgs.cs"
/>
<Compile
Include=
"StackExchange\Redis\HashSlotMovedEventArgs.cs"
/>
<Compile
Include=
"StackExchange\Redis\ITransaction.cs"
/>
<Compile
Include=
"StackExchange\Redis\ITransaction.cs"
/>
<Compile
Include=
"StackExchange\Redis\IRedis.cs"
/>
<Compile
Include=
"StackExchange\Redis\IRedis.cs"
/>
<Compile
Include=
"StackExchange\Redis\IRedisAsync.cs"
/>
<Compile
Include=
"StackExchange\Redis\IRedisAsync.cs"
/>
<Compile
Include=
"StackExchange\Redis\IDatabase.cs"
/>
<Compile
Include=
"StackExchange\Redis\IDatabase.cs"
/>
<Compile
Include=
"StackExchange\Redis\IDatabaseAsync.cs"
/>
<Compile
Include=
"StackExchange\Redis\IDatabaseAsync.cs"
/>
<Compile
Include=
"StackExchange\Redis\IServer.cs"
/>
<Compile
Include=
"StackExchange\Redis\IServer.cs"
/>
<Compile
Include=
"StackExchange\Redis\ISubscriber.cs"
/>
<Compile
Include=
"StackExchange\Redis\ISubscriber.cs"
/>
<Compile
Include=
"StackExchange\Redis\MessageCompletable.cs"
/>
<Compile
Include=
"StackExchange\Redis\MessageCompletable.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisBase.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisBase.cs"
/>
<Compile
Include=
"StackExchange\Redis\CommandFlags.cs"
/>
<Compile
Include=
"StackExchange\Redis\CommandFlags.cs"
/>
<Compile
Include=
"StackExchange\Redis\CommandMap.cs"
/>
<Compile
Include=
"StackExchange\Redis\CommandMap.cs"
/>
<Compile
Include=
"StackExchange\Redis\CompletionManager.cs"
/>
<Compile
Include=
"StackExchange\Redis\CompletionManager.cs"
/>
<Compile
Include=
"StackExchange\Redis\ConnectionMultiplexer.cs"
/>
<Compile
Include=
"StackExchange\Redis\ConnectionMultiplexer.cs"
/>
<Compile
Include=
"StackExchange\Redis\CompletedDefaultTask.cs"
/>
<Compile
Include=
"StackExchange\Redis\CompletedDefaultTask.cs"
/>
<Compile
Include=
"StackExchange\Redis\ICompletable.cs"
/>
<Compile
Include=
"StackExchange\Redis\ICompletable.cs"
/>
<Compile
Include=
"StackExchange\Redis\LoggingTextStream.cs"
/>
<Compile
Include=
"StackExchange\Redis\LoggingTextStream.cs"
/>
<Compile
Include=
"StackExchange\Redis\PhysicalBridge.cs"
/>
<Compile
Include=
"StackExchange\Redis\PhysicalBridge.cs"
/>
<Compile
Include=
"StackExchange\Redis\Message.cs"
/>
<Compile
Include=
"StackExchange\Redis\Message.cs"
/>
<Compile
Include=
"StackExchange\Redis\MessageQueue.cs"
/>
<Compile
Include=
"StackExchange\Redis\MessageQueue.cs"
/>
<Compile
Include=
"StackExchange\Redis\PhysicalConnection.cs"
/>
<Compile
Include=
"StackExchange\Redis\PhysicalConnection.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisResult.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisResult.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisTransaction.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisTransaction.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisDatabase.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisDatabase.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisFeatures.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisFeatures.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisKey.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisKey.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisLiterals.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisLiterals.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisServer.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisServer.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisType.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisType.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisValue.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisValue.cs"
/>
<Compile
Include=
"StackExchange\Redis\ReplicationChangeOptions.cs"
/>
<Compile
Include=
"StackExchange\Redis\ReplicationChangeOptions.cs"
/>
<Compile
Include=
"StackExchange\Redis\RawResult.cs"
/>
<Compile
Include=
"StackExchange\Redis\RawResult.cs"
/>
<Compile
Include=
"StackExchange\Redis\ResultBox.cs"
/>
<Compile
Include=
"StackExchange\Redis\ResultBox.cs"
/>
<Compile
Include=
"StackExchange\Redis\ResultProcessor.cs"
/>
<Compile
Include=
"StackExchange\Redis\ResultProcessor.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisSubscriber.cs"
/>
<Compile
Include=
"StackExchange\Redis\RedisSubscriber.cs"
/>
<Compile
Include=
"StackExchange\Redis\ResultType.cs"
/>
<Compile
Include=
"StackExchange\Redis\ResultType.cs"
/>
<Compile
Include=
"StackExchange\Redis\ServerCounters.cs"
/>
<Compile
Include=
"StackExchange\Redis\ServerCounters.cs"
/>
<Compile
Include=
"StackExchange\Redis\ServerEndPoint.cs"
/>
<Compile
Include=
"StackExchange\Redis\ServerEndPoint.cs"
/>
<Compile
Include=
"StackExchange\Redis\ServerSelectionStrategy.cs"
/>
<Compile
Include=
"StackExchange\Redis\ServerSelectionStrategy.cs"
/>
<Compile
Include=
"StackExchange\Redis\ServerType.cs"
/>
<Compile
Include=
"StackExchange\Redis\ServerType.cs"
/>
<Compile
Include=
"StackExchange\Redis\SetOperation.cs"
/>
<Compile
Include=
"StackExchange\Redis\SetOperation.cs"
/>
<Compile
Include=
"StackExchange\Redis\SocketManager.cs"
/>
<Compile
Include=
"StackExchange\Redis\SocketManager.cs"
/>
<Compile
Include=
"StackExchange\Redis\SocketManager.NoPoll.cs"
>
<Compile
Include=
"StackExchange\Redis\SocketManager.NoPoll.cs"
>
<DependentUpon>
SocketManager.cs
</DependentUpon>
<DependentUpon>
SocketManager.cs
</DependentUpon>
</Compile>
</Compile>
<Compile
Include=
"StackExchange\Redis\SortedSetEntry.cs"
/>
<Compile
Include=
"StackExchange\Redis\SortedSetEntry.cs"
/>
<Compile
Include=
"StackExchange\Redis\SortType.cs"
/>
<Compile
Include=
"StackExchange\Redis\SortType.cs"
/>
<Compile
Include=
"StackExchange\Redis\StringSplits.cs"
/>
<Compile
Include=
"StackExchange\Redis\StringSplits.cs"
/>
<Compile
Include=
"StackExchange\Redis\TaskSource.cs"
/>
<Compile
Include=
"StackExchange\Redis\TaskSource.cs"
/>
<Compile
Include=
"StackExchange\Redis\When.cs"
/>
<Compile
Include=
"StackExchange\Redis\When.cs"
/>
<Compile
Include=
"StackExchange\Redis\ShutdownMode.cs"
/>
<Compile
Include=
"StackExchange\Redis\ShutdownMode.cs"
/>
<Compile
Include=
"StackExchange\Redis\SaveType.cs"
/>
<Compile
Include=
"StackExchange\Redis\SaveType.cs"
/>
</ItemGroup>
<Compile
Include=
"StackExchange\Redis\KeyspaceIsolation\BatchWrapper.cs"
/>
<ItemGroup>
<Compile
Include=
"StackExchange\Redis\KeyspaceIsolation\DatabaseExtension.cs"
/>
<Compile
Include=
"StackExchange\Redis\SocketManager.Poll.cs"
>
<Compile
Include=
"StackExchange\Redis\KeyspaceIsolation\DatabaseWrapper.cs"
/>
<DependentUpon>
SocketManager.cs
</DependentUpon>
<Compile
Include=
"StackExchange\Redis\KeyspaceIsolation\TransactionWrapper.cs"
/>
</Compile>
<Compile
Include=
"StackExchange\Redis\KeyspaceIsolation\WrapperBase.cs"
/>
</ItemGroup>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<Compile
Include=
"StackExchange\Redis\SocketManager.Poll.cs"
>
Other similar extension points exist, see Microsoft.Common.targets.
<DependentUpon>
SocketManager.cs
</DependentUpon>
<Target Name="BeforeBuild">
</Compile>
</Target>
</ItemGroup>
<Target Name="AfterBuild">
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
-->
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
\ No newline at end of file
StackExchange.Redis/StackExchange/Redis/Condition.cs
View file @
94dfd9b1
...
@@ -143,12 +143,12 @@ internal override void WriteImpl(PhysicalConnection physical)
...
@@ -143,12 +143,12 @@ internal override void WriteImpl(PhysicalConnection physical)
}
}
internal
class
ExistsCondition
:
Condition
internal
class
ExistsCondition
:
Condition
{
{
readonly
bool
expectedResult
;
internal
readonly
bool
expectedResult
;
readonly
RedisValue
hashField
;
internal
readonly
RedisValue
hashField
;
readonly
RedisKey
key
;
internal
readonly
RedisKey
key
;
public
ExistsCondition
(
RedisKey
key
,
RedisValue
hashField
,
bool
expectedResult
)
public
ExistsCondition
(
RedisKey
key
,
RedisValue
hashField
,
bool
expectedResult
)
{
{
...
@@ -197,11 +197,11 @@ internal override bool TryValidate(RawResult result, out bool value)
...
@@ -197,11 +197,11 @@ internal override bool TryValidate(RawResult result, out bool value)
}
}
}
}
private
class
EqualsCondition
:
Condition
internal
class
EqualsCondition
:
Condition
{
{
readonly
bool
expectedEqual
;
internal
readonly
bool
expectedEqual
;
readonly
RedisValue
hashField
,
expectedValue
;
internal
readonly
RedisValue
hashField
,
expectedValue
;
readonly
RedisKey
key
;
internal
readonly
RedisKey
key
;
public
EqualsCondition
(
RedisKey
key
,
RedisValue
hashField
,
bool
expectedEqual
,
RedisValue
expectedValue
)
public
EqualsCondition
(
RedisKey
key
,
RedisValue
hashField
,
bool
expectedEqual
,
RedisValue
expectedValue
)
{
{
if
(
key
.
IsNull
)
throw
new
ArgumentException
(
"key"
);
if
(
key
.
IsNull
)
throw
new
ArgumentException
(
"key"
);
...
...
StackExchange.Redis/StackExchange/Redis/KeyspaceIsolation/BatchWrapper.cs
0 → 100644
View file @
94dfd9b1
using
System
;
namespace
StackExchange.Redis.StackExchange.Redis.KeyspaceIsolation
{
internal
sealed
class
BatchWrapper
:
WrapperBase
<
IBatch
>,
IBatch
{
public
BatchWrapper
(
IBatch
inner
,
RedisKey
prefix
)
:
base
(
inner
,
prefix
)
{
}
public
void
Execute
()
{
this
.
Inner
.
Execute
();
}
}
}
StackExchange.Redis/StackExchange/Redis/KeyspaceIsolation/DatabaseExtension.cs
0 → 100644
View file @
94dfd9b1
using
System
;
namespace
StackExchange.Redis.StackExchange.Redis.KeyspaceIsolation
{
/// <summary>
/// Provides the <see cref="WithKeyPrefix"/> extension method to <see cref="IDatabase"/>.
/// </summary>
public
static
class
DatabaseExtension
{
/// <summary>
/// Creates a new <see cref="IDatabase"/> instance that provides an isolated key space
/// of the specified underyling database instance.
/// </summary>
/// <param name="database">
/// The underlying database instance that the returned instance shall use.
/// </param>
/// <param name="keyPrefix">
/// The prefix that defines a key space isolation for the returned database instance.
/// </param>
/// <returns>
/// A new <see cref="IDatabase"/> instance that invokes the specified underlying
/// <paramref name="database"/> but prepends the specified <paramref name="keyPrefix"/>
/// to all key paramters and thus forms a logical key space isolation.
/// </returns>
/// <remarks>
/// <para>
/// The following methods are not supported in a key space isolated database and
/// will throw an <see cref="NotSupportedException"/> when invoked:
/// </para>
/// <list type="bullet">
/// <item><see cref="IDatabaseAsync.KeyRandomAsync(CommandFlags)"/></item>
/// <item><see cref="IDatabase.KeyRandom(CommandFlags)"/></item>
/// </list>
/// <para>
/// Please notice that keys passed to a script are prefixed (as normal) but care must
/// be taken when a script returns the name of a key as that will (currently) not be
/// "unprefixed".
/// </para>
/// </remarks>
public
static
IDatabase
WithKeyPrefix
(
this
IDatabase
database
,
RedisKey
keyPrefix
)
{
if
(
database
==
null
)
{
throw
new
ArgumentNullException
(
"database"
);
}
if
(
keyPrefix
.
IsNull
||
keyPrefix
.
Value
.
Length
==
0
)
{
throw
new
ArgumentException
(
"The specified prefix cannot be null or empty"
,
"keyPrefix"
);
}
return
new
DatabaseWrapper
(
database
,
keyPrefix
);
}
}
}
StackExchange.Redis/StackExchange/Redis/KeyspaceIsolation/DatabaseWrapper.cs
0 → 100644
View file @
94dfd9b1
using
System
;
using
System.Collections.Generic
;
using
System.Net
;
namespace
StackExchange.Redis.StackExchange.Redis.KeyspaceIsolation
{
internal
sealed
class
DatabaseWrapper
:
WrapperBase
<
IDatabase
>,
IDatabase
{
public
DatabaseWrapper
(
IDatabase
inner
,
RedisKey
prefix
)
:
base
(
inner
,
prefix
)
{
}
public
IBatch
CreateBatch
(
object
asyncState
=
null
)
{
return
new
BatchWrapper
(
this
.
Inner
.
CreateBatch
(
asyncState
),
this
.
Prefix
);
}
public
ITransaction
CreateTransaction
(
object
asyncState
=
null
)
{
return
new
TransactionWrapper
(
this
.
Inner
.
CreateTransaction
(
asyncState
),
this
.
Prefix
);
}
public
int
Database
{
get
{
return
this
.
Inner
.
Database
;
}
}
public
RedisValue
DebugObject
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
DebugObject
(
this
.
ToInner
(
key
),
flags
);
}
public
double
HashDecrement
(
RedisKey
key
,
RedisValue
hashField
,
double
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashDecrement
(
this
.
ToInner
(
key
),
hashField
,
value
,
flags
);
}
public
long
HashDecrement
(
RedisKey
key
,
RedisValue
hashField
,
long
value
=
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashDecrement
(
this
.
ToInner
(
key
),
hashField
,
value
,
flags
);
}
public
long
HashDelete
(
RedisKey
key
,
RedisValue
[]
hashFields
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashDelete
(
this
.
ToInner
(
key
),
hashFields
,
flags
);
}
public
bool
HashDelete
(
RedisKey
key
,
RedisValue
hashField
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashDelete
(
this
.
ToInner
(
key
),
hashField
,
flags
);
}
public
bool
HashExists
(
RedisKey
key
,
RedisValue
hashField
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashExists
(
this
.
ToInner
(
key
),
hashField
,
flags
);
}
public
HashEntry
[]
HashGetAll
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashGetAll
(
this
.
ToInner
(
key
),
flags
);
}
public
RedisValue
[]
HashGet
(
RedisKey
key
,
RedisValue
[]
hashFields
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashGet
(
this
.
ToInner
(
key
),
hashFields
,
flags
);
}
public
RedisValue
HashGet
(
RedisKey
key
,
RedisValue
hashField
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashGet
(
this
.
ToInner
(
key
),
hashField
,
flags
);
}
public
double
HashIncrement
(
RedisKey
key
,
RedisValue
hashField
,
double
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashIncrement
(
this
.
ToInner
(
key
),
hashField
,
value
,
flags
);
}
public
long
HashIncrement
(
RedisKey
key
,
RedisValue
hashField
,
long
value
=
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashIncrement
(
this
.
ToInner
(
key
),
hashField
,
value
,
flags
);
}
public
RedisValue
[]
HashKeys
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashKeys
(
this
.
ToInner
(
key
),
flags
);
}
public
long
HashLength
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashLength
(
this
.
ToInner
(
key
),
flags
);
}
public
bool
HashSet
(
RedisKey
key
,
RedisValue
hashField
,
RedisValue
value
,
When
when
=
When
.
Always
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashSet
(
this
.
ToInner
(
key
),
hashField
,
value
,
when
,
flags
);
}
public
void
HashSet
(
RedisKey
key
,
HashEntry
[]
hashFields
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
this
.
Inner
.
HashSet
(
this
.
ToInner
(
key
),
hashFields
,
flags
);
}
public
RedisValue
[]
HashValues
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashValues
(
this
.
ToInner
(
key
),
flags
);
}
public
bool
HyperLogLogAdd
(
RedisKey
key
,
RedisValue
[]
values
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HyperLogLogAdd
(
this
.
ToInner
(
key
),
values
,
flags
);
}
public
bool
HyperLogLogAdd
(
RedisKey
key
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HyperLogLogAdd
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
long
HyperLogLogLength
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HyperLogLogLength
(
this
.
ToInner
(
key
),
flags
);
}
public
void
HyperLogLogMerge
(
RedisKey
destination
,
RedisKey
[]
sourceKeys
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
this
.
Inner
.
HyperLogLogMerge
(
this
.
ToInner
(
destination
),
this
.
ToInner
(
sourceKeys
),
flags
);
}
public
void
HyperLogLogMerge
(
RedisKey
destination
,
RedisKey
first
,
RedisKey
second
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
this
.
Inner
.
HyperLogLogMerge
(
this
.
ToInner
(
destination
),
this
.
ToInner
(
first
),
this
.
ToInner
(
second
),
flags
);
}
public
EndPoint
IdentifyEndpoint
(
RedisKey
key
=
default
(
RedisKey
),
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
IdentifyEndpoint
(
this
.
ToInner
(
key
),
flags
);
}
public
long
KeyDelete
(
RedisKey
[]
keys
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyDelete
(
this
.
ToInner
(
keys
),
flags
);
}
public
bool
KeyDelete
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyDelete
(
this
.
ToInner
(
key
),
flags
);
}
public
byte
[]
KeyDump
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyDump
(
this
.
ToInner
(
key
),
flags
);
}
public
bool
KeyExists
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyExists
(
this
.
ToInner
(
key
),
flags
);
}
public
bool
KeyExpire
(
RedisKey
key
,
DateTime
?
expiry
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyExpire
(
this
.
ToInner
(
key
),
expiry
,
flags
);
}
public
bool
KeyExpire
(
RedisKey
key
,
TimeSpan
?
expiry
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyExpire
(
this
.
ToInner
(
key
),
expiry
,
flags
);
}
public
void
KeyMigrate
(
RedisKey
key
,
EndPoint
toServer
,
int
toDatabase
=
0
,
int
timeoutMilliseconds
=
0
,
MigrateOptions
migrateOptions
=
MigrateOptions
.
None
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
this
.
Inner
.
KeyMigrate
(
this
.
ToInner
(
key
),
toServer
,
toDatabase
,
timeoutMilliseconds
,
migrateOptions
,
flags
);
}
public
bool
KeyMove
(
RedisKey
key
,
int
database
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyMove
(
this
.
ToInner
(
key
),
database
,
flags
);
}
public
bool
KeyPersist
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyPersist
(
this
.
ToInner
(
key
),
flags
);
}
public
RedisKey
KeyRandom
(
CommandFlags
flags
=
CommandFlags
.
None
)
{
throw
new
NotSupportedException
(
"RANDOMKEY is not supported when a key-prefix is specified"
);
}
public
bool
KeyRename
(
RedisKey
key
,
RedisKey
newKey
,
When
when
=
When
.
Always
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyRename
(
this
.
ToInner
(
key
),
this
.
ToInner
(
newKey
),
when
,
flags
);
}
public
void
KeyRestore
(
RedisKey
key
,
byte
[]
value
,
TimeSpan
?
expiry
=
null
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
this
.
Inner
.
KeyRestore
(
this
.
ToInner
(
key
),
value
,
expiry
,
flags
);
}
public
TimeSpan
?
KeyTimeToLive
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyTimeToLive
(
this
.
ToInner
(
key
),
flags
);
}
public
RedisType
KeyType
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyType
(
this
.
ToInner
(
key
),
flags
);
}
public
RedisValue
ListGetByIndex
(
RedisKey
key
,
long
index
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListGetByIndex
(
this
.
ToInner
(
key
),
index
,
flags
);
}
public
long
ListInsertAfter
(
RedisKey
key
,
RedisValue
pivot
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListInsertAfter
(
this
.
ToInner
(
key
),
pivot
,
value
,
flags
);
}
public
long
ListInsertBefore
(
RedisKey
key
,
RedisValue
pivot
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListInsertBefore
(
this
.
ToInner
(
key
),
pivot
,
value
,
flags
);
}
public
RedisValue
ListLeftPop
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListLeftPop
(
this
.
ToInner
(
key
),
flags
);
}
public
long
ListLeftPush
(
RedisKey
key
,
RedisValue
[]
values
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListLeftPush
(
this
.
ToInner
(
key
),
values
,
flags
);
}
public
long
ListLeftPush
(
RedisKey
key
,
RedisValue
value
,
When
when
=
When
.
Always
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListLeftPush
(
this
.
ToInner
(
key
),
value
,
when
,
flags
);
}
public
long
ListLength
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListLength
(
this
.
ToInner
(
key
),
flags
);
}
public
RedisValue
[]
ListRange
(
RedisKey
key
,
long
start
=
0
,
long
stop
=
-
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListRange
(
this
.
ToInner
(
key
),
start
,
stop
,
flags
);
}
public
long
ListRemove
(
RedisKey
key
,
RedisValue
value
,
long
count
=
0
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListRemove
(
this
.
ToInner
(
key
),
value
,
count
,
flags
);
}
public
RedisValue
ListRightPop
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListRightPop
(
this
.
ToInner
(
key
),
flags
);
}
public
RedisValue
ListRightPopLeftPush
(
RedisKey
source
,
RedisKey
destination
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListRightPopLeftPush
(
this
.
ToInner
(
source
),
this
.
ToInner
(
destination
),
flags
);
}
public
long
ListRightPush
(
RedisKey
key
,
RedisValue
[]
values
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListRightPush
(
this
.
ToInner
(
key
),
values
,
flags
);
}
public
long
ListRightPush
(
RedisKey
key
,
RedisValue
value
,
When
when
=
When
.
Always
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListRightPush
(
this
.
ToInner
(
key
),
value
,
when
,
flags
);
}
public
void
ListSetByIndex
(
RedisKey
key
,
long
index
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
this
.
Inner
.
ListSetByIndex
(
this
.
ToInner
(
key
),
index
,
value
,
flags
);
}
public
void
ListTrim
(
RedisKey
key
,
long
start
,
long
stop
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
this
.
Inner
.
ListTrim
(
this
.
ToInner
(
key
),
start
,
stop
,
flags
);
}
public
bool
LockExtend
(
RedisKey
key
,
RedisValue
value
,
TimeSpan
expiry
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
LockExtend
(
this
.
ToInner
(
key
),
value
,
expiry
,
flags
);
}
public
RedisValue
LockQuery
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
LockQuery
(
this
.
ToInner
(
key
),
flags
);
}
public
bool
LockRelease
(
RedisKey
key
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
LockRelease
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
bool
LockTake
(
RedisKey
key
,
RedisValue
value
,
TimeSpan
expiry
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
LockTake
(
this
.
ToInner
(
key
),
value
,
expiry
,
flags
);
}
public
long
Publish
(
RedisChannel
channel
,
RedisValue
message
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
Publish
(
this
.
ToInner
(
channel
),
message
,
flags
);
}
public
RedisResult
ScriptEvaluate
(
byte
[]
hash
,
RedisKey
[]
keys
=
null
,
RedisValue
[]
values
=
null
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
// TODO: The return value could contain prefixed keys. It might make sense to 'unprefix' those?
return
this
.
Inner
.
ScriptEvaluate
(
hash
,
this
.
ToInner
(
keys
),
values
,
flags
);
}
public
RedisResult
ScriptEvaluate
(
string
script
,
RedisKey
[]
keys
=
null
,
RedisValue
[]
values
=
null
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
// TODO: The return value could contain prefixed keys. It might make sense to 'unprefix' those?
return
this
.
Inner
.
ScriptEvaluate
(
script
,
this
.
ToInner
(
keys
),
values
,
flags
);
}
public
long
SetAdd
(
RedisKey
key
,
RedisValue
[]
values
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetAdd
(
this
.
ToInner
(
key
),
values
,
flags
);
}
public
bool
SetAdd
(
RedisKey
key
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetAdd
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
long
SetCombineAndStore
(
SetOperation
operation
,
RedisKey
destination
,
RedisKey
[]
keys
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetCombineAndStore
(
operation
,
this
.
ToInner
(
destination
),
this
.
ToInner
(
keys
),
flags
);
}
public
long
SetCombineAndStore
(
SetOperation
operation
,
RedisKey
destination
,
RedisKey
first
,
RedisKey
second
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetCombineAndStore
(
operation
,
this
.
ToInner
(
destination
),
this
.
ToInner
(
first
),
this
.
ToInner
(
second
),
flags
);
}
public
RedisValue
[]
SetCombine
(
SetOperation
operation
,
RedisKey
[]
keys
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetCombine
(
operation
,
this
.
ToInner
(
keys
),
flags
);
}
public
RedisValue
[]
SetCombine
(
SetOperation
operation
,
RedisKey
first
,
RedisKey
second
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetCombine
(
operation
,
this
.
ToInner
(
first
),
this
.
ToInner
(
second
),
flags
);
}
public
bool
SetContains
(
RedisKey
key
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetContains
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
long
SetLength
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetLength
(
this
.
ToInner
(
key
),
flags
);
}
public
RedisValue
[]
SetMembers
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetMembers
(
this
.
ToInner
(
key
),
flags
);
}
public
bool
SetMove
(
RedisKey
source
,
RedisKey
destination
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetMove
(
this
.
ToInner
(
source
),
this
.
ToInner
(
destination
),
value
,
flags
);
}
public
RedisValue
SetPop
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetPop
(
this
.
ToInner
(
key
),
flags
);
}
public
RedisValue
SetRandomMember
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetRandomMember
(
this
.
ToInner
(
key
),
flags
);
}
public
RedisValue
[]
SetRandomMembers
(
RedisKey
key
,
long
count
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetRandomMembers
(
this
.
ToInner
(
key
),
count
,
flags
);
}
public
long
SetRemove
(
RedisKey
key
,
RedisValue
[]
values
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetRemove
(
this
.
ToInner
(
key
),
values
,
flags
);
}
public
bool
SetRemove
(
RedisKey
key
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetRemove
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
long
SortAndStore
(
RedisKey
destination
,
RedisKey
key
,
long
skip
=
0
,
long
take
=
-
1
,
Order
order
=
Order
.
Ascending
,
SortType
sortType
=
SortType
.
Numeric
,
RedisValue
by
=
default
(
RedisValue
),
RedisValue
[]
get
=
null
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortAndStore
(
this
.
ToInner
(
destination
),
this
.
ToInner
(
key
),
skip
,
take
,
order
,
sortType
,
this
.
SortByToInner
(
by
),
this
.
SortGetToInner
(
get
),
flags
);
}
public
RedisValue
[]
Sort
(
RedisKey
key
,
long
skip
=
0
,
long
take
=
-
1
,
Order
order
=
Order
.
Ascending
,
SortType
sortType
=
SortType
.
Numeric
,
RedisValue
by
=
default
(
RedisValue
),
RedisValue
[]
get
=
null
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
Sort
(
this
.
ToInner
(
key
),
skip
,
take
,
order
,
sortType
,
this
.
SortByToInner
(
by
),
this
.
SortGetToInner
(
get
),
flags
);
}
public
long
SortedSetAdd
(
RedisKey
key
,
SortedSetEntry
[]
values
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetAdd
(
this
.
ToInner
(
key
),
values
,
flags
);
}
public
bool
SortedSetAdd
(
RedisKey
key
,
RedisValue
member
,
double
score
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetAdd
(
this
.
ToInner
(
key
),
member
,
score
,
flags
);
}
public
long
SortedSetCombineAndStore
(
SetOperation
operation
,
RedisKey
destination
,
RedisKey
[]
keys
,
double
[]
weights
=
null
,
Aggregate
aggregate
=
Aggregate
.
Sum
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetCombineAndStore
(
operation
,
this
.
ToInner
(
destination
),
this
.
ToInner
(
keys
),
weights
,
aggregate
,
flags
);
}
public
long
SortedSetCombineAndStore
(
SetOperation
operation
,
RedisKey
destination
,
RedisKey
first
,
RedisKey
second
,
Aggregate
aggregate
=
Aggregate
.
Sum
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetCombineAndStore
(
operation
,
this
.
ToInner
(
destination
),
this
.
ToInner
(
first
),
this
.
ToInner
(
second
),
aggregate
,
flags
);
}
public
double
SortedSetDecrement
(
RedisKey
key
,
RedisValue
member
,
double
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetDecrement
(
this
.
ToInner
(
key
),
member
,
value
,
flags
);
}
public
double
SortedSetIncrement
(
RedisKey
key
,
RedisValue
member
,
double
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetIncrement
(
this
.
ToInner
(
key
),
member
,
value
,
flags
);
}
public
long
SortedSetLength
(
RedisKey
key
,
double
min
=
-
1.0
/
0.0
,
double
max
=
1.0
/
0.0
,
Exclude
exclude
=
Exclude
.
None
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetLength
(
this
.
ToInner
(
key
),
min
,
max
,
exclude
,
flags
);
}
public
long
SortedSetLengthByValue
(
RedisKey
key
,
RedisValue
min
,
RedisValue
max
,
Exclude
exclude
=
Exclude
.
None
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetLengthByValue
(
this
.
ToInner
(
key
),
min
,
max
,
exclude
,
flags
);
}
public
RedisValue
[]
SortedSetRangeByRank
(
RedisKey
key
,
long
start
=
0
,
long
stop
=
-
1
,
Order
order
=
Order
.
Ascending
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRangeByRank
(
this
.
ToInner
(
key
),
start
,
stop
,
order
,
flags
);
}
public
SortedSetEntry
[]
SortedSetRangeByRankWithScores
(
RedisKey
key
,
long
start
=
0
,
long
stop
=
-
1
,
Order
order
=
Order
.
Ascending
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRangeByRankWithScores
(
this
.
ToInner
(
key
),
start
,
stop
,
order
,
flags
);
}
public
RedisValue
[]
SortedSetRangeByScore
(
RedisKey
key
,
double
start
=
-
1.0
/
0.0
,
double
stop
=
1.0
/
0.0
,
Exclude
exclude
=
Exclude
.
None
,
Order
order
=
Order
.
Ascending
,
long
skip
=
0
,
long
take
=
-
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRangeByScore
(
this
.
ToInner
(
key
),
start
,
stop
,
exclude
,
order
,
skip
,
take
,
flags
);
}
public
SortedSetEntry
[]
SortedSetRangeByScoreWithScores
(
RedisKey
key
,
double
start
=
-
1.0
/
0.0
,
double
stop
=
1.0
/
0.0
,
Exclude
exclude
=
Exclude
.
None
,
Order
order
=
Order
.
Ascending
,
long
skip
=
0
,
long
take
=
-
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRangeByScoreWithScores
(
this
.
ToInner
(
key
),
start
,
stop
,
exclude
,
order
,
skip
,
take
,
flags
);
}
public
RedisValue
[]
SortedSetRangeByValue
(
RedisKey
key
,
RedisValue
min
=
default
(
RedisValue
),
RedisValue
max
=
default
(
RedisValue
),
Exclude
exclude
=
Exclude
.
None
,
long
skip
=
0
,
long
take
=
-
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRangeByValue
(
this
.
ToInner
(
key
),
min
,
max
,
exclude
,
skip
,
take
,
flags
);
}
public
long
?
SortedSetRank
(
RedisKey
key
,
RedisValue
member
,
Order
order
=
Order
.
Ascending
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRank
(
this
.
ToInner
(
key
),
member
,
order
,
flags
);
}
public
long
SortedSetRemove
(
RedisKey
key
,
RedisValue
[]
members
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRemove
(
this
.
ToInner
(
key
),
members
,
flags
);
}
public
bool
SortedSetRemove
(
RedisKey
key
,
RedisValue
member
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRemove
(
this
.
ToInner
(
key
),
member
,
flags
);
}
public
long
SortedSetRemoveRangeByRank
(
RedisKey
key
,
long
start
,
long
stop
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRemoveRangeByRank
(
this
.
ToInner
(
key
),
start
,
stop
,
flags
);
}
public
long
SortedSetRemoveRangeByScore
(
RedisKey
key
,
double
start
,
double
stop
,
Exclude
exclude
=
Exclude
.
None
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRemoveRangeByScore
(
this
.
ToInner
(
key
),
start
,
stop
,
exclude
,
flags
);
}
public
long
SortedSetRemoveRangeByValue
(
RedisKey
key
,
RedisValue
min
,
RedisValue
max
,
Exclude
exclude
=
Exclude
.
None
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRemoveRangeByValue
(
this
.
ToInner
(
key
),
min
,
max
,
exclude
,
flags
);
}
public
double
?
SortedSetScore
(
RedisKey
key
,
RedisValue
member
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetScore
(
this
.
ToInner
(
key
),
member
,
flags
);
}
public
long
StringAppend
(
RedisKey
key
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringAppend
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
long
StringBitCount
(
RedisKey
key
,
long
start
=
0
,
long
end
=
-
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringBitCount
(
this
.
ToInner
(
key
),
start
,
end
,
flags
);
}
public
long
StringBitOperation
(
Bitwise
operation
,
RedisKey
destination
,
RedisKey
[]
keys
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringBitOperation
(
operation
,
this
.
ToInner
(
destination
),
this
.
ToInner
(
keys
),
flags
);
}
public
long
StringBitOperation
(
Bitwise
operation
,
RedisKey
destination
,
RedisKey
first
,
RedisKey
second
=
default
(
RedisKey
),
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringBitOperation
(
operation
,
this
.
ToInner
(
destination
),
this
.
ToInner
(
first
),
this
.
ToInnerOrDefault
(
second
),
flags
);
}
public
long
StringBitPosition
(
RedisKey
key
,
bool
bit
,
long
start
=
0
,
long
end
=
-
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringBitPosition
(
this
.
ToInner
(
key
),
bit
,
start
,
end
,
flags
);
}
public
double
StringDecrement
(
RedisKey
key
,
double
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringDecrement
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
long
StringDecrement
(
RedisKey
key
,
long
value
=
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringDecrement
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
RedisValue
[]
StringGet
(
RedisKey
[]
keys
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringGet
(
this
.
ToInner
(
keys
),
flags
);
}
public
RedisValue
StringGet
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringGet
(
this
.
ToInner
(
key
),
flags
);
}
public
bool
StringGetBit
(
RedisKey
key
,
long
offset
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringGetBit
(
this
.
ToInner
(
key
),
offset
,
flags
);
}
public
RedisValue
StringGetRange
(
RedisKey
key
,
long
start
,
long
end
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringGetRange
(
this
.
ToInner
(
key
),
start
,
end
,
flags
);
}
public
RedisValue
StringGetSet
(
RedisKey
key
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringGetSet
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
RedisValueWithExpiry
StringGetWithExpiry
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringGetWithExpiry
(
this
.
ToInner
(
key
),
flags
);
}
public
double
StringIncrement
(
RedisKey
key
,
double
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringIncrement
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
long
StringIncrement
(
RedisKey
key
,
long
value
=
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringIncrement
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
long
StringLength
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringLength
(
this
.
ToInner
(
key
),
flags
);
}
public
bool
StringSet
(
KeyValuePair
<
RedisKey
,
RedisValue
>[]
values
,
When
when
=
When
.
Always
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringSet
(
this
.
ToInner
(
values
),
when
,
flags
);
}
public
bool
StringSet
(
RedisKey
key
,
RedisValue
value
,
TimeSpan
?
expiry
=
null
,
When
when
=
When
.
Always
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringSet
(
this
.
ToInner
(
key
),
value
,
expiry
,
when
,
flags
);
}
public
bool
StringSetBit
(
RedisKey
key
,
long
offset
,
bool
bit
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringSetBit
(
this
.
ToInner
(
key
),
offset
,
bit
,
flags
);
}
public
RedisValue
StringSetRange
(
RedisKey
key
,
long
offset
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringSetRange
(
this
.
ToInner
(
key
),
offset
,
value
,
flags
);
}
public
TimeSpan
Ping
(
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
Ping
(
flags
);
}
public
IEnumerable
<
HashEntry
>
HashScan
(
RedisKey
key
,
RedisValue
pattern
=
default
(
RedisValue
),
int
pageSize
=
10
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashScan
(
this
.
ToInner
(
key
),
pattern
,
pageSize
,
flags
);
}
public
IEnumerable
<
RedisValue
>
SetScan
(
RedisKey
key
,
RedisValue
pattern
=
default
(
RedisValue
),
int
pageSize
=
10
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetScan
(
this
.
ToInner
(
key
),
pattern
,
pageSize
,
flags
);
}
public
IEnumerable
<
SortedSetEntry
>
SortedSetScan
(
RedisKey
key
,
RedisValue
pattern
=
default
(
RedisValue
),
int
pageSize
=
10
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetScan
(
this
.
ToInner
(
key
),
pattern
,
pageSize
,
flags
);
}
public
string
ClientGetName
(
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ClientGetName
(
flags
);
}
public
void
Quit
(
CommandFlags
flags
=
CommandFlags
.
None
)
{
this
.
Inner
.
Quit
(
flags
);
}
}
}
StackExchange.Redis/StackExchange/Redis/KeyspaceIsolation/TransactionWrapper.cs
0 → 100644
View file @
94dfd9b1
using
System
;
using
System.Threading.Tasks
;
namespace
StackExchange.Redis.StackExchange.Redis.KeyspaceIsolation
{
internal
sealed
class
TransactionWrapper
:
WrapperBase
<
ITransaction
>,
ITransaction
{
public
TransactionWrapper
(
ITransaction
inner
,
RedisKey
prefix
)
:
base
(
inner
,
prefix
)
{
}
public
ConditionResult
AddCondition
(
Condition
condition
)
{
return
this
.
Inner
.
AddCondition
(
this
.
ToInner
(
condition
));
}
public
bool
Execute
(
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
Execute
(
flags
);
}
public
Task
<
bool
>
ExecuteAsync
(
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ExecuteAsync
(
flags
);
}
public
void
Execute
()
{
this
.
Inner
.
Execute
();
}
}
}
StackExchange.Redis/StackExchange/Redis/KeyspaceIsolation/WrapperBase.cs
0 → 100644
View file @
94dfd9b1
using
System
;
using
System.Collections.Generic
;
using
System.Globalization
;
using
System.Net
;
using
System.Threading.Tasks
;
namespace
StackExchange.Redis.StackExchange.Redis.KeyspaceIsolation
{
internal
abstract
class
WrapperBase
<
TInner
>
:
IDatabaseAsync
where
TInner
:
IDatabaseAsync
{
private
readonly
TInner
_inner
;
private
readonly
RedisKey
_prefix
;
protected
WrapperBase
(
TInner
inner
,
RedisKey
prefix
)
{
_inner
=
inner
;
_prefix
=
prefix
;
}
public
ConnectionMultiplexer
Multiplexer
{
get
{
return
this
.
Inner
.
Multiplexer
;
}
}
internal
TInner
Inner
{
get
{
return
_inner
;
}
}
internal
RedisKey
Prefix
{
get
{
return
_prefix
;
}
}
public
Task
<
RedisValue
>
DebugObjectAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
DebugObjectAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
double
>
HashDecrementAsync
(
RedisKey
key
,
RedisValue
hashField
,
double
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashDecrementAsync
(
this
.
ToInner
(
key
),
hashField
,
value
,
flags
);
}
public
Task
<
long
>
HashDecrementAsync
(
RedisKey
key
,
RedisValue
hashField
,
long
value
=
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashDecrementAsync
(
this
.
ToInner
(
key
),
hashField
,
value
,
flags
);
}
public
Task
<
long
>
HashDeleteAsync
(
RedisKey
key
,
RedisValue
[]
hashFields
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashDeleteAsync
(
this
.
ToInner
(
key
),
hashFields
,
flags
);
}
public
Task
<
bool
>
HashDeleteAsync
(
RedisKey
key
,
RedisValue
hashField
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashDeleteAsync
(
this
.
ToInner
(
key
),
hashField
,
flags
);
}
public
Task
<
bool
>
HashExistsAsync
(
RedisKey
key
,
RedisValue
hashField
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashExistsAsync
(
this
.
ToInner
(
key
),
hashField
,
flags
);
}
public
Task
<
HashEntry
[
]>
HashGetAllAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashGetAllAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
RedisValue
[
]>
HashGetAsync
(
RedisKey
key
,
RedisValue
[]
hashFields
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashGetAsync
(
this
.
ToInner
(
key
),
hashFields
,
flags
);
}
public
Task
<
RedisValue
>
HashGetAsync
(
RedisKey
key
,
RedisValue
hashField
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashGetAsync
(
this
.
ToInner
(
key
),
hashField
,
flags
);
}
public
Task
<
double
>
HashIncrementAsync
(
RedisKey
key
,
RedisValue
hashField
,
double
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashIncrementAsync
(
this
.
ToInner
(
key
),
hashField
,
value
,
flags
);
}
public
Task
<
long
>
HashIncrementAsync
(
RedisKey
key
,
RedisValue
hashField
,
long
value
=
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashIncrementAsync
(
this
.
ToInner
(
key
),
hashField
,
value
,
flags
);
}
public
Task
<
RedisValue
[
]>
HashKeysAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashKeysAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
long
>
HashLengthAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashLengthAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
bool
>
HashSetAsync
(
RedisKey
key
,
RedisValue
hashField
,
RedisValue
value
,
When
when
=
When
.
Always
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashSetAsync
(
this
.
ToInner
(
key
),
hashField
,
value
,
when
,
flags
);
}
public
Task
HashSetAsync
(
RedisKey
key
,
HashEntry
[]
hashFields
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashSetAsync
(
this
.
ToInner
(
key
),
hashFields
,
flags
);
}
public
Task
<
RedisValue
[
]>
HashValuesAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HashValuesAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
bool
>
HyperLogLogAddAsync
(
RedisKey
key
,
RedisValue
[]
values
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HyperLogLogAddAsync
(
this
.
ToInner
(
key
),
values
,
flags
);
}
public
Task
<
bool
>
HyperLogLogAddAsync
(
RedisKey
key
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HyperLogLogAddAsync
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
Task
<
long
>
HyperLogLogLengthAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HyperLogLogLengthAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
HyperLogLogMergeAsync
(
RedisKey
destination
,
RedisKey
[]
sourceKeys
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HyperLogLogMergeAsync
(
this
.
ToInner
(
destination
),
this
.
ToInner
(
sourceKeys
),
flags
);
}
public
Task
HyperLogLogMergeAsync
(
RedisKey
destination
,
RedisKey
first
,
RedisKey
second
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
HyperLogLogMergeAsync
(
this
.
ToInner
(
destination
),
this
.
ToInner
(
first
),
this
.
ToInner
(
second
),
flags
);
}
public
Task
<
EndPoint
>
IdentifyEndpointAsync
(
RedisKey
key
=
default
(
RedisKey
),
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
IdentifyEndpointAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
bool
IsConnected
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
IsConnected
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
long
>
KeyDeleteAsync
(
RedisKey
[]
keys
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyDeleteAsync
(
this
.
ToInner
(
keys
),
flags
);
}
public
Task
<
bool
>
KeyDeleteAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyDeleteAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
byte
[
]>
KeyDumpAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyDumpAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
bool
>
KeyExistsAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyExistsAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
bool
>
KeyExpireAsync
(
RedisKey
key
,
DateTime
?
expiry
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyExpireAsync
(
this
.
ToInner
(
key
),
expiry
,
flags
);
}
public
Task
<
bool
>
KeyExpireAsync
(
RedisKey
key
,
TimeSpan
?
expiry
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyExpireAsync
(
this
.
ToInner
(
key
),
expiry
,
flags
);
}
public
Task
KeyMigrateAsync
(
RedisKey
key
,
EndPoint
toServer
,
int
toDatabase
=
0
,
int
timeoutMilliseconds
=
0
,
MigrateOptions
migrateOptions
=
MigrateOptions
.
None
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyMigrateAsync
(
this
.
ToInner
(
key
),
toServer
,
toDatabase
,
timeoutMilliseconds
,
migrateOptions
,
flags
);
}
public
Task
<
bool
>
KeyMoveAsync
(
RedisKey
key
,
int
database
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyMoveAsync
(
this
.
ToInner
(
key
),
database
,
flags
);
}
public
Task
<
bool
>
KeyPersistAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyPersistAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
RedisKey
>
KeyRandomAsync
(
CommandFlags
flags
=
CommandFlags
.
None
)
{
throw
new
NotSupportedException
(
"RANDOMKEY is not supported when a key-prefix is specified"
);
}
public
Task
<
bool
>
KeyRenameAsync
(
RedisKey
key
,
RedisKey
newKey
,
When
when
=
When
.
Always
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyRenameAsync
(
this
.
ToInner
(
key
),
this
.
ToInner
(
newKey
),
when
,
flags
);
}
public
Task
KeyRestoreAsync
(
RedisKey
key
,
byte
[]
value
,
TimeSpan
?
expiry
=
null
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyRestoreAsync
(
this
.
ToInner
(
key
),
value
,
expiry
,
flags
);
}
public
Task
<
TimeSpan
?>
KeyTimeToLiveAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyTimeToLiveAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
RedisType
>
KeyTypeAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
KeyTypeAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
RedisValue
>
ListGetByIndexAsync
(
RedisKey
key
,
long
index
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListGetByIndexAsync
(
this
.
ToInner
(
key
),
index
,
flags
);
}
public
Task
<
long
>
ListInsertAfterAsync
(
RedisKey
key
,
RedisValue
pivot
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListInsertAfterAsync
(
this
.
ToInner
(
key
),
pivot
,
value
,
flags
);
}
public
Task
<
long
>
ListInsertBeforeAsync
(
RedisKey
key
,
RedisValue
pivot
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListInsertBeforeAsync
(
this
.
ToInner
(
key
),
pivot
,
value
,
flags
);
}
public
Task
<
RedisValue
>
ListLeftPopAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListLeftPopAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
long
>
ListLeftPushAsync
(
RedisKey
key
,
RedisValue
[]
values
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListLeftPushAsync
(
this
.
ToInner
(
key
),
values
,
flags
);
}
public
Task
<
long
>
ListLeftPushAsync
(
RedisKey
key
,
RedisValue
value
,
When
when
=
When
.
Always
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListLeftPushAsync
(
this
.
ToInner
(
key
),
value
,
when
,
flags
);
}
public
Task
<
long
>
ListLengthAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListLengthAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
RedisValue
[
]>
ListRangeAsync
(
RedisKey
key
,
long
start
=
0
,
long
stop
=
-
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListRangeAsync
(
this
.
ToInner
(
key
),
start
,
stop
,
flags
);
}
public
Task
<
long
>
ListRemoveAsync
(
RedisKey
key
,
RedisValue
value
,
long
count
=
0
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListRemoveAsync
(
this
.
ToInner
(
key
),
value
,
count
,
flags
);
}
public
Task
<
RedisValue
>
ListRightPopAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListRightPopAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
RedisValue
>
ListRightPopLeftPushAsync
(
RedisKey
source
,
RedisKey
destination
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListRightPopLeftPushAsync
(
this
.
ToInner
(
source
),
this
.
ToInner
(
destination
),
flags
);
}
public
Task
<
long
>
ListRightPushAsync
(
RedisKey
key
,
RedisValue
[]
values
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListRightPushAsync
(
this
.
ToInner
(
key
),
values
,
flags
);
}
public
Task
<
long
>
ListRightPushAsync
(
RedisKey
key
,
RedisValue
value
,
When
when
=
When
.
Always
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListRightPushAsync
(
this
.
ToInner
(
key
),
value
,
when
,
flags
);
}
public
Task
ListSetByIndexAsync
(
RedisKey
key
,
long
index
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListSetByIndexAsync
(
this
.
ToInner
(
key
),
index
,
value
,
flags
);
}
public
Task
ListTrimAsync
(
RedisKey
key
,
long
start
,
long
stop
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ListTrimAsync
(
this
.
ToInner
(
key
),
start
,
stop
,
flags
);
}
public
Task
<
bool
>
LockExtendAsync
(
RedisKey
key
,
RedisValue
value
,
TimeSpan
expiry
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
LockExtendAsync
(
this
.
ToInner
(
key
),
value
,
expiry
,
flags
);
}
public
Task
<
RedisValue
>
LockQueryAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
LockQueryAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
bool
>
LockReleaseAsync
(
RedisKey
key
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
LockReleaseAsync
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
Task
<
bool
>
LockTakeAsync
(
RedisKey
key
,
RedisValue
value
,
TimeSpan
expiry
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
LockTakeAsync
(
this
.
ToInner
(
key
),
value
,
expiry
,
flags
);
}
public
Task
<
long
>
PublishAsync
(
RedisChannel
channel
,
RedisValue
message
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
PublishAsync
(
this
.
ToInner
(
channel
),
message
,
flags
);
}
public
Task
<
RedisResult
>
ScriptEvaluateAsync
(
byte
[]
hash
,
RedisKey
[]
keys
=
null
,
RedisValue
[]
values
=
null
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
// TODO: The return value could contain prefixed keys. It might make sense to 'unprefix' those?
return
this
.
Inner
.
ScriptEvaluateAsync
(
hash
,
this
.
ToInner
(
keys
),
values
,
flags
);
}
public
Task
<
RedisResult
>
ScriptEvaluateAsync
(
string
script
,
RedisKey
[]
keys
=
null
,
RedisValue
[]
values
=
null
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
// TODO: The return value could contain prefixed keys. It might make sense to 'unprefix' those?
return
this
.
Inner
.
ScriptEvaluateAsync
(
script
,
this
.
ToInner
(
keys
),
values
,
flags
);
}
public
Task
<
long
>
SetAddAsync
(
RedisKey
key
,
RedisValue
[]
values
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetAddAsync
(
this
.
ToInner
(
key
),
values
,
flags
);
}
public
Task
<
bool
>
SetAddAsync
(
RedisKey
key
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetAddAsync
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
Task
<
long
>
SetCombineAndStoreAsync
(
SetOperation
operation
,
RedisKey
destination
,
RedisKey
[]
keys
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetCombineAndStoreAsync
(
operation
,
this
.
ToInner
(
destination
),
this
.
ToInner
(
keys
),
flags
);
}
public
Task
<
long
>
SetCombineAndStoreAsync
(
SetOperation
operation
,
RedisKey
destination
,
RedisKey
first
,
RedisKey
second
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetCombineAndStoreAsync
(
operation
,
this
.
ToInner
(
destination
),
this
.
ToInner
(
first
),
this
.
ToInner
(
second
),
flags
);
}
public
Task
<
RedisValue
[
]>
SetCombineAsync
(
SetOperation
operation
,
RedisKey
[]
keys
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetCombineAsync
(
operation
,
this
.
ToInner
(
keys
),
flags
);
}
public
Task
<
RedisValue
[
]>
SetCombineAsync
(
SetOperation
operation
,
RedisKey
first
,
RedisKey
second
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetCombineAsync
(
operation
,
this
.
ToInner
(
first
),
this
.
ToInner
(
second
),
flags
);
}
public
Task
<
bool
>
SetContainsAsync
(
RedisKey
key
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetContainsAsync
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
Task
<
long
>
SetLengthAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetLengthAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
RedisValue
[
]>
SetMembersAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetMembersAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
bool
>
SetMoveAsync
(
RedisKey
source
,
RedisKey
destination
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetMoveAsync
(
this
.
ToInner
(
source
),
this
.
ToInner
(
destination
),
value
,
flags
);
}
public
Task
<
RedisValue
>
SetPopAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetPopAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
RedisValue
>
SetRandomMemberAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetRandomMemberAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
RedisValue
[
]>
SetRandomMembersAsync
(
RedisKey
key
,
long
count
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetRandomMembersAsync
(
this
.
ToInner
(
key
),
count
,
flags
);
}
public
Task
<
long
>
SetRemoveAsync
(
RedisKey
key
,
RedisValue
[]
values
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetRemoveAsync
(
this
.
ToInner
(
key
),
values
,
flags
);
}
public
Task
<
bool
>
SetRemoveAsync
(
RedisKey
key
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SetRemoveAsync
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
Task
<
long
>
SortAndStoreAsync
(
RedisKey
destination
,
RedisKey
key
,
long
skip
=
0
,
long
take
=
-
1
,
Order
order
=
Order
.
Ascending
,
SortType
sortType
=
SortType
.
Numeric
,
RedisValue
by
=
default
(
RedisValue
),
RedisValue
[]
get
=
null
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortAndStoreAsync
(
this
.
ToInner
(
destination
),
this
.
ToInner
(
key
),
skip
,
take
,
order
,
sortType
,
this
.
SortByToInner
(
by
),
this
.
SortGetToInner
(
get
),
flags
);
}
public
Task
<
RedisValue
[
]>
SortAsync
(
RedisKey
key
,
long
skip
=
0
,
long
take
=
-
1
,
Order
order
=
Order
.
Ascending
,
SortType
sortType
=
SortType
.
Numeric
,
RedisValue
by
=
default
(
RedisValue
),
RedisValue
[]
get
=
null
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortAsync
(
this
.
ToInner
(
key
),
skip
,
take
,
order
,
sortType
,
this
.
SortByToInner
(
by
),
this
.
SortGetToInner
(
get
),
flags
);
}
public
Task
<
long
>
SortedSetAddAsync
(
RedisKey
key
,
SortedSetEntry
[]
values
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetAddAsync
(
this
.
ToInner
(
key
),
values
,
flags
);
}
public
Task
<
bool
>
SortedSetAddAsync
(
RedisKey
key
,
RedisValue
member
,
double
score
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetAddAsync
(
this
.
ToInner
(
key
),
member
,
score
,
flags
);
}
public
Task
<
long
>
SortedSetCombineAndStoreAsync
(
SetOperation
operation
,
RedisKey
destination
,
RedisKey
[]
keys
,
double
[]
weights
=
null
,
Aggregate
aggregate
=
Aggregate
.
Sum
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetCombineAndStoreAsync
(
operation
,
this
.
ToInner
(
destination
),
this
.
ToInner
(
keys
),
weights
,
aggregate
,
flags
);
}
public
Task
<
long
>
SortedSetCombineAndStoreAsync
(
SetOperation
operation
,
RedisKey
destination
,
RedisKey
first
,
RedisKey
second
,
Aggregate
aggregate
=
Aggregate
.
Sum
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetCombineAndStoreAsync
(
operation
,
this
.
ToInner
(
destination
),
this
.
ToInner
(
first
),
this
.
ToInner
(
second
),
aggregate
,
flags
);
}
public
Task
<
double
>
SortedSetDecrementAsync
(
RedisKey
key
,
RedisValue
member
,
double
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetDecrementAsync
(
this
.
ToInner
(
key
),
member
,
value
,
flags
);
}
public
Task
<
double
>
SortedSetIncrementAsync
(
RedisKey
key
,
RedisValue
member
,
double
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetIncrementAsync
(
this
.
ToInner
(
key
),
member
,
value
,
flags
);
}
public
Task
<
long
>
SortedSetLengthAsync
(
RedisKey
key
,
double
min
=
-
1.0
/
0.0
,
double
max
=
1.0
/
0.0
,
Exclude
exclude
=
Exclude
.
None
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetLengthAsync
(
this
.
ToInner
(
key
),
min
,
max
,
exclude
,
flags
);
}
public
Task
<
long
>
SortedSetLengthByValueAsync
(
RedisKey
key
,
RedisValue
min
,
RedisValue
max
,
Exclude
exclude
=
Exclude
.
None
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetLengthByValueAsync
(
this
.
ToInner
(
key
),
min
,
max
,
exclude
,
flags
);
}
public
Task
<
RedisValue
[
]>
SortedSetRangeByRankAsync
(
RedisKey
key
,
long
start
=
0
,
long
stop
=
-
1
,
Order
order
=
Order
.
Ascending
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRangeByRankAsync
(
this
.
ToInner
(
key
),
start
,
stop
,
order
,
flags
);
}
public
Task
<
SortedSetEntry
[
]>
SortedSetRangeByRankWithScoresAsync
(
RedisKey
key
,
long
start
=
0
,
long
stop
=
-
1
,
Order
order
=
Order
.
Ascending
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRangeByRankWithScoresAsync
(
this
.
ToInner
(
key
),
start
,
stop
,
order
,
flags
);
}
public
Task
<
RedisValue
[
]>
SortedSetRangeByScoreAsync
(
RedisKey
key
,
double
start
=
-
1.0
/
0.0
,
double
stop
=
1.0
/
0.0
,
Exclude
exclude
=
Exclude
.
None
,
Order
order
=
Order
.
Ascending
,
long
skip
=
0
,
long
take
=
-
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRangeByScoreAsync
(
this
.
ToInner
(
key
),
start
,
stop
,
exclude
,
order
,
skip
,
take
,
flags
);
}
public
Task
<
SortedSetEntry
[
]>
SortedSetRangeByScoreWithScoresAsync
(
RedisKey
key
,
double
start
=
-
1.0
/
0.0
,
double
stop
=
1.0
/
0.0
,
Exclude
exclude
=
Exclude
.
None
,
Order
order
=
Order
.
Ascending
,
long
skip
=
0
,
long
take
=
-
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRangeByScoreWithScoresAsync
(
this
.
ToInner
(
key
),
start
,
stop
,
exclude
,
order
,
skip
,
take
,
flags
);
}
public
Task
<
RedisValue
[
]>
SortedSetRangeByValueAsync
(
RedisKey
key
,
RedisValue
min
=
default
(
RedisValue
),
RedisValue
max
=
default
(
RedisValue
),
Exclude
exclude
=
Exclude
.
None
,
long
skip
=
0
,
long
take
=
-
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRangeByValueAsync
(
this
.
ToInner
(
key
),
min
,
max
,
exclude
,
skip
,
take
,
flags
);
}
public
Task
<
long
?>
SortedSetRankAsync
(
RedisKey
key
,
RedisValue
member
,
Order
order
=
Order
.
Ascending
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRankAsync
(
this
.
ToInner
(
key
),
member
,
order
,
flags
);
}
public
Task
<
long
>
SortedSetRemoveAsync
(
RedisKey
key
,
RedisValue
[]
members
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRemoveAsync
(
this
.
ToInner
(
key
),
members
,
flags
);
}
public
Task
<
bool
>
SortedSetRemoveAsync
(
RedisKey
key
,
RedisValue
member
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRemoveAsync
(
this
.
ToInner
(
key
),
member
,
flags
);
}
public
Task
<
long
>
SortedSetRemoveRangeByRankAsync
(
RedisKey
key
,
long
start
,
long
stop
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRemoveRangeByRankAsync
(
this
.
ToInner
(
key
),
start
,
stop
,
flags
);
}
public
Task
<
long
>
SortedSetRemoveRangeByScoreAsync
(
RedisKey
key
,
double
start
,
double
stop
,
Exclude
exclude
=
Exclude
.
None
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRemoveRangeByScoreAsync
(
this
.
ToInner
(
key
),
start
,
stop
,
exclude
,
flags
);
}
public
Task
<
long
>
SortedSetRemoveRangeByValueAsync
(
RedisKey
key
,
RedisValue
min
,
RedisValue
max
,
Exclude
exclude
=
Exclude
.
None
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetRemoveRangeByValueAsync
(
this
.
ToInner
(
key
),
min
,
max
,
exclude
,
flags
);
}
public
Task
<
double
?>
SortedSetScoreAsync
(
RedisKey
key
,
RedisValue
member
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
SortedSetScoreAsync
(
this
.
ToInner
(
key
),
member
,
flags
);
}
public
Task
<
long
>
StringAppendAsync
(
RedisKey
key
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringAppendAsync
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
Task
<
long
>
StringBitCountAsync
(
RedisKey
key
,
long
start
=
0
,
long
end
=
-
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringBitCountAsync
(
this
.
ToInner
(
key
),
start
,
end
,
flags
);
}
public
Task
<
long
>
StringBitOperationAsync
(
Bitwise
operation
,
RedisKey
destination
,
RedisKey
[]
keys
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringBitOperationAsync
(
operation
,
this
.
ToInner
(
destination
),
this
.
ToInner
(
keys
),
flags
);
}
public
Task
<
long
>
StringBitOperationAsync
(
Bitwise
operation
,
RedisKey
destination
,
RedisKey
first
,
RedisKey
second
=
default
(
RedisKey
),
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringBitOperationAsync
(
operation
,
this
.
ToInner
(
destination
),
this
.
ToInner
(
first
),
this
.
ToInnerOrDefault
(
second
),
flags
);
}
public
Task
<
long
>
StringBitPositionAsync
(
RedisKey
key
,
bool
bit
,
long
start
=
0
,
long
end
=
-
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringBitPositionAsync
(
this
.
ToInner
(
key
),
bit
,
start
,
end
,
flags
);
}
public
Task
<
double
>
StringDecrementAsync
(
RedisKey
key
,
double
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringDecrementAsync
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
Task
<
long
>
StringDecrementAsync
(
RedisKey
key
,
long
value
=
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringDecrementAsync
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
Task
<
RedisValue
[
]>
StringGetAsync
(
RedisKey
[]
keys
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringGetAsync
(
this
.
ToInner
(
keys
),
flags
);
}
public
Task
<
RedisValue
>
StringGetAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringGetAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
bool
>
StringGetBitAsync
(
RedisKey
key
,
long
offset
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringGetBitAsync
(
this
.
ToInner
(
key
),
offset
,
flags
);
}
public
Task
<
RedisValue
>
StringGetRangeAsync
(
RedisKey
key
,
long
start
,
long
end
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringGetRangeAsync
(
this
.
ToInner
(
key
),
start
,
end
,
flags
);
}
public
Task
<
RedisValue
>
StringGetSetAsync
(
RedisKey
key
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringGetSetAsync
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
Task
<
RedisValueWithExpiry
>
StringGetWithExpiryAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringGetWithExpiryAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
double
>
StringIncrementAsync
(
RedisKey
key
,
double
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringIncrementAsync
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
Task
<
long
>
StringIncrementAsync
(
RedisKey
key
,
long
value
=
1
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringIncrementAsync
(
this
.
ToInner
(
key
),
value
,
flags
);
}
public
Task
<
long
>
StringLengthAsync
(
RedisKey
key
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringLengthAsync
(
this
.
ToInner
(
key
),
flags
);
}
public
Task
<
bool
>
StringSetAsync
(
KeyValuePair
<
RedisKey
,
RedisValue
>[]
values
,
When
when
=
When
.
Always
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringSetAsync
(
this
.
ToInner
(
values
),
when
,
flags
);
}
public
Task
<
bool
>
StringSetAsync
(
RedisKey
key
,
RedisValue
value
,
TimeSpan
?
expiry
=
null
,
When
when
=
When
.
Always
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringSetAsync
(
this
.
ToInner
(
key
),
value
,
expiry
,
when
,
flags
);
}
public
Task
<
bool
>
StringSetBitAsync
(
RedisKey
key
,
long
offset
,
bool
bit
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringSetBitAsync
(
this
.
ToInner
(
key
),
offset
,
bit
,
flags
);
}
public
Task
<
RedisValue
>
StringSetRangeAsync
(
RedisKey
key
,
long
offset
,
RedisValue
value
,
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
StringSetRangeAsync
(
this
.
ToInner
(
key
),
offset
,
value
,
flags
);
}
public
Task
<
TimeSpan
>
PingAsync
(
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
PingAsync
(
flags
);
}
public
bool
TryWait
(
Task
task
)
{
return
this
.
Inner
.
TryWait
(
task
);
}
public
TResult
Wait
<
TResult
>(
Task
<
TResult
>
task
)
{
return
this
.
Inner
.
Wait
(
task
);
}
public
void
Wait
(
Task
task
)
{
this
.
Inner
.
Wait
(
task
);
}
public
void
WaitAll
(
params
Task
[]
tasks
)
{
this
.
Inner
.
WaitAll
(
tasks
);
}
public
Task
<
string
>
ClientGetNameAsync
(
CommandFlags
flags
=
CommandFlags
.
None
)
{
return
this
.
Inner
.
ClientGetNameAsync
(
flags
);
}
protected
RedisKey
ToInner
(
RedisKey
outer
)
{
return
this
.
Prefix
+
outer
;
}
protected
RedisKey
ToInnerOrDefault
(
RedisKey
outer
)
{
if
(
outer
==
default
(
RedisKey
))
{
return
outer
;
}
else
{
return
this
.
ToInner
(
outer
);
}
}
protected
RedisKey
[]
ToInner
(
RedisKey
[]
outer
)
{
if
(
outer
==
null
||
outer
.
Length
==
0
)
{
return
outer
;
}
else
{
RedisKey
[]
inner
=
new
RedisKey
[
outer
.
Length
];
for
(
int
i
=
0
;
i
<
outer
.
Length
;
++
i
)
{
inner
[
i
]
=
this
.
ToInner
(
outer
[
i
]);
}
return
inner
;
}
}
protected
KeyValuePair
<
RedisKey
,
RedisValue
>
ToInner
(
KeyValuePair
<
RedisKey
,
RedisValue
>
outer
)
{
return
new
KeyValuePair
<
RedisKey
,
RedisValue
>(
this
.
ToInner
(
outer
.
Key
),
outer
.
Value
);
}
protected
KeyValuePair
<
RedisKey
,
RedisValue
>[]
ToInner
(
KeyValuePair
<
RedisKey
,
RedisValue
>[]
outer
)
{
if
(
outer
==
null
||
outer
.
Length
==
0
)
{
return
outer
;
}
else
{
KeyValuePair
<
RedisKey
,
RedisValue
>[]
inner
=
new
KeyValuePair
<
RedisKey
,
RedisValue
>[
outer
.
Length
];
for
(
int
i
=
0
;
i
<
outer
.
Length
;
++
i
)
{
inner
[
i
]
=
this
.
ToInner
(
outer
[
i
]);
}
return
inner
;
}
}
protected
RedisValue
ToInner
(
RedisValue
outer
)
{
return
this
.
Prefix
+
outer
;
}
protected
RedisValue
SortByToInner
(
RedisValue
outer
)
{
if
(
outer
==
"nosort"
)
{
return
outer
;
}
else
{
return
this
.
ToInner
(
outer
);
}
}
protected
RedisValue
SortGetToInner
(
RedisValue
outer
)
{
if
(
outer
==
"#"
)
{
return
outer
;
}
else
{
return
this
.
ToInner
(
outer
);
}
}
protected
RedisValue
[]
SortGetToInner
(
RedisValue
[]
outer
)
{
if
(
outer
==
null
||
outer
.
Length
==
0
)
{
return
outer
;
}
else
{
RedisValue
[]
inner
=
new
RedisValue
[
outer
.
Length
];
for
(
int
i
=
0
;
i
<
outer
.
Length
;
++
i
)
{
inner
[
i
]
=
this
.
SortGetToInner
(
outer
[
i
]);
}
return
inner
;
}
}
protected
RedisChannel
ToInner
(
RedisChannel
outer
)
{
return
this
.
Prefix
+
outer
;
}
protected
Condition
ToInner
(
Condition
outer
)
{
Condition
.
ExistsCondition
asExists
=
outer
as
Condition
.
ExistsCondition
;
if
(
asExists
!=
null
)
{
return
this
.
ToInner
(
asExists
);
}
Condition
.
EqualsCondition
asEquals
=
outer
as
Condition
.
EqualsCondition
;
if
(
asEquals
!=
null
)
{
return
this
.
ToInner
(
asEquals
);
}
throw
new
NotSupportedException
(
string
.
Format
(
CultureInfo
.
InvariantCulture
,
"Unsupported condition: {0}"
,
outer
));
}
private
Condition
.
ExistsCondition
ToInner
(
Condition
.
ExistsCondition
outer
)
{
return
new
Condition
.
ExistsCondition
(
this
.
ToInner
(
outer
.
key
),
outer
.
hashField
,
outer
.
expectedResult
);
}
private
Condition
.
EqualsCondition
ToInner
(
Condition
.
EqualsCondition
outer
)
{
return
new
Condition
.
EqualsCondition
(
this
.
ToInner
(
outer
.
key
),
outer
.
hashField
,
outer
.
expectedEqual
,
outer
.
expectedValue
);
}
}
}
StackExchange.Redis_Net40/StackExchange.Redis_Net40.StrongName.csproj
View file @
94dfd9b1
...
@@ -151,6 +151,11 @@
...
@@ -151,6 +151,11 @@
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\StringSplits.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\StringSplits.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\TaskSource.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\TaskSource.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\When.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\When.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\KeyspaceIsolation\BatchWrapper.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\KeyspaceIsolation\DatabaseExtension.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\KeyspaceIsolation\DatabaseWrapper.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\KeyspaceIsolation\TransactionWrapper.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\KeyspaceIsolation\WrapperBase.cs"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<None
Include=
"packages.config"
/>
<None
Include=
"packages.config"
/>
...
...
StackExchange.Redis_Net40/StackExchange.Redis_Net40.csproj
View file @
94dfd9b1
...
@@ -145,6 +145,11 @@
...
@@ -145,6 +145,11 @@
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\StringSplits.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\StringSplits.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\TaskSource.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\TaskSource.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\When.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\When.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\KeyspaceIsolation\BatchWrapper.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\KeyspaceIsolation\DatabaseExtension.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\KeyspaceIsolation\DatabaseWrapper.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\KeyspaceIsolation\TransactionWrapper.cs"
/>
<Compile
Include=
"..\StackExchange.Redis\StackExchange\Redis\KeyspaceIsolation\WrapperBase.cs"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<None
Include=
"app.config"
/>
<None
Include=
"app.config"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment