diff --git a/.gitignore b/.gitignore
index bc9c1f84..d28597e3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,10 +34,18 @@ obj/
_ReSharper*/
[Tt]est[Rr]esult*
App_Data/
+.vs/
+.vscode/
+*.lock.json
+*.nuget.props
+*.nuget.targets
NuGet/
NuGet.Signed/
-*.pfx
+packages/
build/
-tests/ServiceStack.Redis.Tests/azureconfig.txt
\ No newline at end of file
+tests/ServiceStack.Redis.Tests/azureconfig.txt
+*.rdb
+*.dat
+*.rdb
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 00000000..4d7b5ce3
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,16 @@
+{
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": ".NET Core Launch (console)",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ "program": "${workspaceRoot}/tests/ServiceStack.Redis.Tests/bin/Debug/netcoreapp1.0/ServiceStack.Redis.Tests.dll",
+ "args": [],
+ "cwd": "${workspaceRoot}",
+ "stopAtEntry": false,
+ "externalConsole": false
+ }
+ ]
+}
\ No newline at end of file
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
new file mode 100644
index 00000000..d5b6d366
--- /dev/null
+++ b/.vscode/tasks.json
@@ -0,0 +1,20 @@
+{
+ // See https://go.microsoft.com/fwlink/?LinkId=733558
+ // for the documentation about the tasks.json format
+ "version": "2.0.0",
+ "command": "dotnet",
+ "args": [],
+ "tasks": [
+ {
+ "label": "build",
+ "type": "shell",
+ "command": "dotnet",
+ "args": [
+ "build",
+ "tests/ServiceStack.Redis.Tests"
+ ],
+ "problemMatcher": "$msCompile",
+ "group": "build"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/NuGet.Config b/NuGet.Config
new file mode 100644
index 00000000..42daf5f4
--- /dev/null
+++ b/NuGet.Config
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NuGet.Signed/ServiceStack.Redis.Signed/servicestack.redis.signed.nuspec b/NuGet.Signed/ServiceStack.Redis.Signed/servicestack.redis.signed.nuspec
deleted file mode 100644
index 68a12bcc..00000000
--- a/NuGet.Signed/ServiceStack.Redis.Signed/servicestack.redis.signed.nuspec
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
- ServiceStack.Redis.Signed
- ServiceStack.Redis.Signed
- 4.0.0
- Service Stack
- Service Stack
-
- C# Redis Client for the worlds fastest distributed NoSQL datastore. Byte[], String and POCO Typed clients.
- Thread-Safe Basic and Pooled client managers included.
-
- https://github.com/ServiceStack/ServiceStack.Redis
- https://servicestack.net/terms
- true
- https://servicestack.net/img/logo-32.png
- Redis NoSQL Client Distributed Cache PubSub Messaging Transactions
- en-US
- ServiceStack 2013 and contributors
-
-
-
-
-
-
-
-
-
diff --git a/NuGet/NuGetPack.cmd b/NuGet/NuGetPack.cmd
deleted file mode 100644
index b010c460..00000000
--- a/NuGet/NuGetPack.cmd
+++ /dev/null
@@ -1,2 +0,0 @@
-SET NUGET=..\src\.nuget\nuget
-%NUGET% pack ServiceStack.Redis\servicestack.redis.nuspec -symbols
diff --git a/NuGet/NuGetPush.cmd b/NuGet/NuGetPush.cmd
deleted file mode 100644
index 0b9fda08..00000000
--- a/NuGet/NuGetPush.cmd
+++ /dev/null
@@ -1,3 +0,0 @@
-SET NUGET=..\src\.nuget\nuget
-%NUGET% push ServiceStack.Redis.3.9.60.nupkg
-%NUGET% push ServiceStack.Redis.3.9.60.symbols.nupkg
diff --git a/NuGet/ServiceStack.Redis/servicestack.redis.nuspec b/NuGet/ServiceStack.Redis/servicestack.redis.nuspec
deleted file mode 100644
index e6c5ff13..00000000
--- a/NuGet/ServiceStack.Redis/servicestack.redis.nuspec
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
- ServiceStack.Redis
- C# Redis client for the Redis NoSQL DB
- 4.0.0
- Service Stack
- Service Stack
-
- C# Redis Client for the worlds fastest distributed NoSQL datastore. Byte[], String and POCO Typed clients.
- Thread-Safe Basic and Pooled client managers included.
-
- To revert back to the previous BSD ServiceStack v3, see https://github.com/ServiceStackV3/ServiceStackV3
-
- https://github.com/ServiceStack/ServiceStack.Redis
- https://servicestack.net/terms
- true
- https://servicestack.net/img/logo-32.png
- Redis NoSQL Client Distributed Cache PubSub Messaging Transactions
- en-US
- ServiceStack 2013 and contributors
-
-
-
-
-
-
-
-
-
diff --git a/README.md b/README.md
index 9ff3cee0..cfbbe837 100644
--- a/README.md
+++ b/README.md
@@ -1,755 +1,5 @@
-[Join the ServiceStack Google+ group](https://plus.google.com/u/0/communities/112445368900682590445) or
-follow [@servicestack](http://twitter.com/servicestack) for updates.
+Follow [@ServiceStack](https://twitter.com/servicestack), [view the docs](https://docs.servicestack.net), use [StackOverflow](https://stackoverflow.com/questions/ask?tags=servicestack,servicestack.redis) or [Customer Forums](https://forums.servicestack.net/) for support.
-# C#/.NET Client for Redis
+# Read ServiceStack.Redis Docs at [docs.servicestack.net/redis](https://docs.servicestack.net/redis/)
-### Redis Connection Strings
-
-Redis Connection strings have been expanded to support the more versatile URI format which is now able to capture most of Redis Client
-settings in a single connection string (akin to DB Connection strings).
-
-Redis Connection Strings supports multiple URI-like formats, from a simple **hostname** or **IP Address and port** pair to a
-fully-qualified **URI** with multiple options specified on the QueryString.
-
-Some examples of supported formats:
-
- localhost
- 127.0.0.1:6379
- redis://localhost:6379
- password@localhost:6379
- clientid:password@localhost:6379
- redis://clientid:password@localhost:6380?ssl=true&db=1
-
-> More examples can be seen in
-[ConfigTests.cs](https://github.com/ServiceStack/ServiceStack.Redis/blob/master/tests/ServiceStack.Redis.Tests/ConfigTests.cs)
-
-Any additional configuration can be specified as QueryString parameters. The full list of options that can be specified include:
-
-
-
- | Ssl |
- bool |
- If this is an SSL connection |
-
-
- | Db |
- int |
- The Redis DB this connection should be set to |
-
-
- | Client |
- string |
- A text alias to specify for this connection for analytic purposes |
-
-
- | Password |
- string |
- UrlEncoded version of the Password for this connection |
-
-
- | ConnectTimeout |
- int |
- Timeout in ms for making a TCP Socket connection |
-
-
- | SendTimeout |
- int |
- Timeout in ms for making a synchronous TCP Socket Send |
-
-
- | ReceiveTimeout |
- int |
- Timeout in ms for waiting for a synchronous TCP Socket Receive |
-
-
- | IdleTimeOutSecs |
- int |
- Timeout in Seconds for an Idle connection to be considered active |
-
-
- | NamespacePrefix |
- string |
- Use a custom prefix for ServiceStack.Redis internal index colletions |
-
-
-
-## Redis Client Managers
-
-The recommended way to access the RedisClient is to use one of the available Client Managers:
-
-#### `RedisManagerPool`
-
-With the enhanced Redis URI Connection Strings we've been able to simplify and streamline the existing `PooledRedisClientManager`
-implementation that's been extracted out into a new clients manager called `RedisManagerPool`.
-
-In addition to removing all above options on the Client Manager itself, we've also removed readonly connection strings so the configuration
-ends up much simpler and more aligned with the common use-case:
-
-```csharp
-container.Register(c =>
- new RedisManagerPool(redisConnectionString));
-```
-
-#### `PooledRedisClientManager`
-
-If you prefer to define options on the Client Manager itself or you want to provide separate Read/Write and ReadOnly
-(i.e. Master and Slave) redis-servers, use the `PooledRedisClientManager` instead:
-
-```csharp
-container.Register(c =>
- new PooledRedisClientManager(redisReadWriteHosts, redisReadOnlyHosts) {
- ConnectTimeout = 100,
- //...
- });
-```
-
-#### `BasicRedisClientManager`
-
-If don't want to use connection pooling (i.e. your accessing a local redis-server instance)
-you can use a basic (non-pooled) Clients Manager:
-
-```csharp
-container.Register(c =>
- new BasicRedisClientManager(redisConnectionString));
-```
-
-### Accessing the Redis Client
-
-Once registered, accessing the RedisClient is the same in all Client Managers, e.g:
-
-```csharp
-var clientsManager = container.Resolve();
-
-using (IRedisClient redis = clientsManager.GetClient())
-{
- redis.IncrementValue("counter");
- List days = redis.GetAllItemsFromList("days");
-
- //Access Typed API
- var redisTodos = redis.As();
-
- redisTodos.Store(new Todo {
- Id = redisTodos.GetNextSequence(),
- Content = "Learn Redis",
- });
-
- var todo = redisTodos.GetById(1);
-
- //Access Native Client
- var redisNative = (IRedisNativeClient)redis;
-
- redisNative.Incr("counter");
- List days = redisNative.LRange("days", 0, -1);
-}
-```
-
-A more detailed list of the available RedisClient API's used in the example can be seen in the C# interfaces below:
-
- - [IRedisClient](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Interfaces/Redis/IRedisClient.cs)
- - [IRedisTypedClient](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Interfaces/Redis/Generic/IRedisTypedClient.cs)
- - [IRedisNativeClient](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Interfaces/Redis/IRedisNativeClient.cs)
-
-## [ServiceStack.Redis SSL Support](https://github.com/ServiceStack/ServiceStack/wiki/Secure-SSL-Redis-connections-to-Azure-Redis)
-
-ServiceStack.Redis now supporting **SSL connections** making it suitable for accessing remote Redis server instances over a
-**secure SSL connection**.
-
-
-
-### [Connecting to Azure Redis](https://github.com/ServiceStack/ServiceStack/wiki/Secure-SSL-Redis-connections-to-Azure-Redis)
-
-As connecting to [Azure Redis Cache](http://azure.microsoft.com/en-us/services/cache/) via SSL was the primary use-case for this feature,
-we've added a new
-[Getting connected to Azure Redis via SSL](https://github.com/ServiceStack/ServiceStack/wiki/Secure-SSL-Redis-connections-to-Azure-Redis)
-to help you get started.
-
-## New Generic API's for calling Custom Redis commands
-
-Most of the time when waiting to use a new [Redis Command](http://redis.io/commands) you'll need to wait for an updated version of
-**ServiceStack.Redis** to add support for the new commands likewise there are times when the Redis Client doesn't offer every permutation
-that redis-server supports.
-
-With the new `Custom` and `RawCommand` API's on `IRedisClient` and `IRedisNativeClient` you can now use the RedisClient to send your own
-custom commands that can call adhoc Redis commands:
-
-```csharp
-public interface IRedisClient
-{
- ...
- RedisText Custom(params object[] cmdWithArgs);
-}
-
-public interface IRedisNativeClient
-{
- ...
- RedisData RawCommand(params object[] cmdWithArgs);
- RedisData RawCommand(params byte[][] cmdWithBinaryArgs);
-}
-```
-
-These Custom API's take a flexible `object[]` arguments which accepts any serializable value e.g.
-`byte[]`, `string`, `int` as well as any user-defined Complex Types which are transparently serialized
-as JSON and send across the wire as UTF-8 bytes.
-
-```csharp
-var ret = Redis.Custom("SET", "foo", 1); // ret.Text = "OK"
-
-byte[] cmdSet = Commands.Set;
-ret = Redis.Custom(cmdSet, "bar", "b"); // ret.Text = "OK"
-
-ret = Redis.Custom("GET", "foo"); // ret.Text = "1"
-```
-
-There are also
-[convenient extension methods](https://github.com/ServiceStack/ServiceStack.Redis/blob/master/src/ServiceStack.Redis/RedisDataExtensions.cs)
-on `RedisData` and `RedisText` that make it easy to access structured data, e.g:
-
-```csharp
-var ret = Redis.Custom(Commands.Keys, "*");
-var keys = ret.GetResults(); // keys = ["foo", "bar"]
-
-ret = Redis.Custom(Commands.MGet, "foo", "bar");
-var values = ret.GetResults(); // values = ["1", "b"]
-
-Enum.GetNames(typeof(DayOfWeek)).ToList()
- .ForEach(x => Redis.Custom(Commands.RPush, "DaysOfWeek", x));
-ret = Redis.Custom(Commands.LRange, "DaysOfWeek", 1, -2);
-var weekDays = ret.GetResults();
-
-weekDays.PrintDump(); // ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
-```
-
-and some more examples using Complex Types with the Custom API's:
-
-```csharp
-var ret = Redis.Custom(Commands.Set, "foo", new Poco { Name = "Bar" }); // ret.Text = "OK"
-
-ret = Redis.Custom(Commands.Get, "foo"); // ret.Text = {"Name":"Bar"}
-Poco dto = ret.GetResult();
-
-dto.Name.Print(); // Bar
-```
-
-## New Managed Pub/Sub Server
-
-The Pub/Sub engine powering
-[Redis ServerEvents](https://github.com/ServiceStack/ServiceStack/wiki/Redis-Server-Events) and
-[Redis MQ](https://github.com/ServiceStack/ServiceStack/wiki/Messaging-and-Redis) has been extracted
-and encapsulated it into a re-usable class that can be used independently for handling messages
-published to specific [Redis Pub/Sub](http://redis.io/commands#pubsub) channels.
-
-`RedisPubSubServer` processes messages in a managed background thread that **automatically reconnects**
-when the redis-server connection fails and works like an independent background Service that can be
-stopped and started on command.
-
-The public API is captured in the
-[IRedisPubSubServer](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Interfaces/Redis/IRedisPubSubServer.cs) interface:
-
-```csharp
-public interface IRedisPubSubServer : IDisposable
-{
- IRedisClientsManager ClientsManager { get; }
- // What Channels it's subscribed to
- string[] Channels { get; }
-
- // Run once on initial StartUp
- Action OnInit { get; set; }
- // Called each time a new Connection is Started
- Action OnStart { get; set; }
- // Invoked when Connection is broken or Stopped
- Action OnStop { get; set; }
- // Invoked after Dispose()
- Action OnDispose { get; set; }
-
- // Fired when each message is received
- Action OnMessage { get; set; }
- // Fired after successfully subscribing to the specified channels
- Action OnUnSubscribe { get; set; }
- // Called when an exception occurs
- Action OnError { get; set; }
- // Called before attempting to Failover to a new redis master
- Action OnFailover { get; set; }
-
- int? KeepAliveRetryAfterMs { get; set; }
- // The Current Time for RedisServer
- DateTime CurrentServerTime { get; }
-
- // Current Status: Starting, Started, Stopping, Stopped, Disposed
- string GetStatus();
- // Different life-cycle stats
- string GetStatsDescription();
-
- // Subscribe to specified Channels and listening for new messages
- IRedisPubSubServer Start();
- // Close active Connection and stop running background thread
- void Stop();
- // Stop than Start
- void Restart();
-}
-```
-### Usage
-
-To use `RedisPubSubServer`, initialize it with the channels you want to subscribe to and assign handlers
-for each of the events you want to handle. At a minimum you'll want to handle `OnMessage`:
-
-```csharp
-var clientsManager = new PooledRedisClientManager();
-var redisPubSub = new RedisPubSubServer(clientsManager, "channel-1", "channel-2") {
- OnMessage = (channel, msg) => "Received '{0}' from '{1}'".Print(msg, channel)
- }.Start();
-```
-
-Calling `Start()` after it's initialized will get it to start listening and processing any messages
-published to the subscribed channels.
-
-### New Lex Operations
-
-The new [ZRANGEBYLEX](http://redis.io/commands/zrangebylex) sorted set operations allowing you to query a sorted set lexically have been added.
-A good showcase for this is available on [autocomplete.redis.io](http://autocomplete.redis.io/).
-
-These new operations are available as a 1:1 mapping with redis-server on `IRedisNativeClient`:
-
-```csharp
-public interface IRedisNativeClient
-{
- ...
- byte[][] ZRangeByLex(string setId, string min, string max, int? skip=null, int? take=null);
- long ZLexCount(string setId, string min, string max);
- long ZRemRangeByLex(string setId, string min, string max);
-}
-```
-
-And the more user-friendly APIs under `IRedisClient`:
-
-```csharp
-public interface IRedisClient
-{
- ...
- List SearchSortedSet(string setId, string start=null, string end=null);
- long SearchSortedSetCount(string setId, string start=null, string end=null);
- long RemoveRangeFromSortedSetBySearch(string setId, string start=null, string end=null);
-}
-```
-
-Just like NuGet version matchers, Redis uses `[` char to express inclusiveness and `(` char for exclusiveness.
-Since the `IRedisClient` APIs defaults to inclusive searches, these two APIs are the same:
-
-```csharp
-Redis.SearchSortedSetCount("zset", "a", "c")
-Redis.SearchSortedSetCount("zset", "[a", "[c")
-```
-
-Alternatively you can specify one or both bounds to be exclusive by using the `(` prefix, e.g:
-
-```csharp
-Redis.SearchSortedSetCount("zset", "a", "(c")
-Redis.SearchSortedSetCount("zset", "(a", "(c")
-```
-
-More API examples are available in [LexTests.cs](https://github.com/ServiceStack/ServiceStack.Redis/blob/master/tests/ServiceStack.Redis.Tests/LexTests.cs).
-
-### New HyperLog API
-
-The development branch of Redis server (available when v3.0 is released) includes an ingenious algorithm to approximate the unique elements in a set with maximum space and time efficiency. For details about how it works see Redis's creator Salvatore's blog who [explains it in great detail](http://antirez.com/news/75). Essentially it lets you maintain an efficient way to count and merge unique elements in a set without having to store its elements.
-A Simple example of it in action:
-
-```csharp
-redis.AddToHyperLog("set1", "a", "b", "c");
-redis.AddToHyperLog("set1", "c", "d");
-var count = redis.CountHyperLog("set1"); //4
-
-redis.AddToHyperLog("set2", "c", "d", "e", "f");
-
-redis.MergeHyperLogs("mergedset", "set1", "set2");
-
-var mergeCount = redis.CountHyperLog("mergedset"); //6
-```
-
-### New Scan APIs Added
-
-Redis v2.8 introduced a beautiful new [SCAN](http://redis.io/commands/scan) operation that provides an optimal strategy for traversing a redis instance entire keyset in managable-size chunks utilizing only a client-side cursor and without introducing any server state. It's a higher performance alternative and should be used instead of [KEYS](http://redis.io/commands/keys) in application code. SCAN and its related operations for traversing members of Sets, Sorted Sets and Hashes are now available in the Redis Client in the following API's:
-
-```csharp
-public interface IRedisClient
-{
- ...
- IEnumerable ScanAllKeys(string pattern = null, int pageSize = 1000);
- IEnumerable ScanAllSetItems(string setId, string pattern = null, int pageSize = 1000);
- IEnumerable> ScanAllSortedSetItems(string setId, string pattern = null, int pageSize = 1000);
- IEnumerable> ScanAllHashEntries(string hashId, string pattern = null, int pageSize = 1000);
-}
-
-//Low-level API
-public interface IRedisNativeClient
-{
- ...
- ScanResult Scan(ulong cursor, int count = 10, string match = null);
- ScanResult SScan(string setId, ulong cursor, int count = 10, string match = null);
- ScanResult ZScan(string setId, ulong cursor, int count = 10, string match = null);
- ScanResult HScan(string hashId, ulong cursor, int count = 10, string match = null);
-}
-```
-
-The `IRedisClient` provides a higher-level API that abstracts away the client cursor to expose a lazy Enumerable sequence to provide an optimal way to stream scanned results that integrates nicely with LINQ, e.g:
-
-```csharp
-var scanUsers = Redis.ScanAllKeys("urn:User:*");
-var sampleUsers = scanUsers.Take(10000).ToList(); //Stop after retrieving 10000 user keys
-```
-
-
-### New IRedisClient LUA API's
-
-The `IRedisClient` API's for [redis server-side LUA support](http://redis.io/commands/eval) have been re-factored into the more user-friendly API's below:
-
-```csharp
-public interface IRedisClient
-{
- //Eval/Lua operations
-
- string ExecLuaAsString(string luaBody, params string[] args);
- string ExecLuaAsString(string luaBody, string[] keys, string[] args);
- string ExecLuaShaAsString(string sha1, params string[] args);
- string ExecLuaShaAsString(string sha1, string[] keys, string[] args);
-
- int ExecLuaAsInt(string luaBody, params string[] args);
- int ExecLuaAsInt(string luaBody, string[] keys, string[] args);
- int ExecLuaShaAsInt(string sha1, params string[] args);
- int ExecLuaShaAsInt(string sha1, string[] keys, string[] args);
-
- List ExecLuaAsList(string luaBody, params string[] args);
- List ExecLuaAsList(string luaBody, string[] keys, string[] args);
- List ExecLuaShaAsList(string sha1, params string[] args);
- List ExecLuaShaAsList(string sha1, string[] keys, string[] args);
-
- string CalculateSha1(string luaBody);
-
- bool HasLuaScript(string sha1Ref);
- Dictionary WhichLuaScriptsExists(params string[] sha1Refs);
- void RemoveAllLuaScripts();
- void KillRunningLuaScript();
- string LoadLuaScript(string body);
-}
-```
-
-### Usage Examples
-
-Here's how you can implement a ZPOP in Lua to remove the items with the lowest rank from a sorted set:
-
-```csharp
-var luaBody = @"
- local val = redis.call('zrange', KEYS[1], 0, ARGV[1]-1)
- if val then redis.call('zremrangebyrank', KEYS[1], 0, ARGV[1]-1) end
- return val";
-
-var i = 0;
-var alphabet = 26.Times(c => ((char)('A' + c)).ToString());
-alphabet.ForEach(x => Redis.AddItemToSortedSet("zalphabet", x, i++));
-
-//Remove the letters with the lowest rank from the sorted set 'zalphabet'
-var letters = Redis.ExecLuaAsList(luaBody, keys: new[] { "zalphabet" }, args: new[] { "3" });
-letters.PrintDump(); //[A, B, C]
-```
-
-And how to implement ZREVPOP to remove items with the highest rank from a sorted set:
-
-```csharp
-var luaBody = @"
- local val = redis.call('zrange', KEYS[1], -ARGV[1], -1)
- if val then redis.call('zremrangebyrank', KEYS[1], -ARGV[1], -1) end
- return val";
-
-var i = 0;
-var alphabet = 26.Times(c => ((char)('A' + c)).ToString());
-alphabet.ForEach(x => Redis.AddItemToSortedSet("zalphabet", x, i++));
-
-//Remove the letters with the highest rank from the sorted set 'zalphabet'
-List letters = Redis.ExecLuaAsList(luaBody, keys: new[] { "zalphabet" }, args: new[] { "3" });
-
-letters.PrintDump(); //[X, Y, Z]
-```
-
-### Other examples
-
-Returning an int:
-
-```csharp
-int intVal = Redis.ExecLuaAsInt("return 123"); //123
-int intVal = Redis.ExecLuaAsInt("return ARGV[1] + ARGV[2]", "10", "20"); //30
-```
-
-Returning an string:
-
-```csharp
-var strVal = Redis.ExecLuaAsString(@"return 'Hello, ' .. ARGV[1] .. '!'", "Redis Lua"); //Hello, Redis Lua!
-```
-
-Returning a List of strings:
-
-```csharp
-Enum.GetNames(typeof(DayOfWeek)).ToList()
- .ForEach(x => Redis.AddItemToList("DaysOfWeek", x));
-
-var daysOfWeek = Redis.ExecLuaAsList("return redis.call('LRANGE', 'DaysOfWeek', 0, -1)");
-daysOfWeek.PrintDump(); //[Sunday, Monday, Tuesday, ...]
-```
-
-More examples can be found in the [Redis Eval Lua tests](https://github.com/ServiceStack/ServiceStack.Redis/blob/master/tests/ServiceStack.Redis.Tests/RedisClientEvalTests.cs
-)
-
-## Overview
-
-*The Redis client is an independent project and can be used with or without the ServiceStack webservices framework.*
-
-[Redis](http://code.google.com/p/redis/) is one of the fastest and most feature-rich key-value stores to come from the [NoSQL](http://en.wikipedia.org/wiki/NoSQL) movement.
-It is similar to memcached but the dataset is not volatile, and values can either be strings lists, sets, sorted sets or hashes.
-
-[ServiceStack's C# Redis Client](https://github.com/ServiceStack/ServiceStack.Redis) is an Open Source C# Redis client based on [Miguel de Icaza](http://twitter.com/migueldeicaza) previous efforts with [redis-sharp](http://github.com/migueldeicaza/redis-sharp).
-
-There are a number of different APIs available which are all a friendly drop-in with your local IOC:
-The `ServiceStack.Redis.RedisClient` class below implements the following interfaces:
-
- * [ICacheClient](https://github.com/ServiceStack/ServiceStack/wiki/Caching) - If you are using Redis solely as a cache, you should bind to the [ServiceStack's common interface](https://github.com/ServiceStack/ServiceStack.Redis/wiki/Caching) as there already are In-Memory an Memcached implementations available in ServiceStack, allowing you to easily switch providers in-future.
- * [IRedisNativeClient](https://github.com/ServiceStack/ServiceStack.Redis/wiki/IRedisNativeClient) - For those wanting a low-level raw byte access (where you can control your own serialization/deserialization) that map 1:1 with Redis operations of the same name.
-
-For most cases if you require access to Redis-specific functionality you would want to bind to the interface below:
-
- * [IRedisClient](https://github.com/ServiceStack/ServiceStack.Redis/wiki/IRedisClient) - Provides a friendlier, more descriptive API that lets you store values as strings (UTF8 encoding).
- * [IRedisTypedClient](https://github.com/ServiceStack/ServiceStack.Redis/wiki/IRedisTypedClient) - created with `IRedisClient.As()` - it returns a 'strongly-typed client' that provides a typed-interface for all redis value operations that works against any C#/.NET POCO type.
-
-The class hierachy for the C# Redis clients effectively look like:
-
- RedisTypedClient (POCO) > RedisClient (string) > RedisNativeClient (raw byte[])
-
-Each client provides a different layer of abstraction:
-
- * The RedisNativeClient exposes raw **byte[]** apis and does no marshalling and passes all values directly to redis.
- * The RedisClient assumes **string** values and simply converts strings to UTF8 bytes before sending to Redis
- * The RedisTypedClient provides a generic interface allowing you to add POCO values. The POCO types are serialized using [.NETs fastest JSON Serializer](http://www.servicestack.net/mythz_blog/?p=344) which is then converted to UTF8 bytes and sent to Redis.
-
-### Redis Client API Overview
-[](http://mono.servicestack.net/img/Redis-annotated.png)
-
-### Thread-safe client managers
-For multi-threaded applications you can choose from our different client connection managers:
-
- * BasicRedisClientManager - a load-balance (master-write and read-slaves) client manager that returns a new [IRedisClient](https://github.com/ServiceStack/ServiceStack.Redis/wiki/IRedisClient) connection with the defaults specified (faster when accessing a redis-server instance on the same host).
- * PooledRedisClientManager - a load-balanced (master-write and read-slaves) client manager that utilizes a pool of redis client connections (faster when accessing a redis-server instance over the network).
-
-## Install ServiceStack.Redis
-
- PM> Install-Package ServiceStack.Redis
-
-_Latest v4+ on NuGet is a commercial release with [free quotas](https://servicestack.net/download#free-quotas)._
-
-### [Docs and Downloads for older v3 BSD releases](https://github.com/ServiceStackV3/ServiceStackV3)
-
-## Copying
-
-Since September 2013, ServiceStack source code is available under GNU Affero General Public License/FOSS License Exception, see license.txt in the source.
-Alternative commercial licensing is also available, see https://servicestack.net/pricing for details.
-
-## Contributing
-
-Commits should be made to the **v3-fixes** branch so they can be merged into both **v3** and **master** (v4) release branches.
-Contributors need to approve the [Contributor License Agreement](https://docs.google.com/forms/d/16Op0fmKaqYtxGL4sg7w_g-cXXyCoWjzppgkuqzOeKyk/viewform) before any code will be reviewed, see the [Contributing wiki](https://github.com/ServiceStack/ServiceStack/wiki/Contributing) for more details.
-
-### Redis Server builds for Windows
-
- * [MS Open Tech - Redis on Windows](https://github.com/MSOpenTech/Redis)
- * [Downloads for Cygwin 32bit Redis Server Windows builds](http://code.google.com/p/servicestack/wiki/RedisWindowsDownload).
- * [Project that lets you run Redis as a Windows Service](https://github.com/rgl/redis)
- * [Another Redis as a Windows Service project, which allows you to run separate service for each Redis instance](https://github.com/kcherenkov/redis-windows-service)
- * [Downloads for MinGW 32bit and 64bit Redis Server Windows builds](http://github.com/dmajkic/redis/downloads)
-
-### Redis Virtual Machines
-
- * [Run Redis in a Vagrant virtual machine](https://github.com/JasonPunyon/redishobo)
-
-# Getting Started with the C# Redis client
-
-###[C# Redis Client wiki](https://github.com/ServiceStack/ServiceStack.Redis/wiki)
-Contains all the examples, tutorials and resources you need to get you up to speed with common operations and the latest features.
-
-[Useful Links on Redis server](https://github.com/ServiceStack/ServiceStack.Redis/wiki/Useful-Redis-Links)
-
-### Specific Examples
- * [Using Transactions in Redis (i.e. MULTI/EXEC/DISCARD)](https://github.com/ServiceStack/ServiceStack.Redis/wiki/RedisTransactions)
- * [Using Redis's built-in Publish/Subscribe pattern for high performance network notifications](https://github.com/ServiceStack/ServiceStack.Redis/wiki/RedisPubSub)
- * [Using Redis to create high performance *distributed locks* spannable across multiple app servers](https://github.com/ServiceStack/ServiceStack.Redis/wiki/RedisLocks)
-
-# Simple example using Redis Lists
-
-Below is a simple example to give you a flavour of how easy it is to use some of Redis's advanced data structures - in this case Redis Lists:
-_Full source code of this example is [viewable online](https://github.com/ServiceStack/ServiceStack.Redis/blob/master/tests/ServiceStack.Redis.Tests/ShippersExample.cs)_
-
- using (var redisClient = new RedisClient())
- {
- //Create a 'strongly-typed' API that makes all Redis Value operations to apply against Shippers
- IRedisTypedClient redis = redisClient.As();
-
- //Redis lists implement IList while Redis sets implement ICollection
- var currentShippers = redis.Lists["urn:shippers:current"];
- var prospectiveShippers = redis.Lists["urn:shippers:prospective"];
-
- currentShippers.Add(
- new Shipper {
- Id = redis.GetNextSequence(),
- CompanyName = "Trains R Us",
- DateCreated = DateTime.UtcNow,
- ShipperType = ShipperType.Trains,
- UniqueRef = Guid.NewGuid()
- });
-
- currentShippers.Add(
- new Shipper {
- Id = redis.GetNextSequence(),
- CompanyName = "Planes R Us",
- DateCreated = DateTime.UtcNow,
- ShipperType = ShipperType.Planes,
- UniqueRef = Guid.NewGuid()
- });
-
- var lameShipper = new Shipper {
- Id = redis.GetNextSequence(),
- CompanyName = "We do everything!",
- DateCreated = DateTime.UtcNow,
- ShipperType = ShipperType.All,
- UniqueRef = Guid.NewGuid()
- };
-
- currentShippers.Add(lameShipper);
-
- Dump("ADDED 3 SHIPPERS:", currentShippers);
-
- currentShippers.Remove(lameShipper);
-
- Dump("REMOVED 1:", currentShippers);
-
- prospectiveShippers.Add(
- new Shipper {
- Id = redis.GetNextSequence(),
- CompanyName = "Trucks R Us",
- DateCreated = DateTime.UtcNow,
- ShipperType = ShipperType.Automobiles,
- UniqueRef = Guid.NewGuid()
- });
-
- Dump("ADDED A PROSPECTIVE SHIPPER:", prospectiveShippers);
-
- redis.PopAndPushBetweenLists(prospectiveShippers, currentShippers);
-
- Dump("CURRENT SHIPPERS AFTER POP n' PUSH:", currentShippers);
- Dump("PROSPECTIVE SHIPPERS AFTER POP n' PUSH:", prospectiveShippers);
-
- var poppedShipper = redis.PopFromList(currentShippers);
- Dump("POPPED a SHIPPER:", poppedShipper);
- Dump("CURRENT SHIPPERS AFTER POP:", currentShippers);
-
- //reset sequence and delete all lists
- redis.SetSequence(0);
- redis.Remove(currentShippers, prospectiveShippers);
- Dump("DELETING CURRENT AND PROSPECTIVE SHIPPERS:", currentShippers);
- }
-
- /*
- == EXAMPLE OUTPUT ==
-
- ADDED 3 SHIPPERS:
- Id:1,CompanyName:Trains R Us,ShipperType:Trains,DateCreated:2010-01-31T11:53:37.7169323Z,UniqueRef:d17c5db0415b44b2ac5da7b6ebd780f5
- Id:2,CompanyName:Planes R Us,ShipperType:Planes,DateCreated:2010-01-31T11:53:37.799937Z,UniqueRef:e02a73191f4b4e7a9c44eef5b5965d06
- Id:3,CompanyName:We do everything!,ShipperType:All,DateCreated:2010-01-31T11:53:37.8009371Z,UniqueRef:d0c249bbbaf84da39fc4afde1b34e332
-
- REMOVED 1:
- Id:1,CompanyName:Trains R Us,ShipperType:Trains,DateCreated:2010-01-31T11:53:37.7169323Z,UniqueRef:d17c5db0415b44b2ac5da7b6ebd780f5
- Id:2,CompanyName:Planes R Us,ShipperType:Planes,DateCreated:2010-01-31T11:53:37.799937Z,UniqueRef:e02a73191f4b4e7a9c44eef5b5965d06
-
- ADDED A PROSPECTIVE SHIPPER:
- Id:4,CompanyName:Trucks R Us,ShipperType:Automobiles,DateCreated:2010-01-31T11:53:37.8539401Z,UniqueRef:67d7d4947ebc4b0ba5c4d42f5d903bec
-
- CURRENT SHIPPERS AFTER POP n' PUSH:
- Id:4,CompanyName:Trucks R Us,ShipperType:Automobiles,DateCreated:2010-01-31T11:53:37.8539401Z,UniqueRef:67d7d4947ebc4b0ba5c4d42f5d903bec
- Id:1,CompanyName:Trains R Us,ShipperType:Trains,DateCreated:2010-01-31T11:53:37.7169323Z,UniqueRef:d17c5db0415b44b2ac5da7b6ebd780f5
- Id:2,CompanyName:Planes R Us,ShipperType:Planes,DateCreated:2010-01-31T11:53:37.799937Z,UniqueRef:e02a73191f4b4e7a9c44eef5b5965d06
-
- PROSPECTIVE SHIPPERS AFTER POP n' PUSH:
-
- POPPED a SHIPPER:
- Id:2,CompanyName:Planes R Us,ShipperType:Planes,DateCreated:2010-01-31T11:53:37.799937Z,UniqueRef:e02a73191f4b4e7a9c44eef5b5965d06
-
- CURRENT SHIPPERS AFTER POP:
- Id:4,CompanyName:Trucks R Us,ShipperType:Automobiles,DateCreated:2010-01-31T11:53:37.8539401Z,UniqueRef:67d7d4947ebc4b0ba5c4d42f5d903bec
- Id:1,CompanyName:Trains R Us,ShipperType:Trains,DateCreated:2010-01-31T11:53:37.7169323Z,UniqueRef:d17c5db0415b44b2ac5da7b6ebd780f5
-
- DELETING CURRENT AND PROSPECTIVE SHIPPERS:
- */
-
-More examples are available in the [RedisExamples Redis examples page] and in the comprehensive
-[test suite](https://github.com/ServiceStack/ServiceStack.Redis/tree/master/tests/ServiceStack.Redis.Tests)
-
-
-## Speed
-One of the best things about Redis is the speed - it is quick.
-
-[This example](https://github.com/ServiceStack/ServiceStack.Redis/blob/master/tests/ServiceStack.Redis.Tests/RedisClientTests.cs)
-below stores and gets the entire [Northwind database](http://code.google.com/p/servicestack/source/browse/trunk/Common/Northwind.Benchmarks/Northwind.Common/DataModel/NorthwindData.cs) (3202 records) in less *1.2 secs* - we've never had it so quick!
-
-_(Running inside a VS.NET/R# unit test on a 3 year old iMac)_
-
- using (var client = new RedisClient())
- {
- var before = DateTime.Now;
- client.StoreAll(NorthwindData.Categories);
- client.StoreAll(NorthwindData.Customers);
- client.StoreAll(NorthwindData.Employees);
- client.StoreAll(NorthwindData.Shippers);
- client.StoreAll(NorthwindData.Orders);
- client.StoreAll(NorthwindData.Products);
- client.StoreAll(NorthwindData.OrderDetails);
- client.StoreAll(NorthwindData.CustomerCustomerDemos);
- client.StoreAll(NorthwindData.Regions);
- client.StoreAll(NorthwindData.Territories);
- client.StoreAll(NorthwindData.EmployeeTerritories);
-
- Console.WriteLine("Took {0}ms to store the entire Northwind database ({1} records)",
- (DateTime.Now - before).TotalMilliseconds, totalRecords);
-
-
- before = DateTime.Now;
- var categories = client.GetAll();
- var customers = client.GetAll();
- var employees = client.GetAll();
- var shippers = client.GetAll();
- var orders = client.GetAll();
- var products = client.GetAll();
- var orderDetails = client.GetAll();
- var customerCustomerDemos = client.GetAll();
- var regions = client.GetAll();
- var territories = client.GetAll();
- var employeeTerritories = client.GetAll();
-
- Console.WriteLine("Took {0}ms to get the entire Northwind database ({1} records)",
- (DateTime.Now - before).TotalMilliseconds, totalRecords);
- }
- /*
- == EXAMPLE OUTPUT ==
-
- Took 1020.0583ms to store the entire Northwind database (3202 records)
- Took 132.0076ms to get the entire Northwind database (3202 records)
- */
-
-
-Note: The total time taken includes an extra Redis operation for each record to store the id in a Redis set for each
-type as well as serializing and de-serializing each record using Service Stack's TypeSerializer.
-
-
-# Community Resources
-
- - [Distributed Caching using Redis Server with .NET/C# Client](http://www.codeproject.com/Articles/636730/Distributed-Caching-using-Redis) by [Sem.Shekhovtsov](http://www.codeproject.com/script/Membership/View.aspx?mid=6495187)
- - [Fan Messaging with ServiceStack.Redis](http://cornishdev.wordpress.com/2013/04/04/fan-messaging-with-servicestack-redis/) by [miket](http://stackoverflow.com/users/1804544/miket)
- - [Redis and VB.Net](http://blogs.lessthandot.com/index.php/DataMgmt/DBProgramming/redis-and-vb-net) by [@chrissie1](https://twitter.com/chrissie1)
- - [Using ServiceStack.Redis Part 2: Sets and Hashes](http://michaelsarchet.com/using-servicestack-redis-part-2-sets-and-hashes/) by [@msarchet](http://twitter.com/msarchet)
- - [Using the ServiceStack.Redis Client](http://michaelsarchet.com/using-the-servicestack-redis-client/) by [@msarchet](http://twitter.com/msarchet)
- - [Implementing ServiceStack.Redis.RedisClient (.NET Client for Redis)](http://www.narizwallace.com/2012/10/implementing-servicestack-redis-redisclient-net-client-for-redis/) by [@NarizWallace](https://twitter.com/NarizWallace)
- - [Getting started with Redis in ASP.NET under Windows](http://maxivak.com/getting-started-with-redis-and-asp-net-mvc-under-windows/) by [@maxivak](https://twitter.com/maxivak)
- - [Using Redis on Windows with ServiceStack](http://www.clippersoft.net/using-redis-on-windows-with-servicestack/)
+### This repository [has moved](https://docs.servicestack.net/mono-repo) to [github.com/ServiceStack/ServiceStack/ServiceStack.Redis](https://github.com/ServiceStack/ServiceStack/tree/main/ServiceStack.Redis)
diff --git a/build/appsettings.license.txt b/build/appsettings.license.txt
deleted file mode 100644
index 1e498b17..00000000
--- a/build/appsettings.license.txt
+++ /dev/null
@@ -1 +0,0 @@
-1001-e1JlZjoxMDAxLE5hbWU6VGVzdCBCdXNpbmVzcyxUeXBlOkJ1c2luZXNzLEhhc2g6UHVNTVRPclhvT2ZIbjQ5MG5LZE1mUTd5RUMzQnBucTFEbTE3TDczVEF4QUNMT1FhNXJMOWkzVjFGL2ZkVTE3Q2pDNENqTkQyUktRWmhvUVBhYTBiekJGUUZ3ZE5aZHFDYm9hL3lydGlwUHI5K1JsaTBYbzNsUC85cjVJNHE5QVhldDN6QkE4aTlvdldrdTgyTk1relY2eis2dFFqTThYN2lmc0JveHgycFdjPSxFeHBpcnk6MjAxMy0wMS0wMX0=
\ No newline at end of file
diff --git a/build/build-core.proj b/build/build-core.proj
new file mode 100644
index 00000000..3ac34b8b
--- /dev/null
+++ b/build/build-core.proj
@@ -0,0 +1,80 @@
+
+
+
+
+
+ 6
+ 0
+ $(BUILD_NUMBER)
+
+
+
+ $(MSBuildProjectDirectory)/..
+ $(BuildSolutionDir)/src
+ $(BuildSolutionDir)/tests
+ Release
+ $(BuildSolutionDir)/NuGet/
+ $(MajorVersion).$(MinorVersion).$(PatchVersion)
+
+
+
+
+ BeforeBuildSolutions;
+ BuildSolutions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <Version>[^<]*
+ <Version>$(PackageVersion)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/build-sn.proj b/build/build-sn.proj
deleted file mode 100644
index f6a68827..00000000
--- a/build/build-sn.proj
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
-
-
- 4
- 0
- $(BUILD_NUMBER)
-
-
-
- $(MSBuildProjectDirectory)/..
- $(BuildSolutionDir)/src
- Signed
- $(BuildSolutionDir)/src/.nuget/nuget.exe
- $(BuildSolutionDir)/NuGet.Signed/
- $(MajorVersion).$(MinorVersion).$(PatchVersion).0
- -unstable
- $(MajorVersion).$(MinorVersion).$(PatchVersion)$(UnstableTag)
-
-
-
-
-
-
-
-
-
-
- BeforeBuildSolutions;
- BuildSolutions
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AssemblyFileVersion\(\"\d+\.\d+\.\d+\.\d+\"\)
- AssemblyFileVersion("$(Version)")
-
-
-
-
- AssemblyVersion\(\"\d+\.\d+\.\d+\.\d+\"\)
- AssemblyVersion("4.0.0.0")
-
-
-
-
- version="4\.0[^"]*"
- version="$(PackageVersion)"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/build/build.bat b/build/build.bat
index e6a22e53..c51cb92d 100644
--- a/build/build.bat
+++ b/build/build.bat
@@ -1,4 +1,3 @@
-SET MSBUILD=C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
+SET MSBUILD="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"
-REM %MSBUILD% build.proj /target:NuGetPack /property:Configuration=Release;RELEASE=true;PatchVersion=1
-%MSBUILD% build-sn.proj /target:NuGetPack /property:Configuration=Signed;RELEASE=true;PatchVersion=0
+%MSBUILD% build.proj /property:Configuration=Release;MinorVersion=4;PatchVersion=1
diff --git a/build/build.proj b/build/build.proj
index 8f3feae1..7899a808 100644
--- a/build/build.proj
+++ b/build/build.proj
@@ -1,10 +1,10 @@
+ xmlns='http://schemas.microsoft.com/developer/msbuild/2003' ToolsVersion="4.0">
- 4
+ 6
0
$(BUILD_NUMBER)
@@ -12,20 +12,12 @@
$(MSBuildProjectDirectory)/..
$(BuildSolutionDir)/src
+ $(BuildSolutionDir)/tests
Release
- $(BuildSolutionDir)/src/.nuget/nuget.exe
$(BuildSolutionDir)/NuGet/
- $(MajorVersion).$(MinorVersion).$(PatchVersion).0
- -unstable
- $(MajorVersion).$(MinorVersion).$(PatchVersion)$(UnstableTag)
+ $(MajorVersion).$(MinorVersion).$(PatchVersion)
-
-
-
-
-
-
BeforeBuildSolutions;
@@ -33,74 +25,55 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ Properties="Configuration=$(Configuration)" />
+
+
+
+
+
+
+
+
+
+
-
- AssemblyFileVersion\(\"\d+\.\d+\.\d+\.\d+\"\)
- AssemblyFileVersion("$(Version)")
-
-
- AssemblyVersion\(\"\d+\.\d+\.\d+\.\d+\"\)
- AssemblyVersion("$(Version)")
-
-
- key="servicestack:license".*
- key="servicestack:license" value="$([System.IO.File]::ReadAllText($(MSBuildProjectDirectory)/appsettings.license.txt))" />
-
-
-
- version="4\.0[^"]*"
- version="$(PackageVersion)"
+
+ <Version>[^<]*
+ <Version>$(PackageVersion)
-
+
-
+
+
-
+
-
+
+
-
-
-
-
-
-
+
+
\ No newline at end of file
diff --git a/build/copy.bat b/build/copy.bat
deleted file mode 100644
index f59370af..00000000
--- a/build/copy.bat
+++ /dev/null
@@ -1,7 +0,0 @@
-REM SET BUILD=Debug
-SET BUILD=Release
-
-COPY ..\src\ServiceStack.Redis\bin\%BUILD%\ServiceStack.Redis.* ..\NuGet\lib\net40
-
-COPY ..\src\ServiceStack.Redis\bin\%BUILD%\ServiceStack.Redis.* ..\..\ServiceStack\lib
-COPY ..\src\ServiceStack.Redis\bin\Signed\ServiceStack.Redis.* ..\..\ServiceStack\lib\signed
diff --git a/build/release/MonoDevelop/ServiceStack.Redis.zip b/build/release/MonoDevelop/ServiceStack.Redis.zip
deleted file mode 100644
index 476d6fac..00000000
Binary files a/build/release/MonoDevelop/ServiceStack.Redis.zip and /dev/null differ
diff --git a/docs/pages/images/1-CreateProject.png b/docs/pages/images/1-CreateProject.png
new file mode 100644
index 00000000..bc0617a5
Binary files /dev/null and b/docs/pages/images/1-CreateProject.png differ
diff --git a/docs/pages/images/10-projectjson.png b/docs/pages/images/10-projectjson.png
new file mode 100644
index 00000000..ec38bcd5
Binary files /dev/null and b/docs/pages/images/10-projectjson.png differ
diff --git a/docs/pages/images/11-dotnetrestore.png b/docs/pages/images/11-dotnetrestore.png
new file mode 100644
index 00000000..44a93985
Binary files /dev/null and b/docs/pages/images/11-dotnetrestore.png differ
diff --git a/docs/pages/images/12-dotnetrun.png b/docs/pages/images/12-dotnetrun.png
new file mode 100644
index 00000000..7040a5b6
Binary files /dev/null and b/docs/pages/images/12-dotnetrun.png differ
diff --git a/docs/pages/images/2-Solution.png b/docs/pages/images/2-Solution.png
new file mode 100644
index 00000000..e81dc372
Binary files /dev/null and b/docs/pages/images/2-Solution.png differ
diff --git a/docs/pages/images/3-AddNugetPackage.png b/docs/pages/images/3-AddNugetPackage.png
new file mode 100644
index 00000000..f0ae3796
Binary files /dev/null and b/docs/pages/images/3-AddNugetPackage.png differ
diff --git a/docs/pages/images/4-SearchNugetPackage.png b/docs/pages/images/4-SearchNugetPackage.png
new file mode 100644
index 00000000..f697a2dd
Binary files /dev/null and b/docs/pages/images/4-SearchNugetPackage.png differ
diff --git a/docs/pages/images/5-InstallNugetPackage.png b/docs/pages/images/5-InstallNugetPackage.png
new file mode 100644
index 00000000..c421ae49
Binary files /dev/null and b/docs/pages/images/5-InstallNugetPackage.png differ
diff --git a/docs/pages/images/6-AcceptLicence.png b/docs/pages/images/6-AcceptLicence.png
new file mode 100644
index 00000000..695367f3
Binary files /dev/null and b/docs/pages/images/6-AcceptLicence.png differ
diff --git a/docs/pages/images/7-Program.png b/docs/pages/images/7-Program.png
new file mode 100644
index 00000000..a3e6dd18
Binary files /dev/null and b/docs/pages/images/7-Program.png differ
diff --git a/docs/pages/images/8-Output.png b/docs/pages/images/8-Output.png
new file mode 100644
index 00000000..9c4b8838
Binary files /dev/null and b/docs/pages/images/8-Output.png differ
diff --git a/docs/pages/images/9-dotnetnew.png b/docs/pages/images/9-dotnetnew.png
new file mode 100644
index 00000000..8008f522
Binary files /dev/null and b/docs/pages/images/9-dotnetnew.png differ
diff --git a/docs/pages/netcore.md b/docs/pages/netcore.md
new file mode 100644
index 00000000..85fd5aa3
--- /dev/null
+++ b/docs/pages/netcore.md
@@ -0,0 +1,152 @@
+# Using ServiceStack.Redis on .NET Core
+
+This guide shows how to create and execute .NET Core console application which
+uses ServiceStack.Redis
+
+### Install .NET Core
+
+At the first step you need to install [Visual Studio 2015 update 3](https://go.microsoft.com/fwlink/?LinkId=691129) and [.NET Core 1.0.0 - VS 2015 Tooling Preview](https://go.microsoft.com/fwlink/?LinkId=817245).
+
+To get more details about Visual Studio 2015 update 3 and .NET Core installation
+you can visit [.NET Core](https://www.microsoft.com/net/core#windows) site
+
+### Create .NET Core Application
+
+In Visual Studio click `File-> New-> Project` and select **.NET Core/Console Application (.NET Core)**
+from VS templates.
+
+
+
+You will get following structure in Solution Explorer.
+
+
+
+Right click on the project and select **Manage NuGet Packages**
+
+
+
+In opened window click **Browse** tab, type `ServiceStack.Redis.Core` and hit **Enter**
+
+
+
+Select package and click **Install** button on the right pane
+
+
+
+Visual Studio asks to read and accept licence, click **Accept** button
+
+
+
+Then open file `Program.cs` and write the code. Change the address `localhost:6379` to the
+host:port where your Redis server is located.
+
+```csharp
+using System;
+using ServiceStack.Redis;
+
+namespace ssredis
+{
+ public class Program
+ {
+ public static void Main(string[] args)
+ {
+ var manager = new RedisManagerPool("localhost:6379");
+ using (var client = manager.GetClient())
+ {
+ client.Set("foo", "bar");
+ Console.WriteLine("foo={0}", client.Get("foo"));
+ }
+ }
+ }
+}
+```
+
+Then hit "run" button **(F5)**. You should get following output:
+
+
+
+## Run ServiceStack.Redis on Linux
+
+### Install .NET Core
+
+Suppose that you have ubuntu 16.04 installed (to see installation instructions for other OS you can
+visit [.NET Core site](https://www.microsoft.com/net/core)). Run commands in the console:
+
+ sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
+ sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
+ sudo apt-get update
+ sudo apt-get install curl dotnet-dev-1.0.0-preview2-003121
+
+### Create Project
+
+ dotnet new
+
+This command will create `project.json` and `Program.cs` files in current folder.
+
+
+
+Open `project.json` for edit:
+
+ nano project.json
+
+and edit empty `dependencies: {}` section to add `ServiceStack.Redis.Core` reference:
+
+ dependencies: {
+ "ServiceStack.Redis.Core" : "1.0.2"
+ }
+
+
+
+type `Ctrl+X` to exit. Answer 'yes' to save changes in the file.
+
+then open and edit `Program.cs` file. Type `nano Program.cs` and copy the code
+(change `localhost:6379` to `host:port` where your Redis Server is located.
+
+```csharp
+using System;
+using ServiceStack.Redis;
+
+namespace ssredis
+{
+ public class Program
+ {
+ public static void Main(string[] args)
+ {
+ var manager = new RedisManagerPool("localhost:6379");
+ using (var client = manager.GetClient())
+ {
+ client.Set("foo", "bar");
+ Console.WriteLine("foo={0}", client.Get("foo"));
+ }
+ }
+ }
+}
+```
+### Run the Project
+
+In console type:
+
+ dotnet restore
+ dotnet run
+
+The first command restores packages (note that packages version may vary from the version on screenshot) and second compiles and runs the application
+ and outputs value of `foo` key to console.
+
+
+
+
+
+## Limitations
+
+`ServiceStack.Redis.Core` is implemented to support [.NETStandard 1.3](https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-platform-standard.md) interface.
+Due to .NET Core does not support `BinaryFormatter` and `Remoting`, `ServiceStack.Redis.Core` does not support classes in `ServiceStack.Redis.Support` namespace
+
+ - RedisChronologicalWorkQueue
+ - RedisSequentionalWorkQueue
+ - RedisSimpleWorkQueue
+ - SerializingRedisClient
+ - ObjectSerializer
+ - OptimizedObjectSerializer
+ - Locking.DistributedLock
+ - Diagnostic.TrackingRedisClientProxy
+ - Diagnostic.TrackingRedisClientManager
diff --git a/lib/ServiceStack.Client.dll b/lib/ServiceStack.Client.dll
deleted file mode 100644
index 6b105c65..00000000
Binary files a/lib/ServiceStack.Client.dll and /dev/null differ
diff --git a/lib/ServiceStack.Client.xml b/lib/ServiceStack.Client.xml
deleted file mode 100644
index 10ce7eee..00000000
--- a/lib/ServiceStack.Client.xml
+++ /dev/null
@@ -1,374 +0,0 @@
-
-
-
- ServiceStack.Client
-
-
-
- Need to provide async request options
- http://msdn.microsoft.com/en-us/library/86wf6409(VS.71).aspx
-
-
-
- The request filter is called before any request.
- This request filter is executed globally.
-
-
-
-
- The response action is called once the server response is available.
- It will allow you to access raw response information.
- This response action is executed globally.
- Note that you should NOT consume the response stream as this is handled by ServiceStack
-
-
-
-
- Called before request resend, when the initial request required authentication
-
-
-
-
- The request filter is called before any request.
- This request filter only works with the instance where it was set (not global).
-
-
-
-
- The response action is called once the server response is available.
- It will allow you to access raw response information.
- Note that you should NOT consume the response stream as this is handled by ServiceStack
-
-
-
-
- Returns the next message from queueName or null if no message
-
-
-
-
-
-
- Generic Proxy for service calls.
-
- The service Contract
-
-
-
- Returns the transparent proxy for the service call
-
-
-
- Need to provide async request options
- http://msdn.microsoft.com/en-us/library/86wf6409(VS.71).aspx
-
-
-
- The request filter is called before any request.
- This request filter is executed globally.
-
-
-
-
- The response action is called once the server response is available.
- It will allow you to access raw response information.
- This response action is executed globally.
- Note that you should NOT consume the response stream as this is handled by ServiceStack
-
-
-
-
- Sets all baseUri properties, using the Format property for the SyncReplyBaseUri and AsyncOneWayBaseUri
-
- Base URI of the service
-
-
-
- Whether to Accept Gzip,Deflate Content-Encoding and to auto decompress responses
-
-
-
-
- The user name for basic authentication
-
-
-
-
- The password for basic authentication
-
-
-
-
- Sets the username and the password for basic authentication.
-
-
-
-
- Determines if the basic auth header should be sent with every request.
- By default, the basic auth header is only sent when "401 Unauthorized" is returned.
-
-
-
-
- Specifies if cookies should be stored
-
-
-
-
- Called by Send method if an exception occurs, for instance a System.Net.WebException because the server
- returned an HTTP error code. Override if you want to handle specific exceptions or always want to parse the
- response to a custom ErrorResponse DTO type instead of ServiceStack's ErrorResponse class. In case ex is a
- System.Net.WebException, do not use
- createWebRequest/getResponse/HandleResponse<TResponse> to parse the response
- because that will result in the same exception again. Use
- ThrowWebServiceException<YourErrorResponseType> to parse the response and to throw a
- WebServiceException containing the parsed DTO. Then override Send to handle that exception.
-
-
-
-
- Gets the collection of headers to be added to outgoing requests.
-
-
-
-
- Whether to execute async callbacks on the same Synchronization Context it was called from.
-
-
-
-
- Gets or sets authentication information for the request.
- Warning: It's recommened to use and for basic auth.
- This property is only used for IIS level authentication.
-
-
-
-
- Called before request resend, when the initial request required authentication
-
-
-
-
- The request filter is called before any request.
- This request filter only works with the instance where it was set (not global).
-
-
-
-
- The response action is called once the server response is available.
- It will allow you to access raw response information.
- Note that you should NOT consume the response stream as this is handled by ServiceStack
-
-
-
-
- Creates the error response from the values provided.
-
- If the errorCode is empty it will use the first validation error code,
- if there is none it will throw an error.
-
- The error code.
- The error message.
- The validation errors.
-
-
-
-
- Default MaxStringContentLength is 8k, and throws an exception when reached
-
-
-
-
- Serializer cache of delegates required to create a type from a string map (e.g. for REST urls)
-
-
-
-
- Gets the namespace from an attribute marked on the type's definition
-
-
- Namespace of type
-
-
-
- Specifies if cookies should be stored
-
-
-
-
- Compresses the specified text using the default compression method: Deflate
-
- The text.
- Type of the compression.
-
-
-
-
- Decompresses the specified gz buffer using the default compression method: Inflate
-
- The gz buffer.
- Type of the compression.
-
-
-
-
- Donated by Ivan Korneliuk from his post:
- http://korneliuk.blogspot.com/2012/08/servicestack-reusing-dtos.html
-
- Modified to only allow using routes matching the supplied HTTP Verb
-
-
-
-
- Generate a url from a Request DTO. Pretty URL generation require Routes to be defined using `[Route]` on the Request DTO
-
-
-
-
- The exception which is thrown when a validation error occurred.
- This validation is serialized in a extra clean and human-readable way by ServiceStack.
-
-
-
-
- Used if we need to serialize this exception to XML
-
-
-
-
-
- Returns the first error code
-
- The error code.
-
-
-
- Encapsulates a validation result.
-
-
-
-
- Constructs a new ValidationResult
-
-
-
-
- Constructs a new ValidationResult
-
- A list of validation results
-
-
-
- Initializes a new instance of the class.
-
- The errors.
- The success code.
- The error code.
-
-
-
- Merge errors from another
-
-
-
-
-
- Gets or sets the success code.
-
- The success code.
-
-
-
- Gets or sets the error code.
-
- The error code.
-
-
-
- Gets or sets the success message.
-
- The success message.
-
-
-
- Gets or sets the error message.
-
- The error message.
-
-
-
- The errors generated by the validation.
-
-
-
-
- Returns True if the validation was successful (errors list is empty).
-
-
-
-
- Adds the singleton instance of to an endpoint on the client.
-
-
- Based on http://megakemp.wordpress.com/2009/02/06/managing-shared-cookies-in-wcf/
-
-
-
-
- Adds the singleton of the class to the client endpoint's message inspectors.
-
- The endpoint that is to be customized.
- The client runtime to be customized.
-
-
-
- Maintains a copy of the cookies contained in the incoming HTTP response received from any service
- and appends it to all outgoing HTTP requests.
-
-
- This class effectively allows to send any received HTTP cookies to different services,
- reproducing the same functionality available in ASMX Web Services proxies with the class.
- Based on http://megakemp.wordpress.com/2009/02/06/managing-shared-cookies-in-wcf/
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Inspects a message after a reply message is received but prior to passing it back to the client application.
-
- The message to be transformed into types and handed back to the client application.
- Correlation state data.
-
-
-
- Inspects a message before a request message is sent to a service.
-
- The message to be sent to the service.
- The client object channel.
-
- Null since no message correlation is used.
-
-
-
-
- Gets the singleton instance.
-
-
-
-
- Naming convention for the request's Response DTO
-
-
-
-
- Shortcut to get the ResponseStatus whether it's bare or inside a IHttpResult
-
-
-
-
-
-
diff --git a/lib/ServiceStack.Common.dll b/lib/ServiceStack.Common.dll
deleted file mode 100755
index b7167075..00000000
Binary files a/lib/ServiceStack.Common.dll and /dev/null differ
diff --git a/lib/ServiceStack.Common.xml b/lib/ServiceStack.Common.xml
deleted file mode 100644
index eefa5dfb..00000000
--- a/lib/ServiceStack.Common.xml
+++ /dev/null
@@ -1,231 +0,0 @@
-
-
-
- ServiceStack.Common
-
-
-
-
- Useful .NET Encryption Utils from:
- http://andrewlocatelliwoodcock.com/2011/08/01/implementing-rsa-asymmetric-public-private-key-encryption-in-c-encrypting-under-the-public-key/
-
-
-
-
- Encrypt an arbitrary string of data under the supplied public key
-
- The public key to encrypt under
- The data to encrypt
- The bit length or strength of the public key: 1024, 2048 or 4096 bits. This must match the
- value actually used to create the publicKey
-
-
-
-
- Create Public and Private Key Pair based on settings already in static class.
-
- RsaKeyPair
-
-
-
- Return T[0] when enumerable is null, safe to use in enumerations like foreach
-
-
-
-
- Gets the textual description of the enum if it has one. e.g.
-
-
- enum UserColors
- {
- [Description("Bright Red")]
- BrightRed
- }
- UserColors.BrightRed.ToDescription();
-
-
-
-
-
-
-
- Creates a Console Logger, that logs all messages to: System.Console
-
- Made public so its testable
-
-
-
-
- Default logger is to Console.WriteLine
-
- Made public so its testable
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Logs the specified message.
-
-
-
-
- Logs the format.
-
-
-
-
- Logs the specified message.
-
-
-
-
- Useful IPAddressExtensions from:
- http://blogs.msdn.com/knom/archive/2008/12/31/ip-address-calculations-with-c-subnetmasks-networks.aspx
-
-
-
-
-
- Gets the ipv4 addresses from all Network Interfaces that have Subnet masks.
-
-
-
-
-
- Gets the ipv6 addresses from all Network Interfaces.
-
-
-
-
-
- Func to get the Strongly-typed field
-
-
-
-
- Required to cast the return ValueType to an object for caching
-
-
-
-
- Func to set the Strongly-typed field
-
-
-
-
- Required to cast the ValueType to an object for caching
-
-
-
-
- Required to cast the ValueType to an object for caching
-
-
-
-
- Func to get the Strongly-typed field
-
-
-
-
- Required to cast the return ValueType to an object for caching
-
-
-
-
- Func to set the Strongly-typed field
-
-
-
-
- Required to cast the ValueType to an object for caching
-
-
-
-
- Required to cast the ValueType to an object for caching
-
-
-
-
- Common functionality when creating adapters
-
-
-
-
- Executes the specified expression.
-
-
- The action.
-
-
-
-
- Executes the specified action (for void methods).
-
- The action.
-
-
-
- Note: InMemoryLog keeps all logs in memory, so don't use it long running exceptions
-
- Returns a thread-safe InMemoryLog which you can use while *TESTING*
- to provide a detailed analysis of your logs.
-
-
-
-
- Creates a Unified Resource Name (URN) with the following formats:
-
- - urn:{TypeName}:{IdFieldValue} e.g. urn:UserSession:1
- - urn:{TypeName}:{IdFieldName}:{IdFieldValue} e.g. urn:UserSession:UserId:1
-
-
-
-
-
-
- Provide the an option for the callee to block until all commands are executed
-
-
-
-
-
-
- Invokes the action provided and returns true if no excpetion was thrown.
- Otherwise logs the exception and returns false if an exception was thrown.
-
- The action.
-
-
-
-
- Runs an action for a minimum of runForMs
-
- What to run
- Minimum ms to run for
- time elapsed in micro seconds
-
-
-
- Returns average microseconds an action takes when run for the specified runForMs
-
- What to run
- How many times to run for each iteration
- Minimum ms to run for
-
-
-
-
-
-
-
diff --git a/lib/ServiceStack.Interfaces.dll b/lib/ServiceStack.Interfaces.dll
deleted file mode 100755
index 72e6de92..00000000
Binary files a/lib/ServiceStack.Interfaces.dll and /dev/null differ
diff --git a/lib/ServiceStack.Interfaces.dll.mdb b/lib/ServiceStack.Interfaces.dll.mdb
deleted file mode 100644
index 7c7b9c57..00000000
Binary files a/lib/ServiceStack.Interfaces.dll.mdb and /dev/null differ
diff --git a/lib/ServiceStack.Pcl.Net45.dll b/lib/ServiceStack.Pcl.Net45.dll
deleted file mode 100644
index 1d289b87..00000000
Binary files a/lib/ServiceStack.Pcl.Net45.dll and /dev/null differ
diff --git a/lib/ServiceStack.Pcl.WinStore.dll b/lib/ServiceStack.Pcl.WinStore.dll
deleted file mode 100644
index 51ebd33c..00000000
Binary files a/lib/ServiceStack.Pcl.WinStore.dll and /dev/null differ
diff --git a/lib/ServiceStack.Pcl.WinStore.pri b/lib/ServiceStack.Pcl.WinStore.pri
deleted file mode 100644
index a3071fe8..00000000
Binary files a/lib/ServiceStack.Pcl.WinStore.pri and /dev/null differ
diff --git a/lib/ServiceStack.Text.XML b/lib/ServiceStack.Text.XML
deleted file mode 100644
index 6cf831f5..00000000
--- a/lib/ServiceStack.Text.XML
+++ /dev/null
@@ -1,714 +0,0 @@
-
-
-
- ServiceStack.Text
-
-
-
-
- Utils to load types
-
-
-
-
- Find the type from the name supplied
-
- [typeName] or [typeName, assemblyName]
-
-
-
-
- The top-most interface of the given type, if any.
-
-
-
-
- Find type if it exists
-
-
-
- The type if it exists
-
-
-
- Populate an object with Example data.
-
-
-
-
-
-
- Populates the object with example data.
-
-
- Tracks how deeply nested we are
-
-
-
-
- If AlwaysUseUtc is set to true then convert all DateTime to UTC.
-
-
-
-
-
-
- Repairs an out-of-spec XML date/time string which incorrectly uses a space instead of a 'T' to separate the date from the time.
- These string are occasionally generated by SQLite and can cause errors in OrmLite when reading these columns from the DB.
-
- The XML date/time string to repair
- The repaired string. If no repairs were made, the original string is returned.
-
-
-
- WCF Json format: /Date(unixts+0000)/
-
-
-
-
-
-
- WCF Json format: /Date(unixts+0000)/
-
-
-
-
-
-
- Get the type(string) constructor if exists
-
- The type.
-
-
-
-
- micro optimizations: using flags instead of value.IndexOfAny(EscapeChars)
-
-
-
-
-
-
- Class to hold
-
-
-
-
-
- A fast, standards-based, serialization-issue free DateTime serailizer.
-
-
-
-
- Determines whether this serializer can create the specified type from a string.
-
- The type.
-
- true if this instance [can create from string] the specified type; otherwise, false.
-
-
-
-
- Parses the specified value.
-
- The value.
-
-
-
-
- Deserializes from reader.
-
- The reader.
-
-
-
-
- Serializes to string.
-
- The value.
-
-
-
-
- Serializes to writer.
-
- The value.
- The writer.
-
-
-
- Sets which format to use when serializing TimeSpans
-
-
-
-
- if the is configured
- to take advantage of specification,
- to support user-friendly serialized formats, ie emitting camelCasing for JSON
- and parsing member names and enum values in a case-insensitive manner.
-
-
-
-
- if the is configured
- to support web-friendly serialized formats, ie emitting lowercase_underscore_casing for JSON
-
-
-
-
- Define how property names are mapped during deserialization
-
-
-
-
- Gets or sets a value indicating if the framework should throw serialization exceptions
- or continue regardless of deserialization errors. If the framework
- will throw; otherwise, it will parse as many fields as possible. The default is .
-
-
-
-
- Gets or sets a value indicating if the framework should always convert to UTC format instead of local time.
-
-
-
-
- Gets or sets a value indicating if the framework should always assume is in UTC format if Kind is Unspecified.
-
-
-
-
- Gets or sets whether we should append the Utc offset when we serialize Utc dates. Defaults to no.
- Only supported for when the JsConfig.DateHandler == JsonDateHandler.TimestampOffset
-
-
-
-
- Gets or sets a value indicating if unicode symbols should be serialized as "\uXXXX".
-
-
-
-
- If set to true, Interface types will be prefered over concrete types when serializing.
-
-
-
-
- For extra serialization performance you can re-use a ThreadStatic StringBuilder
- when serializing to a JSON String.
-
-
-
-
- Sets the maximum depth to avoid circular dependencies
-
-
-
-
- Set this to enable your own type construction provider.
- This is helpful for integration with IoC containers where you need to call the container constructor.
- Return null if you don't know how to construct the type and the parameterless constructor will be used.
-
-
-
-
- If set to true, Interface types will be prefered over concrete types when serializing.
-
-
-
-
- Always emit type info for this type. Takes precedence over ExcludeTypeInfo
-
-
-
-
- Never emit type info for this type
-
-
-
-
- if the is configured
- to take advantage of specification,
- to support user-friendly serialized formats, ie emitting camelCasing for JSON
- and parsing member names and enum values in a case-insensitive manner.
-
-
-
-
- Define custom serialization fn for BCL Structs
-
-
-
-
- Define custom raw serialization fn
-
-
-
-
- Define custom serialization hook
-
-
-
-
- Define custom after serialization hook
-
-
-
-
- Define custom deserialization fn for BCL Structs
-
-
-
-
- Define custom raw deserialization fn for objects
-
-
-
-
- Exclude specific properties of this type from being serialized
-
-
-
-
- Opt-in flag to set some Value Types to be treated as a Ref Type
-
-
-
-
- Whether there is a fn (raw or otherwise)
-
-
-
-
- The property names on target types must match property names in the JSON source
-
-
-
-
- The property names on target types may not match the property names in the JSON source
-
-
-
-
- Uses the xsd format like PT15H10M20S
-
-
-
-
- Uses the standard .net ToString method of the TimeSpan class
-
-
-
-
- Get JSON string value converted to T
-
-
-
-
- Get JSON string value
-
-
-
-
- Get unescaped string value
-
-
-
-
- Get unescaped string value
-
-
-
-
- Write JSON Array, Object, bool or number values as raw string
-
-
-
-
- Get JSON string value
-
-
-
-
- Creates an instance of a Type from a string value
-
-
-
-
- Parses the specified value.
-
- The value.
-
-
-
-
- Shortcut escape when we're sure value doesn't contain any escaped chars
-
-
-
-
-
-
- Given a character as utf32, returns the equivalent string provided that the character
- is legal json.
-
-
-
-
-
-
- micro optimizations: using flags instead of value.IndexOfAny(EscapeChars)
-
-
-
-
-
-
- Implement the serializer using a more static approach
-
-
-
-
-
- Implement the serializer using a more static approach
-
-
-
-
-
- Public Code API to register commercial license for ServiceStack.
-
-
-
-
- Internal Utilities to verify licensing
-
-
-
-
- Pretty Thread-Safe cache class from:
- http://code.google.com/p/dapper-dot-net/source/browse/Dapper/SqlMapper.cs
-
- This is a micro-cache; suitable when the number of terms is controllable (a few hundred, for example),
- and strictly append-only; you cannot change existing values. All key matches are on **REFERENCE**
- equality. The type is fully thread-safe.
-
-
-
-
- Represents an individual object, allowing access to members by-name
-
-
-
-
- Use the target types definition of equality
-
-
-
-
- Obtain the hash of the target object
-
-
-
-
- Use the target's definition of a string representation
-
-
-
-
- Wraps an individual object, allowing by-name access to that instance
-
-
-
-
- Get or Set the value of a named member for the underlying object
-
-
-
-
- The object represented by this instance
-
-
-
-
- Provides by-name member-access to objects of a given type
-
-
-
-
- Create a new instance of this type
-
-
-
-
- Provides a type-specific accessor, allowing by-name access for all objects of that type
-
- The accessor is cached internally; a pre-existing accessor may be returned
-
-
-
- Does this type support new instances via a parameterless constructor?
-
-
-
-
- Get or set the value of a named member on the target instance
-
-
-
-
- Maps the path of a file in the context of a VS project
-
- the relative path
- the absolute path
- Assumes static content is two directories above the /bin/ directory,
- eg. in a unit test scenario the assembly would be in /bin/Debug/.
-
-
-
- Maps the path of a file in a self-hosted scenario
-
- the relative path
- the absolute path
- Assumes static content is copied to /bin/ folder with the assemblies
-
-
-
- Maps the path of a file in an Asp.Net hosted scenario
-
- the relative path
- the absolute path
- Assumes static content is in the parent folder of the /bin/ directory
-
-
-
- Implement the serializer using a more static approach
-
-
-
-
-
- Creates a new instance of type.
- First looks at JsConfig.ModelFactory before falling back to CreateInstance
-
-
-
-
- Creates a new instance of type.
- First looks at JsConfig.ModelFactory before falling back to CreateInstance
-
-
-
-
- Creates a new instance from the default constructor of type
-
-
-
-
- Add a Property attribute at runtime.
- Not threadsafe, should only add attributes on Startup.
-
-
-
-
- Add a Property attribute at runtime.
- Not threadsafe, should only add attributes on Startup.
-
-
-
-
- @jonskeet: Collection of utility methods which operate on streams.
- r285, February 26th 2009: http://www.yoda.arachsys.com/csharp/miscutil/
-
-
-
-
- Reads the given stream up to the end, returning the data as a byte
- array.
-
-
-
-
- Reads the given stream up to the end, returning the data as a byte
- array, using the given buffer size.
-
-
-
-
- Reads the given stream up to the end, returning the data as a byte
- array, using the given buffer for transferring data. Note that the
- current contents of the buffer is ignored, so the buffer needn't
- be cleared beforehand.
-
-
-
-
- Copies all the data from one stream into another.
-
-
-
-
- Copies all the data from one stream into another, using a buffer
- of the given size.
-
-
-
-
- Copies all the data from one stream into another, using the given
- buffer for transferring data. Note that the current contents of
- the buffer is ignored, so the buffer needn't be cleared beforehand.
-
-
-
-
- Reads exactly the given number of bytes from the specified stream.
- If the end of the stream is reached before the specified amount
- of data is read, an exception is thrown.
-
-
-
-
- Reads into a buffer, filling it completely.
-
-
-
-
- Reads exactly the given number of bytes from the specified stream,
- into the given buffer, starting at position 0 of the array.
-
-
-
-
- Reads exactly the given number of bytes from the specified stream,
- into the given buffer, starting at position 0 of the array.
-
-
-
-
- Same as ReadExactly, but without the argument checks.
-
-
-
-
- Converts from base: 0 - 62
-
- The source.
- From.
- To.
-
-
-
-
- Skip the encoding process for 'safe strings'
-
-
-
-
-
-
- A class to allow the conversion of doubles to string representations of
- their exact decimal values. The implementation aims for readability over
- efficiency.
-
- Courtesy of @JonSkeet
- http://www.yoda.arachsys.com/csharp/DoubleConverter.cs
-
-
-
-
-
-
-
- How many digits are *after* the decimal point
-
-
-
-
- Constructs an arbitrary decimal expansion from the given long.
- The long must not be negative.
-
-
-
-
- Multiplies the current expansion by the given amount, which should
- only be 2 or 5.
-
-
-
-
- Shifts the decimal point; a negative value makes
- the decimal expansion bigger (as fewer digits come after the
- decimal place) and a positive value makes the decimal
- expansion smaller.
-
-
-
-
- Removes leading/trailing zeroes from the expansion.
-
-
-
-
- Converts the value to a proper decimal string representation.
-
-
-
-
- Creates an instance of a Type from a string value
-
-
-
-
- Determines whether the specified type is convertible from string.
-
- The type.
-
- true if the specified type is convertible from string; otherwise, false.
-
-
-
-
- Parses the specified value.
-
- The value.
-
-
-
-
- Parses the specified type.
-
- The type.
- The value.
-
-
-
-
- Useful extension method to get the Dictionary[string,string] representation of any POCO type.
-
-
-
-
-
- Recursively prints the contents of any POCO object in a human-friendly, readable format
-
-
-
-
-
- Print Dump to Console.WriteLine
-
-
-
-
- Print string.Format to Console.WriteLine
-
-
-
-
- Parses the specified value.
-
- The value.
-
-
-
-
diff --git a/lib/ServiceStack.Text.dll b/lib/ServiceStack.Text.dll
deleted file mode 100755
index 3b6cc115..00000000
Binary files a/lib/ServiceStack.Text.dll and /dev/null differ
diff --git a/lib/signed/ServiceStack.Common.dll b/lib/signed/ServiceStack.Common.dll
deleted file mode 100644
index 4dfde049..00000000
Binary files a/lib/signed/ServiceStack.Common.dll and /dev/null differ
diff --git a/lib/signed/ServiceStack.Text.XML b/lib/signed/ServiceStack.Text.XML
deleted file mode 100644
index 6cf831f5..00000000
--- a/lib/signed/ServiceStack.Text.XML
+++ /dev/null
@@ -1,714 +0,0 @@
-
-
-
- ServiceStack.Text
-
-
-
-
- Utils to load types
-
-
-
-
- Find the type from the name supplied
-
- [typeName] or [typeName, assemblyName]
-
-
-
-
- The top-most interface of the given type, if any.
-
-
-
-
- Find type if it exists
-
-
-
- The type if it exists
-
-
-
- Populate an object with Example data.
-
-
-
-
-
-
- Populates the object with example data.
-
-
- Tracks how deeply nested we are
-
-
-
-
- If AlwaysUseUtc is set to true then convert all DateTime to UTC.
-
-
-
-
-
-
- Repairs an out-of-spec XML date/time string which incorrectly uses a space instead of a 'T' to separate the date from the time.
- These string are occasionally generated by SQLite and can cause errors in OrmLite when reading these columns from the DB.
-
- The XML date/time string to repair
- The repaired string. If no repairs were made, the original string is returned.
-
-
-
- WCF Json format: /Date(unixts+0000)/
-
-
-
-
-
-
- WCF Json format: /Date(unixts+0000)/
-
-
-
-
-
-
- Get the type(string) constructor if exists
-
- The type.
-
-
-
-
- micro optimizations: using flags instead of value.IndexOfAny(EscapeChars)
-
-
-
-
-
-
- Class to hold
-
-
-
-
-
- A fast, standards-based, serialization-issue free DateTime serailizer.
-
-
-
-
- Determines whether this serializer can create the specified type from a string.
-
- The type.
-
- true if this instance [can create from string] the specified type; otherwise, false.
-
-
-
-
- Parses the specified value.
-
- The value.
-
-
-
-
- Deserializes from reader.
-
- The reader.
-
-
-
-
- Serializes to string.
-
- The value.
-
-
-
-
- Serializes to writer.
-
- The value.
- The writer.
-
-
-
- Sets which format to use when serializing TimeSpans
-
-
-
-
- if the is configured
- to take advantage of specification,
- to support user-friendly serialized formats, ie emitting camelCasing for JSON
- and parsing member names and enum values in a case-insensitive manner.
-
-
-
-
- if the is configured
- to support web-friendly serialized formats, ie emitting lowercase_underscore_casing for JSON
-
-
-
-
- Define how property names are mapped during deserialization
-
-
-
-
- Gets or sets a value indicating if the framework should throw serialization exceptions
- or continue regardless of deserialization errors. If the framework
- will throw; otherwise, it will parse as many fields as possible. The default is .
-
-
-
-
- Gets or sets a value indicating if the framework should always convert to UTC format instead of local time.
-
-
-
-
- Gets or sets a value indicating if the framework should always assume is in UTC format if Kind is Unspecified.
-
-
-
-
- Gets or sets whether we should append the Utc offset when we serialize Utc dates. Defaults to no.
- Only supported for when the JsConfig.DateHandler == JsonDateHandler.TimestampOffset
-
-
-
-
- Gets or sets a value indicating if unicode symbols should be serialized as "\uXXXX".
-
-
-
-
- If set to true, Interface types will be prefered over concrete types when serializing.
-
-
-
-
- For extra serialization performance you can re-use a ThreadStatic StringBuilder
- when serializing to a JSON String.
-
-
-
-
- Sets the maximum depth to avoid circular dependencies
-
-
-
-
- Set this to enable your own type construction provider.
- This is helpful for integration with IoC containers where you need to call the container constructor.
- Return null if you don't know how to construct the type and the parameterless constructor will be used.
-
-
-
-
- If set to true, Interface types will be prefered over concrete types when serializing.
-
-
-
-
- Always emit type info for this type. Takes precedence over ExcludeTypeInfo
-
-
-
-
- Never emit type info for this type
-
-
-
-
- if the is configured
- to take advantage of specification,
- to support user-friendly serialized formats, ie emitting camelCasing for JSON
- and parsing member names and enum values in a case-insensitive manner.
-
-
-
-
- Define custom serialization fn for BCL Structs
-
-
-
-
- Define custom raw serialization fn
-
-
-
-
- Define custom serialization hook
-
-
-
-
- Define custom after serialization hook
-
-
-
-
- Define custom deserialization fn for BCL Structs
-
-
-
-
- Define custom raw deserialization fn for objects
-
-
-
-
- Exclude specific properties of this type from being serialized
-
-
-
-
- Opt-in flag to set some Value Types to be treated as a Ref Type
-
-
-
-
- Whether there is a fn (raw or otherwise)
-
-
-
-
- The property names on target types must match property names in the JSON source
-
-
-
-
- The property names on target types may not match the property names in the JSON source
-
-
-
-
- Uses the xsd format like PT15H10M20S
-
-
-
-
- Uses the standard .net ToString method of the TimeSpan class
-
-
-
-
- Get JSON string value converted to T
-
-
-
-
- Get JSON string value
-
-
-
-
- Get unescaped string value
-
-
-
-
- Get unescaped string value
-
-
-
-
- Write JSON Array, Object, bool or number values as raw string
-
-
-
-
- Get JSON string value
-
-
-
-
- Creates an instance of a Type from a string value
-
-
-
-
- Parses the specified value.
-
- The value.
-
-
-
-
- Shortcut escape when we're sure value doesn't contain any escaped chars
-
-
-
-
-
-
- Given a character as utf32, returns the equivalent string provided that the character
- is legal json.
-
-
-
-
-
-
- micro optimizations: using flags instead of value.IndexOfAny(EscapeChars)
-
-
-
-
-
-
- Implement the serializer using a more static approach
-
-
-
-
-
- Implement the serializer using a more static approach
-
-
-
-
-
- Public Code API to register commercial license for ServiceStack.
-
-
-
-
- Internal Utilities to verify licensing
-
-
-
-
- Pretty Thread-Safe cache class from:
- http://code.google.com/p/dapper-dot-net/source/browse/Dapper/SqlMapper.cs
-
- This is a micro-cache; suitable when the number of terms is controllable (a few hundred, for example),
- and strictly append-only; you cannot change existing values. All key matches are on **REFERENCE**
- equality. The type is fully thread-safe.
-
-
-
-
- Represents an individual object, allowing access to members by-name
-
-
-
-
- Use the target types definition of equality
-
-
-
-
- Obtain the hash of the target object
-
-
-
-
- Use the target's definition of a string representation
-
-
-
-
- Wraps an individual object, allowing by-name access to that instance
-
-
-
-
- Get or Set the value of a named member for the underlying object
-
-
-
-
- The object represented by this instance
-
-
-
-
- Provides by-name member-access to objects of a given type
-
-
-
-
- Create a new instance of this type
-
-
-
-
- Provides a type-specific accessor, allowing by-name access for all objects of that type
-
- The accessor is cached internally; a pre-existing accessor may be returned
-
-
-
- Does this type support new instances via a parameterless constructor?
-
-
-
-
- Get or set the value of a named member on the target instance
-
-
-
-
- Maps the path of a file in the context of a VS project
-
- the relative path
- the absolute path
- Assumes static content is two directories above the /bin/ directory,
- eg. in a unit test scenario the assembly would be in /bin/Debug/.
-
-
-
- Maps the path of a file in a self-hosted scenario
-
- the relative path
- the absolute path
- Assumes static content is copied to /bin/ folder with the assemblies
-
-
-
- Maps the path of a file in an Asp.Net hosted scenario
-
- the relative path
- the absolute path
- Assumes static content is in the parent folder of the /bin/ directory
-
-
-
- Implement the serializer using a more static approach
-
-
-
-
-
- Creates a new instance of type.
- First looks at JsConfig.ModelFactory before falling back to CreateInstance
-
-
-
-
- Creates a new instance of type.
- First looks at JsConfig.ModelFactory before falling back to CreateInstance
-
-
-
-
- Creates a new instance from the default constructor of type
-
-
-
-
- Add a Property attribute at runtime.
- Not threadsafe, should only add attributes on Startup.
-
-
-
-
- Add a Property attribute at runtime.
- Not threadsafe, should only add attributes on Startup.
-
-
-
-
- @jonskeet: Collection of utility methods which operate on streams.
- r285, February 26th 2009: http://www.yoda.arachsys.com/csharp/miscutil/
-
-
-
-
- Reads the given stream up to the end, returning the data as a byte
- array.
-
-
-
-
- Reads the given stream up to the end, returning the data as a byte
- array, using the given buffer size.
-
-
-
-
- Reads the given stream up to the end, returning the data as a byte
- array, using the given buffer for transferring data. Note that the
- current contents of the buffer is ignored, so the buffer needn't
- be cleared beforehand.
-
-
-
-
- Copies all the data from one stream into another.
-
-
-
-
- Copies all the data from one stream into another, using a buffer
- of the given size.
-
-
-
-
- Copies all the data from one stream into another, using the given
- buffer for transferring data. Note that the current contents of
- the buffer is ignored, so the buffer needn't be cleared beforehand.
-
-
-
-
- Reads exactly the given number of bytes from the specified stream.
- If the end of the stream is reached before the specified amount
- of data is read, an exception is thrown.
-
-
-
-
- Reads into a buffer, filling it completely.
-
-
-
-
- Reads exactly the given number of bytes from the specified stream,
- into the given buffer, starting at position 0 of the array.
-
-
-
-
- Reads exactly the given number of bytes from the specified stream,
- into the given buffer, starting at position 0 of the array.
-
-
-
-
- Same as ReadExactly, but without the argument checks.
-
-
-
-
- Converts from base: 0 - 62
-
- The source.
- From.
- To.
-
-
-
-
- Skip the encoding process for 'safe strings'
-
-
-
-
-
-
- A class to allow the conversion of doubles to string representations of
- their exact decimal values. The implementation aims for readability over
- efficiency.
-
- Courtesy of @JonSkeet
- http://www.yoda.arachsys.com/csharp/DoubleConverter.cs
-
-
-
-
-
-
-
- How many digits are *after* the decimal point
-
-
-
-
- Constructs an arbitrary decimal expansion from the given long.
- The long must not be negative.
-
-
-
-
- Multiplies the current expansion by the given amount, which should
- only be 2 or 5.
-
-
-
-
- Shifts the decimal point; a negative value makes
- the decimal expansion bigger (as fewer digits come after the
- decimal place) and a positive value makes the decimal
- expansion smaller.
-
-
-
-
- Removes leading/trailing zeroes from the expansion.
-
-
-
-
- Converts the value to a proper decimal string representation.
-
-
-
-
- Creates an instance of a Type from a string value
-
-
-
-
- Determines whether the specified type is convertible from string.
-
- The type.
-
- true if the specified type is convertible from string; otherwise, false.
-
-
-
-
- Parses the specified value.
-
- The value.
-
-
-
-
- Parses the specified type.
-
- The type.
- The value.
-
-
-
-
- Useful extension method to get the Dictionary[string,string] representation of any POCO type.
-
-
-
-
-
- Recursively prints the contents of any POCO object in a human-friendly, readable format
-
-
-
-
-
- Print Dump to Console.WriteLine
-
-
-
-
- Print string.Format to Console.WriteLine
-
-
-
-
- Parses the specified value.
-
- The value.
-
-
-
-
diff --git a/lib/signed/ServiceStack.Text.dll b/lib/signed/ServiceStack.Text.dll
deleted file mode 100644
index 794729c8..00000000
Binary files a/lib/signed/ServiceStack.Text.dll and /dev/null differ
diff --git a/lib/tests/Moq.dll b/lib/tests/Moq.dll
deleted file mode 100644
index abcb72ee..00000000
Binary files a/lib/tests/Moq.dll and /dev/null differ
diff --git a/lib/tests/Moq.pdb b/lib/tests/Moq.pdb
deleted file mode 100644
index 034ab186..00000000
Binary files a/lib/tests/Moq.pdb and /dev/null differ
diff --git a/lib/tests/Northwind.Common.dll b/lib/tests/Northwind.Common.dll
deleted file mode 100644
index b33ffb10..00000000
Binary files a/lib/tests/Northwind.Common.dll and /dev/null differ
diff --git a/lib/tests/RazorEngine.dll b/lib/tests/RazorEngine.dll
deleted file mode 100644
index 2b26c7d3..00000000
Binary files a/lib/tests/RazorEngine.dll and /dev/null differ
diff --git a/lib/tests/ServiceStack.Client.dll b/lib/tests/ServiceStack.Client.dll
deleted file mode 100644
index ece117f3..00000000
Binary files a/lib/tests/ServiceStack.Client.dll and /dev/null differ
diff --git a/lib/tests/ServiceStack.Client.xml b/lib/tests/ServiceStack.Client.xml
deleted file mode 100644
index 10ce7eee..00000000
--- a/lib/tests/ServiceStack.Client.xml
+++ /dev/null
@@ -1,374 +0,0 @@
-
-
-
- ServiceStack.Client
-
-
-
- Need to provide async request options
- http://msdn.microsoft.com/en-us/library/86wf6409(VS.71).aspx
-
-
-
- The request filter is called before any request.
- This request filter is executed globally.
-
-
-
-
- The response action is called once the server response is available.
- It will allow you to access raw response information.
- This response action is executed globally.
- Note that you should NOT consume the response stream as this is handled by ServiceStack
-
-
-
-
- Called before request resend, when the initial request required authentication
-
-
-
-
- The request filter is called before any request.
- This request filter only works with the instance where it was set (not global).
-
-
-
-
- The response action is called once the server response is available.
- It will allow you to access raw response information.
- Note that you should NOT consume the response stream as this is handled by ServiceStack
-
-
-
-
- Returns the next message from queueName or null if no message
-
-
-
-
-
-
- Generic Proxy for service calls.
-
- The service Contract
-
-
-
- Returns the transparent proxy for the service call
-
-
-
- Need to provide async request options
- http://msdn.microsoft.com/en-us/library/86wf6409(VS.71).aspx
-
-
-
- The request filter is called before any request.
- This request filter is executed globally.
-
-
-
-
- The response action is called once the server response is available.
- It will allow you to access raw response information.
- This response action is executed globally.
- Note that you should NOT consume the response stream as this is handled by ServiceStack
-
-
-
-
- Sets all baseUri properties, using the Format property for the SyncReplyBaseUri and AsyncOneWayBaseUri
-
- Base URI of the service
-
-
-
- Whether to Accept Gzip,Deflate Content-Encoding and to auto decompress responses
-
-
-
-
- The user name for basic authentication
-
-
-
-
- The password for basic authentication
-
-
-
-
- Sets the username and the password for basic authentication.
-
-
-
-
- Determines if the basic auth header should be sent with every request.
- By default, the basic auth header is only sent when "401 Unauthorized" is returned.
-
-
-
-
- Specifies if cookies should be stored
-
-
-
-
- Called by Send method if an exception occurs, for instance a System.Net.WebException because the server
- returned an HTTP error code. Override if you want to handle specific exceptions or always want to parse the
- response to a custom ErrorResponse DTO type instead of ServiceStack's ErrorResponse class. In case ex is a
- System.Net.WebException, do not use
- createWebRequest/getResponse/HandleResponse<TResponse> to parse the response
- because that will result in the same exception again. Use
- ThrowWebServiceException<YourErrorResponseType> to parse the response and to throw a
- WebServiceException containing the parsed DTO. Then override Send to handle that exception.
-
-
-
-
- Gets the collection of headers to be added to outgoing requests.
-
-
-
-
- Whether to execute async callbacks on the same Synchronization Context it was called from.
-
-
-
-
- Gets or sets authentication information for the request.
- Warning: It's recommened to use and for basic auth.
- This property is only used for IIS level authentication.
-
-
-
-
- Called before request resend, when the initial request required authentication
-
-
-
-
- The request filter is called before any request.
- This request filter only works with the instance where it was set (not global).
-
-
-
-
- The response action is called once the server response is available.
- It will allow you to access raw response information.
- Note that you should NOT consume the response stream as this is handled by ServiceStack
-
-
-
-
- Creates the error response from the values provided.
-
- If the errorCode is empty it will use the first validation error code,
- if there is none it will throw an error.
-
- The error code.
- The error message.
- The validation errors.
-
-
-
-
- Default MaxStringContentLength is 8k, and throws an exception when reached
-
-
-
-
- Serializer cache of delegates required to create a type from a string map (e.g. for REST urls)
-
-
-
-
- Gets the namespace from an attribute marked on the type's definition
-
-
- Namespace of type
-
-
-
- Specifies if cookies should be stored
-
-
-
-
- Compresses the specified text using the default compression method: Deflate
-
- The text.
- Type of the compression.
-
-
-
-
- Decompresses the specified gz buffer using the default compression method: Inflate
-
- The gz buffer.
- Type of the compression.
-
-
-
-
- Donated by Ivan Korneliuk from his post:
- http://korneliuk.blogspot.com/2012/08/servicestack-reusing-dtos.html
-
- Modified to only allow using routes matching the supplied HTTP Verb
-
-
-
-
- Generate a url from a Request DTO. Pretty URL generation require Routes to be defined using `[Route]` on the Request DTO
-
-
-
-
- The exception which is thrown when a validation error occurred.
- This validation is serialized in a extra clean and human-readable way by ServiceStack.
-
-
-
-
- Used if we need to serialize this exception to XML
-
-
-
-
-
- Returns the first error code
-
- The error code.
-
-
-
- Encapsulates a validation result.
-
-
-
-
- Constructs a new ValidationResult
-
-
-
-
- Constructs a new ValidationResult
-
- A list of validation results
-
-
-
- Initializes a new instance of the class.
-
- The errors.
- The success code.
- The error code.
-
-
-
- Merge errors from another
-
-
-
-
-
- Gets or sets the success code.
-
- The success code.
-
-
-
- Gets or sets the error code.
-
- The error code.
-
-
-
- Gets or sets the success message.
-
- The success message.
-
-
-
- Gets or sets the error message.
-
- The error message.
-
-
-
- The errors generated by the validation.
-
-
-
-
- Returns True if the validation was successful (errors list is empty).
-
-
-
-
- Adds the singleton instance of to an endpoint on the client.
-
-
- Based on http://megakemp.wordpress.com/2009/02/06/managing-shared-cookies-in-wcf/
-
-
-
-
- Adds the singleton of the class to the client endpoint's message inspectors.
-
- The endpoint that is to be customized.
- The client runtime to be customized.
-
-
-
- Maintains a copy of the cookies contained in the incoming HTTP response received from any service
- and appends it to all outgoing HTTP requests.
-
-
- This class effectively allows to send any received HTTP cookies to different services,
- reproducing the same functionality available in ASMX Web Services proxies with the class.
- Based on http://megakemp.wordpress.com/2009/02/06/managing-shared-cookies-in-wcf/
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Inspects a message after a reply message is received but prior to passing it back to the client application.
-
- The message to be transformed into types and handed back to the client application.
- Correlation state data.
-
-
-
- Inspects a message before a request message is sent to a service.
-
- The message to be sent to the service.
- The client object channel.
-
- Null since no message correlation is used.
-
-
-
-
- Gets the singleton instance.
-
-
-
-
- Naming convention for the request's Response DTO
-
-
-
-
- Shortcut to get the ResponseStatus whether it's bare or inside a IHttpResult
-
-
-
-
-
-
diff --git a/lib/tests/ServiceStack.Common.Tests.dll b/lib/tests/ServiceStack.Common.Tests.dll
deleted file mode 100644
index e67f7448..00000000
Binary files a/lib/tests/ServiceStack.Common.Tests.dll and /dev/null differ
diff --git a/lib/tests/ServiceStack.Common.Tests.dll.config b/lib/tests/ServiceStack.Common.Tests.dll.config
deleted file mode 100644
index 3e05c78c..00000000
--- a/lib/tests/ServiceStack.Common.Tests.dll.config
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/lib/tests/ServiceStack.Common.Tests.pdb b/lib/tests/ServiceStack.Common.Tests.pdb
deleted file mode 100644
index 937977d1..00000000
Binary files a/lib/tests/ServiceStack.Common.Tests.pdb and /dev/null differ
diff --git a/lib/tests/ServiceStack.Common.dll b/lib/tests/ServiceStack.Common.dll
deleted file mode 100644
index b7167075..00000000
Binary files a/lib/tests/ServiceStack.Common.dll and /dev/null differ
diff --git a/lib/tests/ServiceStack.Common.xml b/lib/tests/ServiceStack.Common.xml
deleted file mode 100644
index eefa5dfb..00000000
--- a/lib/tests/ServiceStack.Common.xml
+++ /dev/null
@@ -1,231 +0,0 @@
-
-
-
- ServiceStack.Common
-
-
-
-
- Useful .NET Encryption Utils from:
- http://andrewlocatelliwoodcock.com/2011/08/01/implementing-rsa-asymmetric-public-private-key-encryption-in-c-encrypting-under-the-public-key/
-
-
-
-
- Encrypt an arbitrary string of data under the supplied public key
-
- The public key to encrypt under
- The data to encrypt
- The bit length or strength of the public key: 1024, 2048 or 4096 bits. This must match the
- value actually used to create the publicKey
-
-
-
-
- Create Public and Private Key Pair based on settings already in static class.
-
- RsaKeyPair
-
-
-
- Return T[0] when enumerable is null, safe to use in enumerations like foreach
-
-
-
-
- Gets the textual description of the enum if it has one. e.g.
-
-
- enum UserColors
- {
- [Description("Bright Red")]
- BrightRed
- }
- UserColors.BrightRed.ToDescription();
-
-
-
-
-
-
-
- Creates a Console Logger, that logs all messages to: System.Console
-
- Made public so its testable
-
-
-
-
- Default logger is to Console.WriteLine
-
- Made public so its testable
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Logs the specified message.
-
-
-
-
- Logs the format.
-
-
-
-
- Logs the specified message.
-
-
-
-
- Useful IPAddressExtensions from:
- http://blogs.msdn.com/knom/archive/2008/12/31/ip-address-calculations-with-c-subnetmasks-networks.aspx
-
-
-
-
-
- Gets the ipv4 addresses from all Network Interfaces that have Subnet masks.
-
-
-
-
-
- Gets the ipv6 addresses from all Network Interfaces.
-
-
-
-
-
- Func to get the Strongly-typed field
-
-
-
-
- Required to cast the return ValueType to an object for caching
-
-
-
-
- Func to set the Strongly-typed field
-
-
-
-
- Required to cast the ValueType to an object for caching
-
-
-
-
- Required to cast the ValueType to an object for caching
-
-
-
-
- Func to get the Strongly-typed field
-
-
-
-
- Required to cast the return ValueType to an object for caching
-
-
-
-
- Func to set the Strongly-typed field
-
-
-
-
- Required to cast the ValueType to an object for caching
-
-
-
-
- Required to cast the ValueType to an object for caching
-
-
-
-
- Common functionality when creating adapters
-
-
-
-
- Executes the specified expression.
-
-
- The action.
-
-
-
-
- Executes the specified action (for void methods).
-
- The action.
-
-
-
- Note: InMemoryLog keeps all logs in memory, so don't use it long running exceptions
-
- Returns a thread-safe InMemoryLog which you can use while *TESTING*
- to provide a detailed analysis of your logs.
-
-
-
-
- Creates a Unified Resource Name (URN) with the following formats:
-
- - urn:{TypeName}:{IdFieldValue} e.g. urn:UserSession:1
- - urn:{TypeName}:{IdFieldName}:{IdFieldValue} e.g. urn:UserSession:UserId:1
-
-
-
-
-
-
- Provide the an option for the callee to block until all commands are executed
-
-
-
-
-
-
- Invokes the action provided and returns true if no excpetion was thrown.
- Otherwise logs the exception and returns false if an exception was thrown.
-
- The action.
-
-
-
-
- Runs an action for a minimum of runForMs
-
- What to run
- Minimum ms to run for
- time elapsed in micro seconds
-
-
-
- Returns average microseconds an action takes when run for the specified runForMs
-
- What to run
- How many times to run for each iteration
- Minimum ms to run for
-
-
-
-
-
-
-
diff --git a/lib/tests/ServiceStack.Interfaces.dll b/lib/tests/ServiceStack.Interfaces.dll
deleted file mode 100644
index 394502a5..00000000
Binary files a/lib/tests/ServiceStack.Interfaces.dll and /dev/null differ
diff --git a/lib/tests/ServiceStack.Interfaces.xml b/lib/tests/ServiceStack.Interfaces.xml
deleted file mode 100644
index 8729e037..00000000
--- a/lib/tests/ServiceStack.Interfaces.xml
+++ /dev/null
@@ -1,1722 +0,0 @@
-
-
-
- ServiceStack.Interfaces
-
-
-
-
- A common interface implementation that is implemented by most cache providers
-
-
-
-
- Removes the specified item from the cache.
-
- The identifier for the item to delete.
-
- true if the item was successfully removed from the cache; false otherwise.
-
-
-
-
- Removes the cache for all the keys provided.
-
- The keys.
-
-
-
- Retrieves the specified item from the cache.
-
-
- The identifier for the item to retrieve.
-
- The retrieved item, or null if the key was not found.
-
-
-
-
- Increments the value of the specified key by the given amount.
- The operation is atomic and happens on the server.
- A non existent value at key starts at 0
-
- The identifier for the item to increment.
- The amount by which the client wants to increase the item.
-
- The new value of the item or -1 if not found.
-
- The item must be inserted into the cache before it can be changed. The item must be inserted as a . The operation only works with values, so -1 always indicates that the item was not found.
-
-
-
- Increments the value of the specified key by the given amount.
- The operation is atomic and happens on the server.
- A non existent value at key starts at 0
-
- The identifier for the item to increment.
- The amount by which the client wants to decrease the item.
-
- The new value of the item or -1 if not found.
-
- The item must be inserted into the cache before it can be changed. The item must be inserted as a . The operation only works with values, so -1 always indicates that the item was not found.
-
-
-
- Adds a new item into the cache at the specified cache key only if the cache is empty.
-
- The key used to reference the item.
- The object to be inserted into the cache.
-
- true if the item was successfully stored in the cache; false otherwise.
-
- The item does not expire unless it is removed due memory pressure.
-
-
-
- Sets an item into the cache at the cache key specified regardless if it already exists or not.
-
-
-
-
- Replaces the item at the cachekey specified only if an items exists at the location already.
-
-
-
-
- Invalidates all data on the cache.
-
-
-
-
- Retrieves multiple items from the cache.
- The default value of T is set for all keys that do not exist.
-
- The list of identifiers for the items to retrieve.
-
- a Dictionary holding all items indexed by their key.
-
-
-
-
- Sets multiple items to the cache.
-
-
- The values.
-
-
-
- Removes items from cache that have keys matching the specified wildcard pattern
-
- The wildcard, where "*" means any sequence of characters and "?" means any single character.
-
-
-
- Removes items from the cache based on the specified regular expression pattern
-
- Regular expression pattern to search cache keys
-
-
-
- A light interface over a cache client.
- This interface was inspired by Enyim.Caching.MemcachedClient
-
- Only the methods that are intended to be used are required, if you require
- extra functionality you can uncomment the unused methods below as they have been
- implemented in DdnMemcachedClient
-
-
-
-
- Removes the specified item from the cache.
-
- The identifier for the item to delete.
-
- true if the item was successfully removed from the cache; false otherwise.
-
-
-
-
- Removes the cache for all the keys provided.
-
- The keys.
-
-
-
- Retrieves the specified item from the cache.
-
- The identifier for the item to retrieve.
-
- The retrieved item, or null if the key was not found.
-
-
-
-
- Increments the value of the specified key by the given amount. The operation is atomic and happens on the server.
-
- The identifier for the item to increment.
- The amount by which the client wants to increase the item.
-
- The new value of the item or -1 if not found.
-
- The item must be inserted into the cache before it can be changed. The item must be inserted as a . The operation only works with values, so -1 always indicates that the item was not found.
-
-
-
- Increments the value of the specified key by the given amount. The operation is atomic and happens on the server.
-
- The identifier for the item to increment.
- The amount by which the client wants to decrease the item.
-
- The new value of the item or -1 if not found.
-
- The item must be inserted into the cache before it can be changed. The item must be inserted as a . The operation only works with values, so -1 always indicates that the item was not found.
-
-
-
- Inserts an item into the cache with a cache key to reference its location.
-
- The key used to reference the item.
- The object to be inserted into the cache.
-
- true if the item was successfully stored in the cache; false otherwise.
-
- The item does not expire unless it is removed due memory pressure.
-
-
-
- Inserts an item into the cache with a cache key to reference its location.
-
- The key used to reference the item.
- The object to be inserted into the cache.
- The time when the item is invalidated in the cache.
- true if the item was successfully stored in the cache; false otherwise.
-
-
-
- Removes all data from the cache.
-
-
-
-
- Retrieves multiple items from the cache.
-
- The list of identifiers for the items to retrieve.
-
- a Dictionary holding all items indexed by their key.
-
-
-
-
- A Users Session
-
-
-
-
- Set a typed value at key
-
-
-
-
-
-
-
- Get a typed value at key
-
-
-
-
-
-
-
- Store any object at key
-
-
-
-
-
-
- Retrieves a User Session
-
-
-
-
- Gets the session for this request, creates one if it doesn't exist.
-
-
-
-
-
-
-
- Gets the session for this request, creates one if it doesn't exist.
- Only for ASP.NET apps. Uses the HttpContext.Current singleton.
-
-
-
-
- Allow delegation of dependencies to other IOC's
-
-
-
-
- Resolve Property Dependency
-
-
-
-
-
-
- Resolve Constructor Dependency
-
-
-
-
-
-
- BelongToAttribute
- Use to indicate that a join column belongs to another table.
-
-
-
-
- Compute attribute.
- Use to indicate that a property is a Calculated Field
-
-
-
-
- Mark types that are to be excluded from specified features
-
-
-
-
- Decimal length attribute.
-
-
-
-
- Explicit foreign key name. If it's null, or empty, the FK name will be autogenerated as before.
-
-
-
-
- IgnoreAttribute
- Use to indicate that a property is not a field in the table
- properties with this attribute are ignored when building sql sentences
-
-
-
-
- Primary key attribute.
- use to indicate that property is part of the pk
-
-
-
-
- Used to indicate that property is a row version incremented automatically by the database
-
-
-
-
- Used to annotate an Entity with its DB schema
-
-
-
-
-
- For providers that want a cleaner API with a little more perf
-
-
-
-
-
- Decorate any type or property with adhoc info
-
-
-
-
- Contract indication that the Response DTO has a ResponseStatus
-
-
-
-
- Creates a Debug Logger, that logs all messages to: System.Diagnostics.Debug
-
- Made public so its testable
-
-
-
-
- Factory to create ILog instances
-
-
-
-
- Gets the logger.
-
-
-
-
- Gets the logger.
-
-
-
-
- Default logger is to System.Diagnostics.Debug.WriteLine
-
- Made public so its testable
-
-
-
-
- Logs a message in a running application
-
-
-
-
- Logs a Debug message.
-
- The message.
-
-
-
- Logs a Debug message and exception.
-
- The message.
- The exception.
-
-
-
- Logs a Debug format message.
-
- The format.
- The args.
-
-
-
- Logs a Error message.
-
- The message.
-
-
-
- Logs a Error message and exception.
-
- The message.
- The exception.
-
-
-
- Logs a Error format message.
-
- The format.
- The args.
-
-
-
- Logs a Fatal message.
-
- The message.
-
-
-
- Logs a Fatal message and exception.
-
- The message.
- The exception.
-
-
-
- Logs a Error format message.
-
- The format.
- The args.
-
-
-
- Logs an Info message and exception.
-
- The message.
-
-
-
- Logs an Info message and exception.
-
- The message.
- The exception.
-
-
-
- Logs an Info format message.
-
- The format.
- The args.
-
-
-
- Logs a Warning message.
-
- The message.
-
-
-
- Logs a Warning message and exception.
-
- The message.
- The exception.
-
-
-
- Logs a Warning format message.
-
- The format.
- The args.
-
-
-
- Gets or sets a value indicating whether this instance is debug enabled.
-
-
- true if this instance is debug enabled; otherwise, false.
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Logs the specified message.
-
-
-
-
- Logs the format.
-
-
-
-
- Logs the specified message.
-
-
-
-
- Default logger is to System.Diagnostics.Debug.Print
-
- Made public so its testable
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Logs the specified message.
-
-
-
-
- Logs the format.
-
-
-
-
- Logs the specified message.
-
-
-
-
- Creates a Debug Logger, that logs all messages to: System.Diagnostics.Debug
-
- Made public so its testable
-
-
-
-
- StringBuilderLog writes to shared StringBuffer.
- Made public so its testable
-
-
-
-
- Logs the specified message.
-
-
-
-
- Logs the format.
-
-
-
-
- Logs the specified message.
-
- The message.
-
-
-
- Creates a test Logger, that stores all log messages in a member list
-
-
-
-
- Tests logger which stores all log messages in a member list which can be examined later
-
- Made public so its testable
-
-
-
-
- Initializes a new instance of the class.
-
- The type.
-
-
-
- Initializes a new instance of the class.
-
- The type.
-
-
-
- Logs the specified message.
-
- The message.
- The exception.
-
-
-
- Logs the format.
-
- The message.
- The args.
-
-
-
- Logs the specified message.
-
- The message.
-
-
-
- Logging API for this library. You can inject your own implementation otherwise
- will use the DebugLogFactory to write to System.Diagnostics.Debug
-
-
-
-
- Gets the logger.
-
-
-
-
- Gets the logger.
-
-
-
-
- Gets or sets the log factory.
- Use this to override the factory that is used to create loggers
-
-
-
-
- Publish the specified message into the durable queue @queueName
-
-
-
-
- Publish the specified message into the transient queue @queueName
-
-
-
-
- Synchronous blocking get.
-
-
-
-
- Non blocking get message
-
-
-
-
- Acknowledge the message has been successfully received or processed
-
-
-
-
- Negative acknowledgement the message was not processed correctly
-
-
-
-
- Create a typed message from a raw MQ Response artefact
-
-
-
-
- Create a temporary Queue for Request / Reply
-
-
-
-
-
- Simple definition of an MQ Host
-
-
-
-
- Register DTOs and hanlders the MQ Host will process
-
-
-
-
-
-
- Register DTOs and hanlders the MQ Host will process
-
-
-
-
-
-
-
- Get Total Current Stats for all Message Handlers
-
-
-
-
-
- Get the status of the service. Potential Statuses: Disposed, Stopped, Stopping, Starting, Started
-
-
-
-
-
- Get a Stats dump
-
-
-
-
-
- Start the MQ Host if not already started.
-
-
-
-
- Stop the MQ Host if not already stopped.
-
-
-
-
- Factory to create consumers and producers that work with this service
-
-
-
-
- Get a list of all message types registered on this MQ Host
-
-
-
-
- Basic implementation of IMessage[T]
-
-
-
-
-
- Util static generic class to create unique queue names for types
-
-
-
-
-
- Util class to create unique queue names for runtime types
-
-
-
-
- For messaging exceptions that should by-pass the messaging service's configured
- retry attempts and store the message straight into the DLQ
-
-
-
-
- Wrap the common redis list operations under a IList[string] interface.
-
-
-
-
- Redis transaction for typed client
-
-
-
-
-
- interface to queueable operation using typed redis client
-
-
-
-
-
- Interface to redis typed pipeline
-
-
-
-
- Pipeline interface shared by typed and non-typed pipelines
-
-
-
-
- Interface to operations that allow queued commands to be completed
-
-
-
-
- Returns a high-level typed client API
-
-
-
-
-
- Returns a Read/Write client (The default) using the hosts defined in ReadWriteHosts
-
-
-
-
-
- Returns a ReadOnly client using the hosts defined in ReadOnlyHosts.
-
-
-
-
-
- Returns a Read/Write ICacheClient (The default) using the hosts defined in ReadWriteHosts
-
-
-
-
-
- Returns a ReadOnly ICacheClient using the hosts defined in ReadOnlyHosts.
-
-
-
-
-
- Returns a Read/Write client (The default) using the hosts defined in ReadWriteHosts
-
-
-
-
-
- Returns a ReadOnly client using the hosts defined in ReadOnlyHosts.
-
-
-
-
-
- Returns a Read/Write ICacheClient (The default) using the hosts defined in ReadWriteHosts
-
-
-
-
-
- Returns a ReadOnly ICacheClient using the hosts defined in ReadOnlyHosts.
-
-
-
-
-
- Subscribe to channels by name
-
-
-
-
-
- Subscribe to channels matching the supplied patterns
-
-
-
-
-
- The number of active subscriptions this client has
-
-
-
-
- Registered handler called after client *Subscribes* to each new channel
-
-
-
-
- Registered handler called when each message is received
-
-
-
-
- Registered handler called when each channel is unsubscribed
-
-
-
-
- Interface to redis transaction
-
-
-
-
- Base transaction interface, shared by typed and non-typed transactions
-
-
-
-
- interface to operation that can queue commands
-
-
-
-
- Interface to redis pipeline
-
-
-
-
- Gets or sets parameter name with which allowable values will be associated.
-
-
-
-
- The overall description of an API. Used by Swagger.
-
-
-
-
- Gets or sets verb to which applies attribute. By default applies to all verbs.
-
-
-
-
- Gets or sets parameter type: It can be only one of the following: path, query, body, model, or header.
-
-
-
-
- Gets or sets unique name for the parameter. Each name must be unique, even if they are associated with different paramType values.
-
-
-
- Other notes on the name field:
- If paramType is body, the name is used only for UI and codegeneration.
- If paramType is path, the name field must correspond to the associated path segment from the path field in the api object.
- If paramType is query, the name field corresponds to the query param name.
-
-
-
-
-
- Gets or sets the human-readable description for the parameter.
-
-
-
-
- For path, query, and header paramTypes, this field must be a primitive. For body, this can be a complex or container datatype.
-
-
-
-
- For path, this is always true. Otherwise, this field tells the client whether or not the field must be supplied.
-
-
-
-
- For query params, this specifies that a comma-separated list of values can be passed to the API. For path and body types, this field cannot be true.
-
-
-
-
- Gets or sets route to which applies attribute, matches using StartsWith. By default applies to all routes.
-
-
-
-
- The status code of a response
-
-
-
-
- The description of a response status code
-
-
-
-
- Marker interfaces
-
-
-
-
- Implement on Request DTOs that need access to the raw Request Stream
-
-
-
-
- The raw Http Request Input Stream
-
-
-
-
- Resolve a dependency from the AppHost's IOC
-
-
-
-
-
-
- This interface can be implemented by an attribute
- which adds an request filter for the specific request DTO the attribute marked.
-
-
-
-
- The request filter is executed before the service.
-
- The http request wrapper
- The http response wrapper
- The request DTO
-
-
-
- A new shallow copy of this filter is used on every request.
-
-
-
-
-
- Order in which Request Filters are executed.
- <0 Executed before global request filters
- >0 Executed after global request filters
-
-
-
-
- This interface can be implemented by an attribute
- which adds an response filter for the specific response DTO the attribute marked.
-
-
-
-
- The response filter is executed after the service
-
- The http request wrapper
- The http response wrapper
-
-
-
- A new shallow copy of this filter is used on every request.
-
-
-
-
-
- Order in which Response Filters are executed.
- <0 Executed before global response filters
- >0 Executed after global response filters
-
-
-
-
- The HTTP Response Status
-
-
-
-
- The HTTP Response Status Code
-
-
-
-
- The HTTP Status Description
-
-
-
-
- The HTTP Response ContentType
-
-
-
-
- Additional HTTP Headers
-
-
-
-
- Response DTO
-
-
-
-
- if not provided, get's injected by ServiceStack
-
-
-
-
- Holds the request call context
-
-
-
-
- The padding length written with the body, to be added to ContentLength of body
-
-
-
-
- A thin wrapper around ASP.NET or HttpListener's HttpRequest
-
-
-
-
- A thin wrapper around each host's Request e.g: ASP.NET, HttpListener, MQ, etc
-
-
-
-
- The entire string contents of Request.InputStream
-
-
-
-
-
- The underlying ASP.NET or HttpListener HttpRequest
-
-
-
-
- The name of the service being called (e.g. Request DTO Name)
-
-
-
-
- The Verb / HttpMethod or Action for this request
-
-
-
-
- Optional preferences for the processing of this Request
-
-
-
-
- The Request DTO, after it has been deserialized.
-
-
-
-
- The request ContentType
-
-
-
-
- The expected Response ContentType for this request
-
-
-
-
- Whether the ResponseContentType has been explicitly overrided or whether it was just the default
-
-
-
-
- Attach any data to this request that all filters and services can access.
-
-
-
-
- Buffer the Request InputStream so it can be re-read
-
-
-
-
- The Remote Ip as reported by Request.UserHostAddress
-
-
-
-
- The Remote Ip as reported by X-Forwarded-For, X-Real-IP or Request.UserHostAddress
-
-
-
-
- e.g. is https or not
-
-
-
-
- Access to the multi-part/formdata files posted on this request
-
-
-
-
- The value of the Referrer, null if not available
-
-
-
-
- The HttpResponse
-
-
-
-
- The HTTP Verb
-
-
-
-
- The IP Address of the X-Forwarded-For header, null if null or empty
-
-
-
-
- The Port number of the X-Forwarded-Port header, null if null or empty
-
-
-
-
- The http or https scheme of the X-Forwarded-Proto header, null if null or empty
-
-
-
-
- The value of the X-Real-IP header, null if null or empty
-
-
-
-
- A thin wrapper around ASP.NET or HttpListener's HttpResponse
-
-
-
-
- A thin wrapper around each host's Response e.g: ASP.NET, HttpListener, MQ, etc
-
-
-
-
- Write once to the Response Stream then close it.
-
-
-
-
-
- Signal that this response has been handled and no more processing should be done.
- When used in a request or response filter, no more filters or processing is done on this request.
-
-
-
-
- Calls Response.End() on ASP.NET HttpResponse otherwise is an alias for Close().
- Useful when you want to prevent ASP.NET to provide it's own custom error page.
-
-
-
-
- Response.Flush() and OutputStream.Flush() seem to have different behaviour in ASP.NET
-
-
-
-
- The underlying ASP.NET or HttpListener HttpResponse
-
-
-
-
- The Response DTO
-
-
-
-
- Buffer the Response OutputStream so it can be written in 1 batch
-
-
-
-
- Gets a value indicating whether this instance is closed.
-
-
-
-
- Log every service request
-
-
-
-
- Log a request
-
- The RequestContext
- Request DTO
- Response DTO or Exception
- How long did the Request take
-
-
-
- View the most recent logs
-
-
-
-
-
-
- Turn On/Off Session Tracking
-
-
-
-
- Turn On/Off Raw Request Body Tracking
-
-
-
-
- Turn On/Off Tracking of Responses
-
-
-
-
- Turn On/Off Tracking of Exceptions
-
-
-
-
- Limit access to /requestlogs service to role
-
-
-
-
- Don't log requests of these types.
-
-
-
-
- Don't log request bodys for services with sensitive information.
- By default Auth and Registration requests are hidden.
-
-
-
-
- Implement on services that need access to the RequestContext
-
-
-
-
- Responsible for executing the operation within the specified context.
-
- The operation types.
-
-
-
- Returns the first matching RestPath
-
-
-
-
- Executes the MQ DTO request.
-
-
-
-
- Executes the MQ DTO request with the supplied requestContext
-
-
-
-
- Executes the DTO request under the supplied requestContext.
-
-
-
-
- Executes the DTO request with an empty RequestContext.
-
-
-
-
- Allow the registration of user-defined routes for services
-
-
-
-
- Maps the specified REST path to the specified request DTO.
-
- The type of request DTO to map
- the path to.
- The path to map the request DTO to.
- See RouteAttribute.Path
- for details on the correct format.
- The same instance;
- never .
-
-
-
- Maps the specified REST path to the specified request DTO, and
- specifies the HTTP verbs supported by the path.
-
- The type of request DTO to map
- the path to.
- The path to map the request DTO to.
- See RouteAttribute.Path
- for details on the correct format.
-
- The comma-delimited list of HTTP verbs supported by the path,
- such as "GET,PUT,DELETE". Specify empty or
- to indicate that all verbs are supported.
-
- The same instance;
- never .
-
-
-
- Maps the specified REST path to the specified request DTO,
- specifies the HTTP verbs supported by the path, and indicates
- the default MIME type of the returned response.
-
-
- The type of request DTO to map the path to.
-
- The path to map the request DTO to.
- See RouteAttribute.Path
- for details on the correct format.
-
- The comma-delimited list of HTTP verbs supported by the path,
- such as "GET,PUT,DELETE".
-
- The same instance;
- never .
-
-
-
- Maps the specified REST path to the specified request DTO,
- specifies the HTTP verbs supported by the path, and indicates
- the default MIME type of the returned response.
-
-
- Used to rank the precedences of route definitions in reverse routing.
- i.e. Priorities below 0 are auto-generated have less precedence.
-
-
-
-
- Maps the specified REST path to the specified request DTO,
- specifies the HTTP verbs supported by the path, and indicates
- the default MIME type of the returned response.
-
-
- The type of request DTO to map the path to.
-
- The path to map the request DTO to.
- See RouteAttribute.Path
- for details on the correct format.
-
- The comma-delimited list of HTTP verbs supported by the path,
- such as "GET,PUT,DELETE".
-
-
- The short summary of what the REST does.
-
-
- The longer text to explain the behaviour of the REST.
-
- The same instance;
- never .
-
-
-
- Used to decorate Request DTO's to associate a RESTful request
- path mapping with a service. Multiple attributes can be applied to
- each request DTO, to map multiple paths to the service.
-
-
-
-
- Initializes an instance of the class.
-
-
- The path template to map to the request. See
- RouteAttribute.Path
- for details on the correct format.
-
-
-
-
- Initializes an instance of the class.
-
-
- The path template to map to the request. See
- RouteAttribute.Path
- for details on the correct format.
-
- A comma-delimited list of HTTP verbs supported by the
- service. If unspecified, all verbs are assumed to be supported.
-
-
-
- Gets or sets the path template to be mapped to the request.
-
-
- A value providing the path mapped to
- the request. Never .
-
-
- Some examples of valid paths are:
-
-
- - "/Inventory"
- - "/Inventory/{Category}/{ItemId}"
- - "/Inventory/{ItemPath*}"
-
-
- Variables are specified within "{}"
- brackets. Each variable in the path is mapped to the same-named property
- on the request DTO. At runtime, ServiceStack will parse the
- request URL, extract the variable values, instantiate the request DTO,
- and assign the variable values into the corresponding request properties,
- prior to passing the request DTO to the service object for processing.
-
- It is not necessary to specify all request properties as
- variables in the path. For unspecified properties, callers may provide
- values in the query string. For example: the URL
- "http://services/Inventory?Category=Books&ItemId=12345" causes the same
- request DTO to be processed as "http://services/Inventory/Books/12345",
- provided that the paths "/Inventory" (which supports the first URL) and
- "/Inventory/{Category}/{ItemId}" (which supports the second URL)
- are both mapped to the request DTO.
-
- Please note that while it is possible to specify property values
- in the query string, it is generally considered to be less RESTful and
- less desirable than to specify them as variables in the path. Using the
- query string to specify property values may also interfere with HTTP
- caching.
-
- The final variable in the path may contain a "*" suffix
- to grab all remaining segments in the path portion of the request URL and assign
- them to a single property on the request DTO.
- For example, if the path "/Inventory/{ItemPath*}" is mapped to the request DTO,
- then the request URL "http://services/Inventory/Books/12345" will result
- in a request DTO whose ItemPath property contains "Books/12345".
- You may only specify one such variable in the path, and it must be positioned at
- the end of the path.
-
-
-
-
- Gets or sets short summary of what the route does.
-
-
-
-
- Gets or sets longer text to explain the behaviour of the route.
-
-
-
-
- Gets or sets a comma-delimited list of HTTP verbs supported by the service, such as
- "GET,PUT,POST,DELETE".
-
-
- A providing a comma-delimited list of HTTP verbs supported
- by the service, or empty if all verbs are supported.
-
-
-
-
- Used to rank the precedences of route definitions in reverse routing.
- i.e. Priorities below 0 are auto-generated have less precedence.
-
-
-
-
- Fallback routes have the lowest precedence, i.e. after normal Routes, static files or any matching Catch All Handlers.
-
-
-
-
- Generic ResponseStatus for when Response Type can't be inferred.
- In schemaless formats like JSON, JSV it has the same shape as a typed Response DTO
-
-
-
-
- A log entry added by the IRequestLogger
-
-
-
-
- Decorate on Request DTO's to alter the accessibility of a service and its visibility on /metadata pages
-
-
-
-
- Restrict access and metadata visibility to any of the specified access scenarios
-
- The restrict access to scenarios.
-
-
-
- Restrict access and metadata visibility to any of the specified access scenarios
-
- The restrict access to scenarios.
-
-
-
- Returns the allowed set of scenarios based on the user-specified restrictions
-
-
-
-
-
-
- Allow access but hide from metadata to requests from Localhost only
-
-
-
-
- Allow access but hide from metadata to requests from Localhost and Local Intranet only
-
-
-
-
- Restrict access and hide from metadata to requests from Localhost only
-
-
-
-
- Restrict access and hide from metadata to requests from Localhost and Local Intranet only
-
-
-
-
- Restrict access and hide from metadata to requests from External only
-
-
-
-
- Sets a single access restriction
-
- Restrict Access to.
-
-
-
- Restrict access to any of the specified access scenarios
-
- Access restrictions
-
-
-
- Sets a single metadata Visibility restriction
-
- Restrict metadata Visibility to.
-
-
-
- Restrict metadata visibility to any of the specified access scenarios
-
- Visibility restrictions
-
-
-
- Converts from a User intended restriction to a flag with all the allowed attribute flags set, e.g:
-
- If No Network restrictions were specified all Network access types are allowed, e.g:
- restrict EndpointAttributes.None => ... 111
-
- If a Network restriction was specified, only it will be allowed, e.g:
- restrict EndpointAttributes.LocalSubnet => ... 010
-
- The returned Enum will have a flag with all the allowed attributes set
-
-
-
-
-
-
- Error information pertaining to a particular named field.
- Used for returning multiple field validation errors.s
-
-
-
-
- Common ResponseStatus class that should be present on all response DTO's
-
-
-
-
- Initializes a new instance of the class.
-
- A response status without an errorcode == success
-
-
-
-
- Initializes a new instance of the class.
-
- A response status with an errorcode == failure
-
-
-
-
- Initializes a new instance of the class.
-
- A response status with an errorcode == failure
-
-
-
-
- Holds the custom ErrorCode enum if provided in ValidationException
- otherwise will hold the name of the Exception type, e.g. typeof(Exception).Name
-
- A value of non-null means the service encountered an error while processing the request.
-
-
-
-
- A human friendly error message
-
-
-
-
-
-
-
-
-
- For multiple detailed validation errors.
- Can hold a specific error message for each named field.
-
-
-
-
- Write a partial content result
-
-
-
-
- Whether this HttpResult allows Partial Response
-
-
-
-
- Sends the specified request.
-
- The request.
-
-
-
-
diff --git a/lib/tests/ServiceStack.Messaging.Tests.dll b/lib/tests/ServiceStack.Messaging.Tests.dll
deleted file mode 100644
index ec56a075..00000000
Binary files a/lib/tests/ServiceStack.Messaging.Tests.dll and /dev/null differ
diff --git a/lib/tests/ServiceStack.Messaging.Tests.pdb b/lib/tests/ServiceStack.Messaging.Tests.pdb
deleted file mode 100644
index a64c0f9a..00000000
Binary files a/lib/tests/ServiceStack.Messaging.Tests.pdb and /dev/null differ
diff --git a/lib/tests/ServiceStack.OrmLite.dll b/lib/tests/ServiceStack.OrmLite.dll
deleted file mode 100644
index 6eeb1d83..00000000
Binary files a/lib/tests/ServiceStack.OrmLite.dll and /dev/null differ
diff --git a/lib/tests/ServiceStack.OrmLite.xml b/lib/tests/ServiceStack.OrmLite.xml
deleted file mode 100644
index 5c5c1254..00000000
--- a/lib/tests/ServiceStack.OrmLite.xml
+++ /dev/null
@@ -1,2240 +0,0 @@
-
-
-
- ServiceStack.OrmLite
-
-
-
-
- Tell ServiceStack to use ThreadStatic Items Collection for Context Scoped items.
- Warning: ThreadStatic Items aren't pinned to the same request in async services which callback on different threads.
-
-
-
-
- Gets a list of items for this context.
-
-
-
-
- Clear select expression. All properties will be selected.
-
-
-
-
- set the specified selectExpression.
-
-
- raw Select expression: "Select SomeField1, SomeField2 from SomeTable"
-
-
-
-
- Fields to be selected.
-
-
- x=> x.SomeProperty1 or x=> new{ x.SomeProperty1, x.SomeProperty2}
-
-
- objectWithProperties
-
-
-
-
- Offset of the first row to return. The offset of the initial row is 0
-
-
-
-
- Number of rows returned by a SELECT statement
-
-
-
-
- Set the specified offset and rows for SQL Limit clause.
-
-
- Offset of the first row to return. The offset of the initial row is 0
-
-
- Number of rows returned by a SELECT statement
-
-
-
-
- Set the specified offset and rows for SQL Limit clause where they exist.
-
-
- Offset of the first row to return. The offset of the initial row is 0
-
-
- Number of rows returned by a SELECT statement
-
-
-
-
- Set the specified rows for Sql Limit clause.
-
-
- Number of rows returned by a SELECT statement
-
-
-
-
- Clear Sql Limit clause
-
-
-
-
- Clear Offset and Limit clauses. Alias for Limit()
-
-
-
-
-
-
- Fields to be updated.
-
-
- x=> x.SomeProperty1 or x=> new{ x.SomeProperty1, x.SomeProperty2}
-
-
- objectWithProperties
-
-
-
-
- Clear UpdateFields list ( all fields will be updated)
-
-
-
-
- Fields to be inserted.
-
-
- x=> x.SomeProperty1 or x=> new{ x.SomeProperty1, x.SomeProperty2}
-
-
- objectWithProperties
-
-
-
-
- fields to be inserted.
-
-
- IList<string> containing Names of properties to be inserted
-
-
-
-
- Clear InsertFields list ( all fields will be inserted)
-
-
-
-
- Enables the efficient, dynamic composition of query predicates.
-
-
-
-
- Creates a predicate that evaluates to true.
-
-
-
-
- Creates a predicate that evaluates to false.
-
-
-
-
- Creates a predicate expression from the specified lambda expression.
-
-
-
-
- Combines the first predicate with the second using the logical "and".
-
-
-
-
- Combines the first predicate with the second using the logical "or".
-
-
-
-
- Negates the predicate.
-
-
-
-
- Combines the first expression with the second using the specified merge function.
-
-
-
-
- Create a new SqlExpression builder allowing typed LINQ-like queries.
-
-
-
-
- Creates a new SqlExpression builder allowing typed LINQ-like queries.
- Alias for SqlExpression.
-
-
-
-
- Creates a new SqlExpression builder for the specified type using a user-defined FROM sql expression.
-
-
-
-
- Open a Transaction in OrmLite
-
-
-
-
- Open a Transaction in OrmLite
-
-
-
-
- Returns results from using a LINQ Expression. E.g:
- db.Select<Person>(x => x.Age > 40)
-
-
-
-
- Returns results from using an SqlExpression lambda. E.g:
- db.Select<Person>(q => q.Where(x => x.Age > 40))
-
-
-
-
- Returns results from using an SqlExpression lambda. E.g:
- db.Select(db.From<Person>().Where(x => x.Age > 40))
-
-
-
-
- Project results from a number of joined tables into a different model
-
-
-
-
- Project results from a number of joined tables into a different model
-
-
-
-
- Returns results from using an SqlExpression lambda. E.g:
- db.Select(db.From<Person>().Where(x => x.Age > 40))
-
-
-
-
- Returns a single result from using a LINQ Expression. E.g:
- db.Single<Person>(x => x.Age == 42)
-
-
-
-
- Returns a single result from using an SqlExpression lambda. E.g:
- db.Single<Person>(q => q.Where(x => x.Age == 42))
-
-
-
-
- Returns results from using an SqlExpression lambda. E.g:
- db.Select<Person>(x => x.Age > 40)
-
-
-
-
- Returns a scalar result from using an SqlExpression lambda. E.g:
- db.Scalar<Person, int>(x => Sql.Max(x.Age))
-
-
-
-
- Returns a scalar result from using an SqlExpression lambda. E.g:
- db.Scalar<Person, int>(x => Sql.Max(x.Age), , x => x.Age < 50)
-
-
-
-
- Returns the count of rows that match the LINQ expression, E.g:
- db.Count<Person>(x => x.Age < 50)
-
-
-
-
- Returns the count of rows that match the SqlExpression lambda, E.g:
- db.Count<Person>(q => q.Where(x => x.Age < 50))
-
-
-
-
- Returns the count of rows that match the supplied SqlExpression, E.g:
- db.Count(db.From<Person>().Where(x => x.Age < 50))
-
-
-
-
- Return the number of rows returned by the supplied expression
-
-
-
-
- Return the number of rows returned by the supplied sql
-
-
-
-
- Returns results with references from using a LINQ Expression. E.g:
- db.LoadSelect<Person>(x => x.Age > 40)
-
-
-
-
- Returns results with references from using an SqlExpression lambda. E.g:
- db.LoadSelect<Person>(q => q.Where(x => x.Age > 40))
-
-
-
-
- Returns results with references from using an SqlExpression lambda. E.g:
- db.LoadSelect(db.From<Person>().Where(x => x.Age > 40))
-
-
-
-
- Project results with references from a number of joined tables into a different model
-
-
-
-
- Use an SqlExpression to select which fields to update and construct the where expression, E.g:
-
- db.UpdateOnly(new Person { FirstName = "JJ" }, ev => ev.Update(p => p.FirstName).Where(x => x.FirstName == "Jimi"));
- UPDATE "Person" SET "FirstName" = 'JJ' WHERE ("FirstName" = 'Jimi')
-
- What's not in the update expression doesn't get updated. No where expression updates all rows. E.g:
-
- db.UpdateOnly(new Person { FirstName = "JJ", LastName = "Hendo" }, ev => ev.Update(p => p.FirstName));
- UPDATE "Person" SET "FirstName" = 'JJ'
-
-
-
-
- Use an SqlExpression to select which fields to update and construct the where expression, E.g:
-
- var q = db.From>Person<());
- db.UpdateOnly(new Person { FirstName = "JJ" }, q.Update(p => p.FirstName).Where(x => x.FirstName == "Jimi"));
- UPDATE "Person" SET "FirstName" = 'JJ' WHERE ("FirstName" = 'Jimi')
-
- What's not in the update expression doesn't get updated. No where expression updates all rows. E.g:
-
- db.UpdateOnly(new Person { FirstName = "JJ", LastName = "Hendo" }, ev.Update(p => p.FirstName));
- UPDATE "Person" SET "FirstName" = 'JJ'
-
-
-
-
- Update record, updating only fields specified in updateOnly that matches the where condition (if any), E.g:
-
- db.UpdateOnly(new Person { FirstName = "JJ" }, p => p.FirstName, p => p.LastName == "Hendrix");
- UPDATE "Person" SET "FirstName" = 'JJ' WHERE ("LastName" = 'Hendrix')
-
- db.UpdateOnly(new Person { FirstName = "JJ" }, p => p.FirstName);
- UPDATE "Person" SET "FirstName" = 'JJ'
-
-
-
-
- Updates all non-default values set on item matching the where condition (if any). E.g
-
- db.UpdateNonDefaults(new Person { FirstName = "JJ" }, p => p.FirstName == "Jimi");
- UPDATE "Person" SET "FirstName" = 'JJ' WHERE ("FirstName" = 'Jimi')
-
-
-
-
- Updates all values set on item matching the where condition (if any). E.g
-
- db.Update(new Person { Id = 1, FirstName = "JJ" }, p => p.LastName == "Hendrix");
- UPDATE "Person" SET "Id" = 1,"FirstName" = 'JJ',"LastName" = NULL,"Age" = 0 WHERE ("LastName" = 'Hendrix')
-
-
-
-
- Updates all matching fields populated on anonymousType that matches where condition (if any). E.g:
-
- db.Update<Person>(new { FirstName = "JJ" }, p => p.LastName == "Hendrix");
- UPDATE "Person" SET "FirstName" = 'JJ' WHERE ("LastName" = 'Hendrix')
-
-
-
-
- Flexible Update method to succinctly execute a free-text update statement using optional params. E.g:
-
- db.Update<Person>(set:"FirstName = {0}".Params("JJ"), where:"LastName = {0}".Params("Hendrix"));
- UPDATE "Person" SET FirstName = 'JJ' WHERE LastName = 'Hendrix'
-
-
-
-
- Flexible Update method to succinctly execute a free-text update statement using optional params. E.g.
-
- db.Update(table:"Person", set: "FirstName = {0}".Params("JJ"), where: "LastName = {0}".Params("Hendrix"));
- UPDATE "Person" SET FirstName = 'JJ' WHERE LastName = 'Hendrix'
-
-
-
-
- Insert only fields in POCO specified by the SqlExpression lambda. E.g:
- db.InsertOnly(new Person { FirstName = "Amy", Age = 27 }, q => q.Insert(p => new { p.FirstName, p.Age }))
-
-
-
-
- Using an SqlExpression to only Insert the fields specified, e.g:
-
- db.InsertOnly(new Person { FirstName = "Amy" }, q => q.Insert(p => new { p.FirstName }));
- INSERT INTO "Person" ("FirstName") VALUES ('Amy');
-
-
-
-
- Delete the rows that matches the where expression, e.g:
-
- db.Delete<Person>(p => p.Age == 27);
- DELETE FROM "Person" WHERE ("Age" = 27)
-
-
-
-
- Delete the rows that matches the where expression, e.g:
-
- db.Delete<Person>(ev => ev.Where(p => p.Age == 27));
- DELETE FROM "Person" WHERE ("Age" = 27)
-
-
-
-
- Delete the rows that matches the where expression, e.g:
-
- var q = db.From>Person<());
- db.Delete<Person>(q.Where(p => p.Age == 27));
- DELETE FROM "Person" WHERE ("Age" = 27)
-
-
-
-
- Flexible Delete method to succinctly execute a delete statement using free-text where expression. E.g.
-
- db.Delete<Person>(where:"Age = {0}".Params(27));
- DELETE FROM "Person" WHERE Age = 27
-
-
-
-
- Flexible Delete method to succinctly execute a delete statement using free-text where expression. E.g.
-
- db.Delete(table:"Person", where: "Age = {0}".Params(27));
- DELETE FROM "Person" WHERE Age = 27
-
-
-
-
- Offset of the first row to return. The offset of the initial row is 0
-
-
-
-
- Number of rows returned by a SELECT statement
-
-
-
-
- Set the specified offset and rows for SQL Limit clause.
-
-
- Offset of the first row to return. The offset of the initial row is 0
-
-
- Number of rows returned by a SELECT statement
-
-
-
-
- Set the specified offset and rows for SQL Limit clause where they exist.
-
-
- Offset of the first row to return. The offset of the initial row is 0
-
-
- Number of rows returned by a SELECT statement
-
-
-
-
- Set the specified rows for Sql Limit clause.
-
-
- Number of rows returned by a SELECT statement
-
-
-
-
- Clear Sql Limit clause
-
-
-
-
- Returns results from the active connection.
-
-
-
-
- Returns results from using sql. E.g:
- db.Select<Person>("Age > 40")
- db.Select<Person>("SELECT * FROM Person WHERE Age > 40")
-
-
-
-
- Returns results from using a parameterized query. E.g:
- db.Select<Person>("Age > @age", new { age = 40})
- db.Select<Person>("SELECT * FROM Person WHERE Age > @age", new { age = 40})
-
-
-
-
- Returns results from using a parameterized query. E.g:
- db.Select<Person>("Age > @age", new Dictionary<string, object> { { "age", 40 } })
- db.Select<Person>("SELECT * FROM Person WHERE Age > @age", new Dictionary<string, object> { { "age", 40 } })
-
-
-
-
- Returns results from using an SqlFormat query. E.g:
- db.SelectFmt<Person>("Age > {0}", 40)
- db.SelectFmt<Person>("SELECT * FROM Person WHERE Age > {0}", 40)
-
-
-
-
- Returns a partial subset of results from the specified tableType. E.g:
- db.Select<EntityWithId>(typeof(Person))
-
-
-
-
-
- Returns a partial subset of results from the specified tableType using a SqlFormat query. E.g:
- db.SelectFmt<EntityWithId>(typeof(Person), "Age > {0}", 40)
-
-
-
-
- Returns results from using a single name, value filter. E.g:
- db.Where<Person>("Age", 27)
-
-
-
-
- Returns results from using an anonymous type filter. E.g:
- db.Where<Person>(new { Age = 27 })
-
-
-
-
- Returns results using the supplied primary key ids. E.g:
- db.SelectByIds<Person>(new[] { 1, 2, 3 })
-
-
-
-
- Query results using the non-default values in the supplied partially populated POCO example. E.g:
- db.SelectNonDefaults(new Person { Id = 1 })
-
-
-
-
- Query results using the non-default values in the supplied partially populated POCO example. E.g:
- db.SelectNonDefaults("Age > @Age", new Person { Age = 42 })
-
-
-
-
- Returns a lazyily loaded stream of results. E.g:
- db.SelectLazy<Person>()
-
-
-
-
- Returns a lazyily loaded stream of results using a parameterized query. E.g:
- db.SelectLazy<Person>("Age > @age", new { age = 40 })
-
-
-
-
- Returns a lazyily loaded stream of results using an SqlFilter query. E.g:
- db.SelectLazyFmt<Person>("Age > {0}", 40)
-
-
-
-
- Returns a stream of results that are lazily loaded using a parameterized query. E.g:
- db.WhereLazy<Person>(new { Age = 27 })
-
-
-
-
- Returns the first result using a parameterized query. E.g:
- db.Single<Person>(new { Age = 42 })
-
-
-
-
- Returns results from using a single name, value filter. E.g:
- db.Single<Person>("Age = @age", new { age = 42 })
-
-
-
-
- Returns the first result using a SqlFormat query. E.g:
- db.SingleFmt<Person>("Age = {0}", 42)
-
-
-
-
- Returns the first result using a primary key id. E.g:
- db.SingleById<Person>(1)
-
-
-
-
- Returns the first result using a name, value filter. E.g:
- db.SingleWhere<Person>("Age", 42)
-
-
-
-
- Returns a single scalar value using an SqlExpression. E.g:
- db.Column<int>(db.From<Persion>().Select(x => Sql.Count("*")).Where(q => q.Age > 40))
-
-
-
-
- Returns a single scalar value using a parameterized query. E.g:
- db.Scalar<int>("SELECT COUNT(*) FROM Person WHERE Age > @age", new { age = 40 })
-
-
-
-
- Returns a single scalar value using an SqlFormat query. E.g:
- db.ScalarFmt<int>("SELECT COUNT(*) FROM Person WHERE Age > {0}", 40)
-
-
-
-
- Returns the distinct first column values in a HashSet using an SqlExpression. E.g:
- db.Column<int>(db.From<Persion>().Select(x => x.LastName).Where(q => q.Age == 27))
-
-
-
-
- Returns the first column in a List using a SqlFormat query. E.g:
- db.ColumnLazy<string>("SELECT LastName FROM Person WHERE Age = @age", new { age = 27 })
-
-
-
-
- Returns the distinct first column values in a HashSet using an SqlExpression. E.g:
- db.ColumnLazy<int>(db.From<Persion>().Select(x => x.LastName).Where(q => q.Age == 27))
-
-
-
-
- Returns the first column in a List using a SqlFormat query. E.g:
- db.Column<string>("SELECT LastName FROM Person WHERE Age = @age", new { age = 27 })
-
-
-
-
- Returns the first column in a List using a SqlFormat query. E.g:
- db.ColumnFmt<string>("SELECT LastName FROM Person WHERE Age = {0}", 27)
-
-
-
-
-
- Returns the distinct first column values in a HashSet using an SqlFormat query. E.g:
- db.ColumnDistinct<int>("SELECT Age FROM Person WHERE Age < @age", new { age = 50 })
-
-
-
-
- Returns the distinct first column values in a HashSet using an SqlFormat query. E.g:
- db.ColumnDistinctFmt<int>("SELECT Age FROM Person WHERE Age < {0}", 50)
-
-
-
-
-
- Returns an Dictionary<K, List<V>> grouping made from the first two columns using an parameterized query. E.g:
- db.Lookup<int, string>("SELECT Age, LastName FROM Person WHERE Age < @age", new { age = 50 })
-
-
-
-
- Returns an Dictionary<K, List<V>> grouping made from the first two columns using an SqlFormat query. E.g:
- db.LookupFmt<int, string>("SELECT Age, LastName FROM Person WHERE Age < {0}", 50)
-
-
-
-
-
- Returns a Dictionary from the first 2 columns: Column 1 (Keys), Column 2 (Values) using sql. E.g:
- db.Dictionary<int, string>("SELECT Id, LastName FROM Person WHERE Age < @age", new { age = 50 })
-
-
-
-
- Returns a Dictionary from the first 2 columns: Column 1 (Keys), Column 2 (Values) using an SqlFormat query. E.g:
- db.DictionaryFmt<int, string>("SELECT Id, LastName FROM Person WHERE Age < {0}", 50)
-
-
-
-
- Returns true if the Query returns any records that match the LINQ expression, E.g:
- db.Exists<Person>(x => x.Age < 50)
-
-
-
-
- Returns true if the Query returns any records that match the SqlExpression lambda, E.g:
- db.Exists<Person>(q => q.Where(x => x.Age < 50))
-
-
-
-
- Returns true if the Query returns any records that match the supplied SqlExpression, E.g:
- db.Exists(db.From<Person>().Where(x => x.Age < 50))
-
-
-
-
- Returns true if the Query returns any records, using an SqlFormat query. E.g:
- db.Exists<Person>(new { Age = 42 })
-
-
-
-
- Returns true if the Query returns any records, using a parameterized query. E.g:
- db.Exists<Person>("Age = @age", new { age = 42 })
- db.Exists<Person>("SELECT * FROM Person WHERE Age = @age", new { age = 42 })
-
-
-
-
- Returns true if the Query returns any records, using an SqlFormat query. E.g:
- db.ExistsFmt<Person>("Age = {0}", 42)
- db.ExistsFmt<Person>("SELECT * FROM Person WHERE Age = {0}", 50)
-
-
-
-
- Returns results from an arbitrary SqlExpression. E.g:
- db.SqlList<Person>(db.From<Person>().Select("*").Where(q => q.Age < 50))
-
-
-
-
- Returns results from an arbitrary parameterized raw sql query. E.g:
- db.SqlList<Person>("EXEC GetRockstarsAged @age", new { age = 50 })
-
-
-
-
- Returns results from an arbitrary parameterized raw sql query. E.g:
- db.SqlList<Person>("EXEC GetRockstarsAged @age", new Dictionary<string, object> { { "age", 42 } })
-
-
-
-
- Returns results from an arbitrary parameterized raw sql query with a dbCmd filter. E.g:
- db.SqlList<Person>("EXEC GetRockstarsAged @age", dbCmd => ...)
-
-
-
-
- Prepare Stored Procedure with Input parameters, optionally populated with Input Params. E.g:
- var cmd = db.SqlProc("GetRockstarsAged", new { age = 42 })
-
-
-
-
-
- Returns the first column in a List using a parameterized query. E.g:
- db.SqlColumn<string>("SELECT LastName FROM Person WHERE Age < @age", new { age = 50 })
-
-
-
-
- Returns the first column in a List using a parameterized query. E.g:
- db.SqlColumn<string>("SELECT LastName FROM Person WHERE Age < @age", new Dictionary<string, object> { { "age", 50 } })
-
-
-
-
- Returns a single Scalar value using an SqlExpression. E.g:
- db.SqlScalar<int>(db.From<Person>().Select(Sql.Count("*")).Where(q => q.Age < 50))
-
-
-
-
- Returns a single Scalar value using a parameterized query. E.g:
- db.SqlScalar<int>("SELECT COUNT(*) FROM Person WHERE Age < @age", new { age = 50 })
-
-
-
-
- Returns a single Scalar value using a parameterized query. E.g:
- db.SqlScalar<int>("SELECT COUNT(*) FROM Person WHERE Age < @age", new Dictionary<string, object> { { "age", 50 } })
-
-
-
-
- Returns the last insert Id made from this connection.
-
-
-
-
- Executes a raw sql non-query using sql. E.g:
- var rowsAffected = db.ExecuteNonQuery("UPDATE Person SET LastName={0} WHERE Id={1}".SqlFormat("WaterHouse", 7))
-
- number of rows affected
-
-
-
- Executes a raw sql non-query using a parameterized query. E.g:
- var rowsAffected = db.ExecuteNonQuery("UPDATE Person SET LastName=@name WHERE Id=@id", new { name = "WaterHouse", id = 7 })
-
- number of rows affected
-
-
-
- Executes a raw sql non-query using a parameterized query.
-
- number of rows affected
-
-
-
- Returns results from a Stored Procedure, using a parameterized query.
-
-
-
-
- Returns results from a Stored Procedure using an SqlFormat query. E.g:
-
-
-
-
-
- Returns the scalar result as a long.
-
-
-
-
- Returns the first result with all its references loaded, using a primary key id. E.g:
- db.LoadSingleById<Person>(1)
-
-
-
-
- Loads all the related references onto the instance. E.g:
- db.LoadReferences(customer)
-
-
-
-
- Checks whether a Table Exists. E.g:
- db.TableExists("Person")
-
-
-
-
- Checks whether a Table Exists. E.g:
- db.TableExists<Person>()
-
-
-
-
- Create DB Tables from the schemas of runtime types. E.g:
- db.CreateTables(typeof(Table1), typeof(Table2))
-
-
-
-
- Create DB Table from the schema of the runtime type. Use overwrite to drop existing Table. E.g:
- db.CreateTable(true, typeof(Table))
-
-
-
-
- Only Create new DB Tables from the schemas of runtime types if they don't already exist. E.g:
- db.CreateTableIfNotExists(typeof(Table1), typeof(Table2))
-
-
-
-
- Drop existing DB Tables and re-create them from the schemas of runtime types. E.g:
- db.DropAndCreateTables(typeof(Table1), typeof(Table2))
-
-
-
-
- Create a DB Table from the generic type. Use overwrite to drop the existing table or not. E.g:
- db.CreateTable<Person>(overwrite=false) //default
- db.CreateTable<Person>(overwrite=true)
-
-
-
-
- Only create a DB Table from the generic type if it doesn't already exist. E.g:
- db.CreateTableIfNotExists<Person>()
-
-
-
-
- Only create a DB Table from the runtime type if it doesn't already exist. E.g:
- db.CreateTableIfNotExists(typeof(Person))
-
-
-
-
- Drop existing table if exists and re-create a DB Table from the generic type. E.g:
- db.DropAndCreateTable<Person>()
-
-
-
-
- Drop existing table if exists and re-create a DB Table from the runtime type. E.g:
- db.DropAndCreateTable(typeof(Person))
-
-
-
-
- Drop any existing tables from their runtime types. E.g:
- db.DropTables(typeof(Table1),typeof(Table2))
-
-
-
-
- Drop any existing tables from the runtime type. E.g:
- db.DropTable(typeof(Person))
-
-
-
-
- Drop any existing tables from the generic type. E.g:
- db.DropTable<Person>()
-
-
-
-
- Get the last SQL statement that was executed.
-
-
-
-
- Execute any arbitrary raw SQL.
-
- number of rows affected
-
-
-
- Insert 1 POCO, use selectIdentity to retrieve the last insert AutoIncrement id (if any). E.g:
- var id = db.Insert(new Person { Id = 1, FirstName = "Jimi }, selectIdentity:true)
-
-
-
-
- Insert 1 or more POCOs in a transaction. E.g:
- db.Insert(new Person { Id = 1, FirstName = "Tupac", LastName = "Shakur", Age = 25 },
- new Person { Id = 2, FirstName = "Biggie", LastName = "Smalls", Age = 24 })
-
-
-
-
- Insert a collection of POCOs in a transaction. E.g:
- db.InsertAll(new[] { new Person { Id = 9, FirstName = "Biggie", LastName = "Smalls", Age = 24 } })
-
-
-
-
- Updates 1 POCO. All fields are updated except for the PrimaryKey which is used as the identity selector. E.g:
- db.Update(new Person { Id = 1, FirstName = "Jimi", LastName = "Hendrix", Age = 27 })
-
-
-
-
- Updates 1 or more POCOs in a transaction. E.g:
- db.Update(new Person { Id = 1, FirstName = "Tupac", LastName = "Shakur", Age = 25 },
- new Person { Id = 2, FirstName = "Biggie", LastName = "Smalls", Age = 24 })
-
-
-
-
- Updates 1 or more POCOs in a transaction. E.g:
- db.UpdateAll(new[] { new Person { Id = 1, FirstName = "Jimi", LastName = "Hendrix", Age = 27 } })
-
-
-
-
- Delete rows using an anonymous type filter. E.g:
- db.Delete<Person>(new { FirstName = "Jimi", Age = 27 })
-
- number of rows deleted
-
-
-
- Delete 1 or more rows in a transaction using an anonymous type filter. E.g:
- db.Delete<Person>(new { FirstName = "Jimi", Age = 27 }, new { FirstName = "Janis", Age = 27 })
-
-
-
-
- Delete 1 row using all fields in the filter. E.g:
- db.Delete(new Person { Id = 1, FirstName = "Jimi", LastName = "Hendrix", Age = 27 })
-
- number of rows deleted
-
-
-
- Delete 1 or more rows in a transaction using all fields in the filter. E.g:
- db.Delete(new Person { Id = 1, FirstName = "Jimi", LastName = "Hendrix", Age = 27 })
-
-
-
-
- Delete 1 or more rows using only field with non-default values in the filter. E.g:
- db.DeleteNonDefaults(new Person { FirstName = "Jimi", Age = 27 })
-
- number of rows deleted
-
-
-
- Delete 1 or more rows in a transaction using only field with non-default values in the filter. E.g:
- db.DeleteNonDefaults(new Person { FirstName = "Jimi", Age = 27 },
- new Person { FirstName = "Janis", Age = 27 })
-
- number of rows deleted
-
-
-
- Delete 1 row by the PrimaryKey. E.g:
- db.DeleteById<Person>(1)
-
- number of rows deleted
-
-
-
- Delete 1 row by the PrimaryKey where the rowVersion matches the optimistic concurrency field.
- Will throw RowModefiedExeption if the
- row does not exist or has a different row version.
- E.g: db.DeleteById<Person>(1)
-
-
-
-
- Delete all rows identified by the PrimaryKeys. E.g:
- db.DeleteById<Person>(new[] { 1, 2, 3 })
-
- number of rows deleted
-
-
-
- Delete all rows in the generic table type. E.g:
- db.DeleteAll<Person>()
-
- number of rows deleted
-
-
-
- Delete all rows in the runtime table type. E.g:
- db.DeleteAll(typeof(Person))
-
- number of rows deleted
-
-
-
- Delete rows using a SqlFormat filter. E.g:
-
- number of rows deleted
-
-
-
- Delete rows from the runtime table type using a SqlFormat filter. E.g:
-
- db.DeleteFmt(typeof(Person), "Age = {0}", 27)
- number of rows deleted
-
-
-
- Insert a new row or update existing row. Returns true if a new row was inserted.
- Optional references param decides whether to save all related references as well. E.g:
- db.Save(customer, references:true)
-
- true if a row was inserted; false if it was updated
-
-
-
- Insert new rows or update existing rows. Return number of rows added E.g:
- db.Save(new Person { Id = 10, FirstName = "Amy", LastName = "Winehouse", Age = 27 })
-
- number of rows added
-
-
-
- Insert new rows or update existing rows. Return number of rows added E.g:
- db.SaveAll(new [] { new Person { Id = 10, FirstName = "Amy", LastName = "Winehouse", Age = 27 } })
-
- number of rows added
-
-
-
- Populates all related references on the instance with its primary key and saves them. Uses '(T)Id' naming convention. E.g:
- db.SaveAllReferences(customer)
-
-
-
-
- Populates the related references with the instance primary key and saves them. Uses '(T)Id' naming convention. E.g:
- db.SaveReference(customer, customer.Orders)
-
-
-
-
- Populates the related references with the instance primary key and saves them. Uses '(T)Id' naming convention. E.g:
- db.SaveReference(customer, customer.Orders)
-
-
-
-
- Populates the related references with the instance primary key and saves them. Uses '(T)Id' naming convention. E.g:
- db.SaveReferences(customer, customer.Orders)
-
-
-
-
- Wrapper IDbConnection class to allow for connection sharing, mocking, etc.
-
-
-
-
- Allow for mocking and unit testing by providing non-disposing
- connection factory with injectable IDbCommand and IDbTransaction proxies
-
-
-
-
- Force the IDbConnection to always return this IDbCommand
-
-
-
-
- Force the IDbConnection to always return this IDbTransaction
-
-
-
-
- Alias for OpenDbConnection
-
-
-
-
- Alias for OpenDbConnection
-
-
-
-
- Allow for code-sharing between OrmLite, IPersistenceProvider and ICacheClient
-
-
-
-
- Quote the string so that it can be used inside an SQL-expression
- Escape quotes inside the string
-
-
-
-
-
-
- Populates row fields during re-hydration of results.
-
-
-
- Fmt
-
-
-
- Nice SqlBuilder class by @samsaffron from Dapper.Contrib:
- http://samsaffron.com/archive/2011/09/05/Digging+ourselves+out+of+the+mess+Linq-2-SQL+created
- Modified to work in .NET 3.5
-
-
-
-
- Additional state flags that control command behaviour
-
-
-
-
- No additonal flags
-
-
-
-
- Should data be buffered before returning?
-
-
-
-
- Can async queries be pipelined?
-
-
-
-
- Should the plan cache be bypassed?
-
-
-
-
- Represents the key aspects of a sql operation
-
-
-
-
- Initialize the command definition
-
-
-
-
- The command (sql or a stored-procedure name) to execute
-
-
-
-
- The parameters associated with the command
-
-
-
-
- The active transaction for the command
-
-
-
-
- The effective timeout for the command
-
-
-
-
- The type of command that the command-text represents
-
-
-
-
- Should data be buffered before returning?
-
-
-
-
- Should the plan for this query be cached?
-
-
-
-
- Additional state flags against this command
-
-
-
-
- Can async queries be pipelined?
-
-
-
-
- Dapper, a light weight object mapper for ADO.NET
-
-
-
-
- Key used to indicate the type name associated with a DataTable
-
-
-
-
- Purge the query cache
-
-
-
-
- Return a count of all the cached queries by dapper
-
-
-
-
-
- Return a list of all the queries cached by dapper
-
-
-
-
-
-
- Deep diagnostics only: find any hash collisions in the cache
-
-
-
-
-
- Clear the registered type handlers
-
-
-
-
- Configire the specified type to be mapped to a given db-type
-
-
-
-
- Configire the specified type to be processed by a custom handler
-
-
-
-
- Configire the specified type to be processed by a custom handler
-
-
-
-
- Configire the specified type to be processed by a custom handler
-
-
-
-
- Get the DbType that maps to a given value
-
-
-
-
- Execute parameterized SQL
-
- Number of rows affected
-
-
-
- Execute parameterized SQL
-
- Number of rows affected
-
-
-
- Execute parameterized SQL that selects a single value
-
- The first cell selected
-
-
-
- Execute parameterized SQL that selects a single value
-
- The first cell selected
-
-
-
- Execute parameterized SQL that selects a single value
-
- The first cell selected
-
-
-
- Execute parameterized SQL that selects a single value
-
- The first cell selected
-
-
-
- Execute parameterized SQL and return an
-
- An that can be used to iterate over the results of the SQL query.
-
- This is typically used when the results of a query are not processed by Dapper, for example, used to fill a DataTable or DataSet.
-
-
-
-
-
-
-
-
-
- Execute parameterized SQL and return an
-
- An that can be used to iterate over the results of the SQL query.
-
- This is typically used when the results of a query are not processed by Dapper, for example, used to fill a DataTable or DataSet.
-
-
-
-
- Execute parameterized SQL and return an
-
- An that can be used to iterate over the results of the SQL query.
-
- This is typically used when the results of a query are not processed by Dapper, for example, used to fill a DataTable or DataSet.
-
-
-
-
- Return a list of dynamic objects, reader is closed after the call
-
-
-
-
- Executes a query, returning the data typed as per T
-
- the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object
- A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
- created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
-
-
-
-
- Executes a query, returning the data typed as per the Type suggested
-
- A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
- created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
-
-
-
-
- Executes a query, returning the data typed as per T
-
- the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object
- A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is
- created per row, and a direct column-name===member-name mapping is assumed (case insensitive).
-
-
-
-
- Execute a command that returns multiple result sets, and access each in turn
-
-
-
-
- Execute a command that returns multiple result sets, and access each in turn
-
-
-
-
- Maps a query to objects
-
- The first type in the recordset
- The second type in the recordset
- The return type
-
-
-
-
-
-
- The Field we should split and read the second object from (default: id)
- Number of seconds before command execution timeout
- Is it a stored proc or a batch?
-
-
-
-
- Maps a query to objects
-
-
-
-
-
-
-
-
-
-
-
- The Field we should split and read the second object from (default: id)
- Number of seconds before command execution timeout
-
-
-
-
-
- Perform a multi mapping query with 4 input parameters
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Perform a multi mapping query with 5 input parameters
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Perform a multi mapping query with 6 input parameters
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Perform a multi mapping query with 7 input parameters
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Perform a multi mapping query with arbitrary input parameters
-
- The return type
-
-
- array of types in the recordset
-
-
-
-
- The Field we should split and read the second object from (default: id)
- Number of seconds before command execution timeout
- Is it a stored proc or a batch?
-
-
-
-
- Internal use only
-
-
-
-
-
-
- Internal use only
-
-
-
-
- Internal use only
-
-
-
-
- Internal use only
-
-
-
-
- Replace all literal tokens with their text form
-
-
-
-
- Convert numeric values to their string form for SQL literal purposes
-
-
-
-
- Internal use only
-
-
-
-
- Gets type-map for the given type
-
- Type map implementation, DefaultTypeMap instance if no override present
-
-
-
- Set custom mapping for type deserializers
-
- Entity type to override
- Mapping rules impementation, null to remove custom map
-
-
-
- Internal use only
-
-
-
-
-
-
-
-
-
-
- Throws a data exception, only used internally
-
-
-
-
- Called if the query cache is purged via PurgeQueryCache
-
-
-
-
- How should connection strings be compared for equivalence? Defaults to StringComparer.Ordinal.
- Providing a custom implementation can be useful for allowing multi-tenancy databases with identical
- schema to share startegies. Note that usual equivalence rules apply: any equivalent connection strings
- MUST yield the same hash-code.
-
-
-
-
- Implement this interface to pass an arbitrary db specific set of parameters to Dapper
-
-
-
-
- Add all the parameters needed to the command just before it executes
-
- The raw command prior to execution
- Information about the query
-
-
-
- Extends IDynamicParameters providing by-name lookup of parameter values
-
-
-
-
- Get the value of the specified parameter (return null if not found)
-
-
-
-
- Extends IDynamicParameters with facitilies for executing callbacks after commands have completed
-
-
-
-
- Invoked when the command has executed
-
-
-
-
- Implement this interface to pass an arbitrary db specific parameter to Dapper
-
-
-
-
- Add the parameter needed to the command before it executes
-
- The raw command prior to execution
- Parameter name
-
-
-
- Implement this interface to perform custom type-based parameter handling and value parsing
-
-
-
-
- Assign the value of a parameter before a command executes
-
- The parameter to configure
- Parameter value
-
-
-
- Parse a database value back to a typed value
-
- The value from the database
- The type to parse to
- The typed value
-
-
-
- A type handler for data-types that are supported by the underlying provider, but which need
- a well-known UdtTypeName to be specified
-
-
-
-
- Creates a new instance of UdtTypeHandler with the specified UdtTypeName
-
-
-
-
- Base-class for simple type-handlers
-
-
-
-
- Assign the value of a parameter before a command executes
-
- The parameter to configure
- Parameter value
-
-
-
- Parse a database value back to a typed value
-
- The value from the database
- The typed value
-
-
-
- Implement this interface to change default mapping of reader columns to type memebers
-
-
-
-
- Finds best constructor
-
- DataReader column names
- DataReader column types
- Matching constructor or default one
-
-
-
- Gets mapping for constructor parameter
-
- Constructor to resolve
- DataReader column name
- Mapping implementation
-
-
-
- Gets member mapping for column
-
- DataReader column name
- Mapping implementation
-
-
-
- Implements this interface to provide custom member mapping
-
-
-
-
- Source DataReader column name
-
-
-
-
- Target member type
-
-
-
-
- Target property
-
-
-
-
- Target field
-
-
-
-
- Target constructor parameter
-
-
-
-
- This is a micro-cache; suitable when the number of terms is controllable (a few hundred, for example),
- and strictly append-only; you cannot change existing values. All key matches are on **REFERENCE**
- equality. The type is fully thread-safe.
-
-
-
-
- Not intended for direct usage
-
-
-
-
- Not intended for direct usage
-
-
-
-
- Not intended for direct usage
-
-
-
-
- Identity of a cached query in Dapper, used for extensability
-
-
-
-
- Create an identity for use with DynamicParameters, internal use only
-
-
-
-
-
-
-
-
-
-
-
-
-
- The sql
-
-
-
-
- The command type
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Compare 2 Identity objects
-
-
-
-
-
-
- Represents a placeholder for a value that should be replaced as a literal value in the resulting sql
-
-
-
-
- The text in the original command that should be replaced
-
-
-
-
- The name of the member referred to by the token
-
-
-
-
- The grid reader provides interfaces for reading multiple result sets from a Dapper query
-
-
-
-
- Read the next grid of results, returned as a dynamic object
-
-
-
-
- Read the next grid of results
-
-
-
-
- Read the next grid of results
-
-
-
-
- Read multiple objects from a single recordset on the grid
-
-
-
-
- Read multiple objects from a single recordset on the grid
-
-
-
-
- Read multiple objects from a single record set on the grid
-
-
-
-
- Read multiple objects from a single record set on the grid
-
-
-
-
- Read multiple objects from a single record set on the grid
-
-
-
-
- Read multiple objects from a single record set on the grid
-
-
-
-
- Dispose the grid, closing and disposing both the underlying reader and command.
-
-
-
-
- Has the underlying reader been consumed?
-
-
-
-
- A bag of parameters that can be passed to the Dapper Query and Execute methods
-
-
-
-
- construct a dynamic parameter bag
-
-
-
-
- construct a dynamic parameter bag
-
- can be an anonymous type or a DynamicParameters bag
-
-
-
- Append a whole object full of params to the dynamic
- EG: AddDynamicParams(new {A = 1, B = 2}) // will add property A and B to the dynamic
-
-
-
-
-
- Add a parameter to this dynamic parameter list
-
-
-
-
-
-
-
-
-
- Add all the parameters needed to the command just before it executes
-
- The raw command prior to execution
- Information about the query
-
-
-
- Get the value of a parameter
-
-
-
- The value, note DBNull.Value is not returned, instead the value is returned as null
-
-
-
- Allows you to automatically populate a target property/field from output parameters. It actually
- creates an InputOutput parameter, so you can still pass data in.
-
-
- The object whose property/field you wish to populate.
- A MemberExpression targeting a property/field of the target (or descendant thereof.)
-
- The size to set on the parameter. Defaults to 0, or DbString.DefaultLength in case of strings.
- The DynamicParameters instance
-
-
-
- If true, the command-text is inspected and only values that are clearly used are included on the connection
-
-
-
-
- All the names of the param in the bag, use Get to yank them out
-
-
-
-
- This class represents a SQL string, it can be used if you need to denote your parameter is a Char vs VarChar vs nVarChar vs nChar
-
-
-
-
- A value to set the default value of strings
- going through Dapper. Default is 4000, any value larger than this
- field will not have the default value applied.
-
-
-
-
- Create a new DbString
-
-
-
-
- Add the parameter to the command... internal use only
-
-
-
-
-
-
- Ansi vs Unicode
-
-
-
-
- Fixed length
-
-
-
-
- Length of the string -1 for max
-
-
-
-
- The value of the string
-
-
-
-
- Handles variances in features per DBMS
-
-
-
-
- Gets the featureset based on the passed connection
-
-
-
-
- True if the db supports array columns e.g. Postgresql
-
-
-
-
- Represents simple memeber map for one of target parameter or property or field to source DataReader column
-
-
-
-
- Creates instance for simple property mapping
-
- DataReader column name
- Target property
-
-
-
- Creates instance for simple field mapping
-
- DataReader column name
- Target property
-
-
-
- Creates instance for simple constructor parameter mapping
-
- DataReader column name
- Target constructor parameter
-
-
-
- DataReader column name
-
-
-
-
- Target member type
-
-
-
-
- Target property
-
-
-
-
- Target field
-
-
-
-
- Target constructor parameter
-
-
-
-
- Represents default type mapping strategy used by Dapper
-
-
-
-
- Creates default type map
-
- Entity type
-
-
-
- Finds best constructor
-
- DataReader column names
- DataReader column types
- Matching constructor or default one
-
-
-
- Gets mapping for constructor parameter
-
- Constructor to resolve
- DataReader column name
- Mapping implementation
-
-
-
- Gets member mapping for column
-
- DataReader column name
- Mapping implementation
-
-
-
- Should column names like User_Id be allowed to match properties/fields like UserId ?
-
-
-
-
- Implements custom property mapping by user provided criteria (usually presence of some custom attribute with column to member mapping)
-
-
-
-
- Creates custom property mapping
-
- Target entity type
- Property selector based on target type and DataReader column name
-
-
-
- Always returns default constructor
-
- DataReader column names
- DataReader column types
- Default constructor
-
-
-
- Not impelmeneted as far as default constructor used for all cases
-
-
-
-
-
-
-
- Returns property based on selector strategy
-
- DataReader column name
- Poperty member map
-
-
-
diff --git a/lib/tests/ServiceStack.Redis.dll b/lib/tests/ServiceStack.Redis.dll
deleted file mode 100644
index 3a5d6914..00000000
Binary files a/lib/tests/ServiceStack.Redis.dll and /dev/null differ
diff --git a/lib/tests/ServiceStack.Redis.xml b/lib/tests/ServiceStack.Redis.xml
deleted file mode 100644
index 1b460938..00000000
--- a/lib/tests/ServiceStack.Redis.xml
+++ /dev/null
@@ -1,1382 +0,0 @@
-
-
-
- ServiceStack.Redis
-
-
-
-
- Provides thread-safe retrievel of redis clients since each client is a new one.
- Allows the configuration of different ReadWrite and ReadOnly hosts
-
-
- BasicRedisClientManager for ICacheClient
-
- For more interoperabilty I'm also implementing the ICacheClient on
- this cache client manager which has the affect of calling
- GetCacheClient() for all write operations and GetReadOnlyCacheClient()
- for the read ones.
-
- This works well for master-slave replication scenarios where you have
- 1 master that replicates to multiple read slaves.
-
-
-
-
- Hosts can be an IP Address or Hostname in the format: host[:port]
- e.g. 127.0.0.1:6379
- default is: localhost:6379
-
- The write hosts.
- The read hosts.
-
-
-
- Returns a Read/Write client (The default) using the hosts defined in ReadWriteHosts
-
-
-
-
-
- Returns a ReadOnly client using the hosts defined in ReadOnlyHosts.
-
-
-
-
-
- Gets or sets object key prefix.
-
-
-
-
- Courtesy of @marcgravell
- http://code.google.com/p/protobuf-net/source/browse/trunk/protobuf-net/BufferPool.cs
-
-
-
-
- Provides thread-safe pooling of redis client connections.
-
-
-
-
- Returns a Read/Write client (The default) using the hosts defined in ReadWriteHosts
-
-
-
-
-
- Called within a lock
-
-
-
-
-
- Disposes the write client.
-
- The client.
-
-
-
- The client wraps the native redis operations into a more readable c# API.
-
- Where possible these operations are also exposed in common c# interfaces,
- e.g. RedisClient.Lists => IList[string]
- RedisClient.Sets => ICollection[string]
-
-
-
-
- This class contains all the common operations for the RedisClient.
- The client contains a 1:1 mapping of c# methods to redis operations of the same name.
-
- Not threadsafe use a pooled manager
-
-
-
-
- Requires custom result parsing
-
- Number of results
-
-
-
- Command to set multuple binary safe arguments
-
-
-
-
-
-
- reset buffer index in send buffer
-
-
-
-
- Used to manage connection pooling
-
-
-
-
- Gets or sets object key prefix.
-
-
-
-
- Creates a new instance of the Redis Client from NewFactoryFn.
-
-
-
-
- Alias for GetValue
-
-
-
-
- Returns key with automatic object id detection in provided value with generic type.
-
-
-
-
-
-
- Returns key with explicit object id.
-
-
-
-
-
-
- Returns key with explicit object type and id.
-
-
-
-
-
-
-
- A complete redis command, with method to send command, receive response, and run callback on success or failure
-
-
-
-
- Allows you to get Redis value operations to operate against POCO types.
-
-
-
-
-
- Use this to share the same redis connection with another
-
- The client.
-
-
-
- Pipeline for redis typed client
-
-
-
-
-
- Queue of commands for redis typed client
-
-
-
-
-
- Redis operation (transaction/pipeline) that allows queued commands to be completed
-
-
-
-
- For interoperabilty GetCacheClient() and GetReadOnlyCacheClient()
- return an ICacheClient wrapper around the redis manager which has the affect of calling
- GetClient() for all write operations and GetReadOnlyClient() for the read ones.
-
- This works well for master-slave replication scenarios where you have
- 1 master that replicates to multiple read slaves.
-
-
-
-
- Ignore dispose on RedisClientsManager, which should be registered as a singleton
-
-
-
-
- Useful wrapper IRedisClientsManager to cut down the boiler plate of most IRedisClient access
-
-
-
-
- Creates a PubSubServer that uses a background thread to listen and process for
- Redis Pub/Sub messages published to the specified channel.
- Use optional callbacks to listen for message, error and life-cycle events.
- Callbacks can be assigned later, then call Start() for PubSubServer to start listening for messages
-
-
-
-
- A complete redis command, with method to send command, receive response, and run callback on success or failure
-
-
-
-
- Redis command that does not get queued
-
-
-
-
- Initialize channel and register client manager
-
-
-
-
-
- Check if GetValidSentinel should try the next sentinel server
-
-
- This will be true if the failures is less than either RedisSentinel.MaxFailures or the # of sentinels, whatever is greater
-
-
-
- Raised if there is an error from a sentinel worker
-
-
-
-
-
-
- Event that is fired when the sentinel subscription raises an event
-
-
-
-
-
-
- Does a sentinel check for masters and slaves and either sets up or fails over to the new config
-
-
-
-
- Takes output from sentinel slaves command and converts into a list of servers
-
-
-
-
-
-
- Takes output from sentinel master command and converts into a list of servers
-
-
-
-
-
-
- Provides a redis connection pool that can be sharded
-
-
-
-
- Provides thread-safe pooling of redis client connections.
- Allows load-balancing of master-write and read-slave hosts, ideal for
- 1 master and multiple replicated read slaves.
-
-
-
-
- Hosts can be an IP Address or Hostname in the format: host[:port]
- e.g. 127.0.0.1:6379
- default is: localhost:6379
-
- The write hosts.
- The read hosts.
- The config.
-
-
-
- Returns a Read/Write client (The default) using the hosts defined in ReadWriteHosts
-
-
-
-
-
- Called within a lock
-
-
-
-
-
- Returns a ReadOnly client using the hosts defined in ReadOnlyHosts.
-
-
-
-
-
- Called within a lock
-
-
-
-
-
- Disposes the read only client.
-
- The client.
-
-
-
- Disposes the write client.
-
- The client.
-
-
-
- Gets or sets object key prefix.
-
-
-
-
- Manage a client acquired from the PooledRedisClientManager
- Dispose method will release the client back to the pool.
-
-
-
-
- wrap the acquired client
-
-
-
-
-
- release the wrapped client back to the pool
-
-
-
-
- access the wrapped client
-
-
-
-
- logical name
-
-
-
-
- An arbitrary weight relative to other nodes
-
-
-
- logical name
- An arbitrary weight relative to other nodes
- redis nodes
-
-
-
- Provides sharding of redis client connections.
- uses consistent hashing to distribute keys across connection pools
-
-
-
-
- maps a key to a redis connection pool
-
- key to map
- a redis connection pool
-
-
-
- Adds a node and maps points across the circle
-
- node to add
- An arbitrary number, specifies how often it occurs relative to other targets.
-
-
-
- A variation of Binary Search algorithm. Given a number, matches the next highest number from the sorted array.
- If a higher number does not exist, then the first number in the array is returned.
-
- a sorted array to perform the search
- number to find the next highest number against
- next highest number
-
-
-
- Given a key, generates an unsigned 64 bit hash code using MD5
-
-
-
-
-
-
- Provides access to the method reflection data as part of the before/after event
-
-
-
-
- Stores details about the context in which an IRedisClient is allocated.
-
-
-
-
-
- Tracks each IRedisClient instance allocated from the IRedisClientsManager logging when they are allocated and disposed.
- Periodically writes the allocated instances to the log for diagnostic purposes.
-
-
-
-
- Distributed lock interface
-
-
-
-
- Optimized implementation. Primitive types are manually serialized, the rest are serialized using binary serializer />.
-
-
-
-
- serialize/deserialize arbitrary objects
- (objects must be serializable)
-
-
-
-
- Serialize object to buffer
-
- serializable object
-
-
-
-
- Deserialize buffer to object
-
- byte array to deserialize
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- serialize value and wrap with
-
-
-
-
-
-
- Unwrap object wrapped in
-
-
-
-
-
-
- pop numProcessed items from queue and unlock queue for work item id that dequeued
- items are associated with
-
-
-
-
-
- A dequeued work item has been processed. When all of the dequeued items have been processed,
- all items will be popped from the queue,and the queue unlocked for the work item id that
- the dequeued items are associated with
-
-
-
-
- Update first unprocessed item with new work item.
-
-
-
-
-
-
-
-
-
-
- distributed work item queue. Each message must have an associated
- work item id. For a given id, all work items are guaranteed to be processed
- in the order in which they are received.
-
-
-
-
- distributed work item queue. Each message must have an associated
- work item id. For a given id, all work items are guaranteed to be processed
- in the order in which they are received.
-
-
-
-
-
-
- distributed work item queue
-
-
-
-
- Enqueue item in priority queue corresponding to workItemId identifier
-
-
-
-
-
-
- Preprare next work item id for dequeueing
-
-
-
-
- Dequeue up to maxBatchSize items from queue corresponding to workItemId identifier.
- Once this method is called, or will not
- return any items for workItemId until the dequeue lock returned is unlocked.
-
-
-
-
-
-
-
- Replace existing work item in workItemId queue
-
-
-
-
-
-
-
- Queue incoming messages
-
-
-
-
-
-
- Must call this periodically to move work items from priority queue to pending queue
-
-
-
-
- Replace existing work item in workItemId queue
-
-
-
-
-
-
-
- Pop items from list
-
-
-
-
-
-
- Force release of locks held by crashed servers
-
-
-
-
- release lock held by crashed server
-
-
-
- true if lock is released, either by this method or by another client; false otherwise
-
-
-
- Unlock work item id, so other servers can process items for this id
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- pop remaining items that were returned by dequeue, and unlock queue
-
-
-
-
-
- indicate that an item has been processed by the caller
-
-
-
-
- Update first unprocessed work item
-
-
-
-
-
- wraps a serialized representation of an object
-
-
-
-
-
- Initializes a new instance of .
-
- Custom item data.
- The serialized item.
-
-
-
- The data representing the item being stored/retireved.
-
-
-
-
- Flags set for this instance.
-
-
-
-
- distributed lock class that follows the Resource Allocation Is Initialization pattern
-
-
-
-
- Lock
-
-
-
- in seconds
- in seconds
-
-
-
- unlock
-
-
-
-
- Enqueue item
-
-
-
-
-
- Dequeue up to maxBatchSize items from queue
-
-
-
-
-
-
- distributed work item queue. Messages are processed in chronological order
-
-
-
-
- Enqueue incoming messages
-
-
-
-
-
-
-
- Dequeue next batch of work items
-
-
-
-
-
-
-
-
- simple distributed work item queue
-
-
-
-
-
-
- Queue incoming messages
-
-
-
-
-
- Dequeue next batch of work items for processing. After this method is called,
- no other work items with same id will be available for
- dequeuing until PostDequeue is called
-
- KeyValuePair: key is work item id, and value is list of dequeued items.
-
-
-
-
- Serialize object to buffer
-
- serializable object
-
-
-
-
-
-
- array of serializable objects
-
-
-
-
- Deserialize buffer to object
-
- byte array to deserialize
-
-
-
-
-
- customize the client serializer
-
-
-
-
- Factory to create SerializingRedisClient objects
-
-
-
-
-
-
-
-
- General purpose pipeline
-
-
-
-
-
- Flush send buffer, and read responses
-
-
-
-
- Wrap the common redis set operations under a ICollection[string] interface.
-
-
-
-
- Adds support for Redis Transactions (i.e. MULTI/EXEC/DISCARD operations).
-
-
-
-
- Put "QUEUED" messages at back of queue
-
-
-
-
-
- Issue exec command (not queued)
-
-
-
-
- callback for after result count is read in
-
-
-
-
-
- Wrap the common redis set operations under a ICollection[string] interface.
-
-
-
-
- Wrap the common redis set operations under a ICollection[string] interface.
-
-
-
-
- Wrap the common redis set operations under a ICollection[string] interface.
-
-
-
-
- Redis-specific exception. Thrown if unable to connect to Redis server due to socket exception, for example.
-
-
-
-
- Adds support for Redis Transactions (i.e. MULTI/EXEC/DISCARD operations).
-
-
-
-
- Put "QUEUED" messages at back of queue
-
-
-
-
-
- Issue exec command (not queued)
-
-
-
-
- callback for after result count is read in
-
-
-
-
-
- Provide the default factory implementation for creating a RedisClient that
- can be mocked and used by different 'Redis Client Managers'
-
-
-
-
- Wrap the common redis set operations under a ICollection[string] interface.
-
-
-
-
- Provide the factory implementation for creating a RedisCacheClient that
- can be mocked and used by different 'Redis Client Managers'
-
-
-
-
- Wrap the common redis set operations under a ICollection[string] interface.
-
-
-
-
- Wrap the common redis list operations under a IList[string] interface.
-
-
-
-
- Represents a generic collection of key/value pairs that are ordered independently of the key and value.
-
- The type of the keys in the dictionary
- The type of the values in the dictionary
-
-
-
- Adds an entry with the specified key and value into the IOrderedDictionary<TKey,TValue> collection with the lowest available index.
-
- The key of the entry to add.
- The value of the entry to add.
- The index of the newly added entry
-
- You can also use the property to add new elements by setting the value of a key that does not exist in the IOrderedDictionary<TKey,TValue> collection; however, if the specified key already exists in the IOrderedDictionary<TKey,TValue>, setting the property overwrites the old value. In contrast, the method does not modify existing elements.
- An element with the same key already exists in the IOrderedDictionary<TKey,TValue>
- The IOrderedDictionary<TKey,TValue> is read-only.
- -or-
- The IOrderedDictionary<TKey,TValue> has a fized size.
-
-
-
- Inserts a new entry into the IOrderedDictionary<TKey,TValue> collection with the specified key and value at the specified index.
-
- The zero-based index at which the element should be inserted.
- The key of the entry to add.
- The value of the entry to add. The value can be if the type of the values in the dictionary is a reference type.
- is less than 0.
- -or-
- is greater than .
- An element with the same key already exists in the IOrderedDictionary<TKey,TValue>.
- The IOrderedDictionary<TKey,TValue> is read-only.
- -or-
- The IOrderedDictionary<TKey,TValue> has a fized size.
-
-
-
- Gets or sets the value at the specified index.
-
- The zero-based index of the value to get or set.
- The value of the item at the specified index.
- is less than 0.
- -or-
- is equal to or greater than .
-
-
-
- Represents a generic collection of key/value pairs that are ordered independently of the key and value.
-
- The type of the keys in the dictionary
- The type of the values in the dictionary
-
-
-
- Initializes a new instance of the OrderedDictionary<TKey,TValue> class.
-
-
-
-
- Initializes a new instance of the OrderedDictionary<TKey,TValue> class using the specified initial capacity.
-
- The initial number of elements that the OrderedDictionary<TKey,TValue> can contain.
- is less than 0
-
-
-
- Initializes a new instance of the OrderedDictionary<TKey,TValue> class using the specified comparer.
-
- The IEqualityComparer<TKey> to use when comparing keys, or to use the default EqualityComparer<TKey> for the type of the key.
-
-
-
- Initializes a new instance of the OrderedDictionary<TKey,TValue> class using the specified initial capacity and comparer.
-
- The initial number of elements that the OrderedDictionary<TKey,TValue> collection can contain.
- The IEqualityComparer<TKey> to use when comparing keys, or to use the default EqualityComparer<TKey> for the type of the key.
- is less than 0
-
-
-
- Converts the object passed as a key to the key type of the dictionary
-
- The key object to check
- The key object, cast as the key type of the dictionary
- is .
- The key type of the OrderedDictionary<TKey,TValue> is not in the inheritance hierarchy of .
-
-
-
- Converts the object passed as a value to the value type of the dictionary
-
- The object to convert to the value type of the dictionary
- The value object, converted to the value type of the dictionary
- is , and the value type of the OrderedDictionary<TKey,TValue> is a value type.
- The value type of the OrderedDictionary<TKey,TValue> is not in the inheritance hierarchy of .
-
-
-
- Inserts a new entry into the OrderedDictionary<TKey,TValue> collection with the specified key and value at the specified index.
-
- The zero-based index at which the element should be inserted.
- The key of the entry to add.
- The value of the entry to add. The value can be if the type of the values in the dictionary is a reference type.
- is less than 0.
- -or-
- is greater than .
- is .
- An element with the same key already exists in the OrderedDictionary<TKey,TValue>.
-
-
-
- Inserts a new entry into the OrderedDictionary<TKey,TValue> collection with the specified key and value at the specified index.
-
- The zero-based index at which the element should be inserted.
- The key of the entry to add.
- The value of the entry to add. The value can be if the type of the values in the dictionary is a reference type.
- is less than 0.
- -or-
- is greater than .
- is .
- -or-
- is , and the value type of the OrderedDictionary<TKey,TValue> is a value type.
- The key type of the OrderedDictionary<TKey,TValue> is not in the inheritance hierarchy of .
- -or-
- The value type of the OrderedDictionary<TKey,TValue> is not in the inheritance hierarchy of .
- -or-
- An element with the same key already exists in the OrderedDictionary<TKey,TValue>.
-
-
-
- Removes the entry at the specified index from the OrderedDictionary<TKey,TValue> collection.
-
- The zero-based index of the entry to remove.
- is less than 0.
- -or-
- index is equal to or greater than .
-
-
-
- Adds an entry with the specified key and value into the OrderedDictionary<TKey,TValue> collection with the lowest available index.
-
- The key of the entry to add.
- The value of the entry to add. This value can be .
- A key cannot be , but a value can be.
- You can also use the property to add new elements by setting the value of a key that does not exist in the OrderedDictionary<TKey,TValue> collection; however, if the specified key already exists in the OrderedDictionary<TKey,TValue>, setting the property overwrites the old value. In contrast, the method does not modify existing elements.
- is
- An element with the same key already exists in the OrderedDictionary<TKey,TValue>
-
-
-
- Adds an entry with the specified key and value into the OrderedDictionary<TKey,TValue> collection with the lowest available index.
-
- The key of the entry to add.
- The value of the entry to add. This value can be .
- The index of the newly added entry
- A key cannot be , but a value can be.
- You can also use the property to add new elements by setting the value of a key that does not exist in the OrderedDictionary<TKey,TValue> collection; however, if the specified key already exists in the OrderedDictionary<TKey,TValue>, setting the property overwrites the old value. In contrast, the method does not modify existing elements.
- is
- An element with the same key already exists in the OrderedDictionary<TKey,TValue>
-
-
-
- Adds an entry with the specified key and value into the OrderedDictionary<TKey,TValue> collection with the lowest available index.
-
- The key of the entry to add.
- The value of the entry to add. This value can be .
- is .
- -or-
- is , and the value type of the OrderedDictionary<TKey,TValue> is a value type.
- The key type of the OrderedDictionary<TKey,TValue> is not in the inheritance hierarchy of .
- -or-
- The value type of the OrderedDictionary<TKey,TValue> is not in the inheritance hierarchy of .
-
-
-
- Removes all elements from the OrderedDictionary<TKey,TValue> collection.
-
- The capacity is not changed as a result of calling this method.
-
-
-
- Determines whether the OrderedDictionary<TKey,TValue> collection contains a specific key.
-
- The key to locate in the OrderedDictionary<TKey,TValue> collection.
- if the OrderedDictionary<TKey,TValue> collection contains an element with the specified key; otherwise, .
- is
-
-
-
- Determines whether the OrderedDictionary<TKey,TValue> collection contains a specific key.
-
- The key to locate in the OrderedDictionary<TKey,TValue> collection.
- if the OrderedDictionary<TKey,TValue> collection contains an element with the specified key; otherwise, .
- is
- The key type of the OrderedDictionary<TKey,TValue> is not in the inheritance hierarchy of .
-
-
-
- Returns the zero-based index of the specified key in the OrderedDictionary<TKey,TValue>
-
- The key to locate in the OrderedDictionary<TKey,TValue>
- The zero-based index of , if is found in the OrderedDictionary<TKey,TValue>; otherwise, -1
- This method performs a linear search; therefore it has a cost of O(n) at worst.
-
-
-
- Removes the entry with the specified key from the OrderedDictionary<TKey,TValue> collection.
-
- The key of the entry to remove
- if the key was found and the corresponding element was removed; otherwise,
-
-
-
- Removes the entry with the specified key from the OrderedDictionary<TKey,TValue> collection.
-
- The key of the entry to remove
-
-
-
- Copies the elements of the OrderedDictionary<TKey,TValue> elements to a one-dimensional Array object at the specified index.
-
- The one-dimensional object that is the destination of the objects copied from the OrderedDictionary<TKey,TValue>. The must have zero-based indexing.
- The zero-based index in at which copying begins.
- The method preserves the order of the elements in the OrderedDictionary<TKey,TValue>
-
-
-
- Gets the value associated with the specified key.
-
- The key of the value to get.
- When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of . This parameter can be passed uninitialized.
- if the OrderedDictionary<TKey,TValue> contains an element with the specified key; otherwise, .
-
-
-
- Adds the specified value to the OrderedDictionary<TKey,TValue> with the specified key.
-
- The KeyValuePair<TKey,TValue> structure representing the key and value to add to the OrderedDictionary<TKey,TValue>.
-
-
-
- Determines whether the OrderedDictionary<TKey,TValue> contains a specific key and value.
-
- The KeyValuePair<TKey,TValue> structure to locate in the OrderedDictionary<TKey,TValue>.
- if is found in the OrderedDictionary<TKey,TValue>; otherwise, .
-
-
-
- Copies the elements of the OrderedDictionary<TKey,TValue> to an array of type , starting at the specified index.
-
- The one-dimensional array of type KeyValuePair<TKey,TValue> that is the destination of the KeyValuePair<TKey,TValue> elements copied from the OrderedDictionary<TKey,TValue>. The array must have zero-based indexing.
- The zero-based index in at which copying begins.
-
-
-
- Removes a key and value from the dictionary.
-
- The KeyValuePair<TKey,TValue> structure representing the key and value to remove from the OrderedDictionary<TKey,TValue>.
- if the key and value represented by is successfully found and removed; otherwise, . This method returns if is not found in the OrderedDictionary<TKey,TValue>.
-
-
-
- Gets the dictionary object that stores the keys and values
-
- The dictionary object that stores the keys and values for the OrderedDictionary<TKey,TValue>
- Accessing this property will create the dictionary object if necessary
-
-
-
- Gets the list object that stores the key/value pairs.
-
- The list object that stores the key/value pairs for the OrderedDictionary<TKey,TValue>
- Accessing this property will create the list object if necessary.
-
-
-
- Gets or sets the value at the specified index.
-
- The zero-based index of the value to get or set.
- The value of the item at the specified index.
- is less than 0.
- -or-
- index is equal to or greater than .
-
-
-
- Gets or sets the value at the specified index.
-
- The zero-based index of the value to get or set.
- The value of the item at the specified index.
- is less than 0.
- -or-
- index is equal to or greater than .
- is a null reference, and the value type of the OrderedDictionary<TKey,TValue> is a value type.
- The value type of the OrderedDictionary<TKey,TValue> is not in the inheritance hierarchy of .
-
-
-
- Gets a value indicating whether the OrderedDictionary<TKey,TValue> has a fixed size.
-
- if the OrderedDictionary<TKey,TValue> has a fixed size; otherwise, . The default is .
-
-
-
- Gets a value indicating whether the OrderedDictionary<TKey,TValue> collection is read-only.
-
- if the OrderedDictionary<TKey,TValue> is read-only; otherwise, . The default is .
-
- A collection that is read-only does not allow the addition, removal, or modification of elements after the collection is created.
- A collection that is read-only is simply a collection with a wrapper that prevents modification of the collection; therefore, if changes are made to the underlying collection, the read-only collection reflects those changes.
-
-
-
-
- Gets an object containing the keys in the OrderedDictionary<TKey,TValue>.
-
- An object containing the keys in the OrderedDictionary<TKey,TValue>.
- The returned object is not a static copy; instead, the collection refers back to the keys in the original OrderedDictionary<TKey,TValue>. Therefore, changes to the OrderedDictionary<TKey,TValue> continue to be reflected in the key collection.
-
-
-
- Gets an object containing the values in the OrderedDictionary<TKey,TValue> collection.
-
- An object containing the values in the OrderedDictionary<TKey,TValue> collection.
- The returned object is not a static copy; instead, the refers back to the values in the original OrderedDictionary<TKey,TValue> collection. Therefore, changes to the OrderedDictionary<TKey,TValue> continue to be reflected in the .
-
-
-
- Gets or sets the value with the specified key.
-
- The key of the value to get or set.
- The value associated with the specified key. If the specified key is not found, attempting to get it returns , and attempting to set it creates a new element using the specified key.
-
-
-
- Gets or sets the value with the specified key.
-
- The key of the value to get or set.
- The value associated with the specified key. If the specified key is not found, attempting to get it returns , and attempting to set it creates a new element using the specified key.
-
-
-
- Gets the number of key/values pairs contained in the OrderedDictionary<TKey,TValue> collection.
-
- The number of key/value pairs contained in the OrderedDictionary<TKey,TValue> collection.
-
-
-
- Gets a value indicating whether access to the OrderedDictionary<TKey,TValue> object is synchronized (thread-safe).
-
- This method always returns false.
-
-
-
- Gets an object that can be used to synchronize access to the OrderedDictionary<TKey,TValue> object.
-
- An object that can be used to synchronize access to the OrderedDictionary<TKey,TValue> object.
-
-
-
- Gets an ICollection<TKey> object containing the keys in the OrderedDictionary<TKey,TValue>.
-
- An ICollection<TKey> object containing the keys in the OrderedDictionary<TKey,TValue>.
- The returned ICollection<TKey> object is not a static copy; instead, the collection refers back to the keys in the original OrderedDictionary<TKey,TValue>. Therefore, changes to the OrderedDictionary<TKey,TValue> continue to be reflected in the key collection.
-
-
-
- Gets an ICollection<TValue> object containing the values in the OrderedDictionary<TKey,TValue>.
-
- An ICollection<TValue> object containing the values in the OrderedDictionary<TKey,TValue>.
- The returned ICollection<TKey> object is not a static copy; instead, the collection refers back to the values in the original OrderedDictionary<TKey,TValue>. Therefore, changes to the OrderedDictionary<TKey,TValue> continue to be reflected in the value collection.
-
-
-
- acquire distributed, non-reentrant lock on key
-
- global key for this lock
- timeout for acquiring lock
- timeout for lock, in seconds (stored as value against lock key)
-
-
-
-
-
- unlock key
-
-
-
-
-
-
-
-
-
-
-
-
- Locking strategy interface
-
-
-
-
- This class manages a read lock for a local readers/writer lock,
- using the Resource Acquisition Is Initialization pattern
-
-
-
-
- RAII initialization
-
-
-
-
-
- RAII disposal
-
-
-
-
- This class manages a write lock for a local readers/writer lock,
- using the Resource Acquisition Is Initialization pattern
-
-
-
-
-
- RAII disposal
-
-
-
-
- manages a "region" in the redis key space
- namespace can be cleared by incrementing the generation
-
-
-
-
- get current generation
-
-
-
-
-
- set new generation
-
-
-
-
-
- redis key for generation
-
-
-
-
-
- get redis key that holds all namespace keys
-
-
-
-
-
- get global cache key
-
-
-
-
-
-
- get global key inside of this namespace
-
-
- prefixes can be added for name deconfliction
-
-
-
-
- replace UniqueCharacter with its double, to avoid name clash
-
-
-
-
-
-
-
-
-
-
-
-
-
- get locking strategy
-
-
-
-
diff --git a/lib/tests/ServiceStack.Server.dll b/lib/tests/ServiceStack.Server.dll
deleted file mode 100644
index 49e4dac2..00000000
Binary files a/lib/tests/ServiceStack.Server.dll and /dev/null differ
diff --git a/lib/tests/ServiceStack.Server.xml b/lib/tests/ServiceStack.Server.xml
deleted file mode 100644
index f8d1a686..00000000
--- a/lib/tests/ServiceStack.Server.xml
+++ /dev/null
@@ -1,345 +0,0 @@
-
-
-
- ServiceStack.Server
-
-
-
-
- Base rcon class.
-
-
-
-
- Rcon connection socket. Always set to null when not connected.
-
-
-
-
- Unique ID for each message.
-
-
-
-
- Registered callbacks.
-
-
-
-
- Create a new instance of rcon.
-
- Endpoint to connect to, usually the game server with query port.
-
-
-
- Attempts to connect to the game server for rcon operations.
-
- True if connection established, false otherwise.
-
-
-
- Processes a received packet.
-
- The packet.
-
-
-
- Disconnects from rcon.
-
-
-
-
- Sends message to the server.
-
- Words to send.
-
-
-
- Disconnected event.
-
-
-
-
- Game server endpoint.
-
-
-
-
- Last exception that occured during operation.
-
-
-
-
- Connected?
-
-
-
-
- Gets the next unique ID to be used for transmisson. Read this before sending to pair responses to sent messages.
-
-
-
-
- Event delegate when disconnected from the server.
-
-
-
-
-
- Delegate for async callbacks.
-
-
-
-
-
-
- Exception thrown when attempting to send on a non-connected service client.
-
-
-
-
- True if the packet originated on the server.
-
-
-
-
- True if the packet is a response from a sent packet.
-
-
-
-
- Sequence identifier. Unique to the connection.
-
-
-
-
- Words.
-
-
-
-
- Contains methods required for encoding and decoding rcon packets.
-
-
-
-
- Decodes a packet.
-
- The packet.
- A packet object.
-
-
-
- Decodes the packet header.
-
-
-
-
-
-
- Decodes words in a packet.
-
-
-
-
-
-
- Encodes a packet for transmission to the server.
-
-
-
-
-
-
-
-
-
- Encodes a packet header.
-
-
-
-
-
-
-
-
- Encodes words.
-
-
-
-
-
-
- Processing client used to interface with ServiceStack and allow a message to be processed.
- Not an actual client.
-
-
-
-
- Publish the specified message into the durable queue @queueName
-
-
-
-
- Publish the specified message into the transient queue @queueName
-
-
-
-
- Synchronous blocking get.
-
-
-
-
- Non blocking get message
-
-
-
-
- Creates a Redis MQ Server that processes each message on its own background thread.
- i.e. if you register 3 handlers it will create 7 background threads:
- - 1 listening to the Redis MQ Subscription, getting notified of each new message
- - 3x1 Normal InQ for each message handler
- - 3x1 PriorityQ for each message handler (Turn off with DisablePriorityQueues)
-
- When RedisMqServer Starts it creates a background thread subscribed to the Redis MQ Topic that
- listens for new incoming messages. It also starts 2 background threads for each message type:
- - 1 for processing the services Priority Queue and 1 processing the services normal Inbox Queue.
-
- Priority Queue's can be enabled on a message-per-message basis by specifying types in the
- OnlyEnablePriortyQueuesForTypes property. The DisableAllPriorityQueues property disables all Queues.
-
- The Start/Stop methods are idempotent i.e. It's safe to call them repeatedly on multiple threads
- and the Redis MQ Server will only have Started or Stopped once.
-
-
-
-
- Execute global transformation or custom logic before a request is processed.
- Must be thread-safe.
-
-
-
-
- Execute global transformation or custom logic on the response.
- Must be thread-safe.
-
-
-
-
- Execute global error handler logic. Must be thread-safe.
-
-
-
-
- If you only want to enable priority queue handlers (and threads) for specific msg types
-
-
-
-
- Don't listen on any Priority Queues
-
-
-
-
- Opt-in to only publish responses on this white list.
- Publishes all responses by default.
-
-
-
-
- Transient message queues are a one-pass message queue service that starts
- processing messages when Start() is called. Any subsequent Start() calls
- while the service is running is ignored.
-
- The transient service will continue to run until all messages have been
- processed after which time it will shutdown all processing until Start() is called again.
-
-
-
-
- Hosting services via a binary-safe TCP-based protocol.
-
-
-
-
- Register DTOs and hanlders the MQ Host will process
-
-
-
-
-
-
- Get Total Current Stats for all Message Handlers
-
-
-
-
-
- Get a Stats dump
-
-
-
-
-
- Start the MQ Host. Stops the server and restarts if already started.
-
-
-
-
- Stop the MQ Host if not already stopped.
-
-
-
-
- Processes a received packet.
-
- The packet.
-
-
-
- Factory to create consumers and producers that work with this service
-
-
-
-
- Understands how to store a to a MSSQL database.
-
-
-
-
- Creates needed tables. Run this once on your database.
-
-
- Works in sql server and sqlite (with documented removals).
-
-
-
-
- Returns a new .
-
-
-
-
- Stores to dbo.MiniProfilers under its ;
- stores all child Timings and SqlTimings to their respective tables.
-
-
-
-
- Loads the MiniProfiler identifed by 'id' from the database.
-
-
-
-
- Returns a list of s that haven't been seen by .
-
- User identified by the current .
-
-
-
- Returns a connection to Sql Server.
-
-
-
-
diff --git a/lib/tests/ServiceStack.Text.dll b/lib/tests/ServiceStack.Text.dll
deleted file mode 100644
index 3b6cc115..00000000
Binary files a/lib/tests/ServiceStack.Text.dll and /dev/null differ
diff --git a/lib/tests/ServiceStack.Text.xml b/lib/tests/ServiceStack.Text.xml
deleted file mode 100644
index 6cf831f5..00000000
--- a/lib/tests/ServiceStack.Text.xml
+++ /dev/null
@@ -1,714 +0,0 @@
-
-
-
- ServiceStack.Text
-
-
-
-
- Utils to load types
-
-
-
-
- Find the type from the name supplied
-
- [typeName] or [typeName, assemblyName]
-
-
-
-
- The top-most interface of the given type, if any.
-
-
-
-
- Find type if it exists
-
-
-
- The type if it exists
-
-
-
- Populate an object with Example data.
-
-
-
-
-
-
- Populates the object with example data.
-
-
- Tracks how deeply nested we are
-
-
-
-
- If AlwaysUseUtc is set to true then convert all DateTime to UTC.
-
-
-
-
-
-
- Repairs an out-of-spec XML date/time string which incorrectly uses a space instead of a 'T' to separate the date from the time.
- These string are occasionally generated by SQLite and can cause errors in OrmLite when reading these columns from the DB.
-
- The XML date/time string to repair
- The repaired string. If no repairs were made, the original string is returned.
-
-
-
- WCF Json format: /Date(unixts+0000)/
-
-
-
-
-
-
- WCF Json format: /Date(unixts+0000)/
-
-
-
-
-
-
- Get the type(string) constructor if exists
-
- The type.
-
-
-
-
- micro optimizations: using flags instead of value.IndexOfAny(EscapeChars)
-
-
-
-
-
-
- Class to hold
-
-
-
-
-
- A fast, standards-based, serialization-issue free DateTime serailizer.
-
-
-
-
- Determines whether this serializer can create the specified type from a string.
-
- The type.
-
- true if this instance [can create from string] the specified type; otherwise, false.
-
-
-
-
- Parses the specified value.
-
- The value.
-
-
-
-
- Deserializes from reader.
-
- The reader.
-
-
-
-
- Serializes to string.
-
- The value.
-
-
-
-
- Serializes to writer.
-
- The value.
- The writer.
-
-
-
- Sets which format to use when serializing TimeSpans
-
-
-
-
- if the is configured
- to take advantage of specification,
- to support user-friendly serialized formats, ie emitting camelCasing for JSON
- and parsing member names and enum values in a case-insensitive manner.
-
-
-
-
- if the is configured
- to support web-friendly serialized formats, ie emitting lowercase_underscore_casing for JSON
-
-
-
-
- Define how property names are mapped during deserialization
-
-
-
-
- Gets or sets a value indicating if the framework should throw serialization exceptions
- or continue regardless of deserialization errors. If the framework
- will throw; otherwise, it will parse as many fields as possible. The default is .
-
-
-
-
- Gets or sets a value indicating if the framework should always convert to UTC format instead of local time.
-
-
-
-
- Gets or sets a value indicating if the framework should always assume is in UTC format if Kind is Unspecified.
-
-
-
-
- Gets or sets whether we should append the Utc offset when we serialize Utc dates. Defaults to no.
- Only supported for when the JsConfig.DateHandler == JsonDateHandler.TimestampOffset
-
-
-
-
- Gets or sets a value indicating if unicode symbols should be serialized as "\uXXXX".
-
-
-
-
- If set to true, Interface types will be prefered over concrete types when serializing.
-
-
-
-
- For extra serialization performance you can re-use a ThreadStatic StringBuilder
- when serializing to a JSON String.
-
-
-
-
- Sets the maximum depth to avoid circular dependencies
-
-
-
-
- Set this to enable your own type construction provider.
- This is helpful for integration with IoC containers where you need to call the container constructor.
- Return null if you don't know how to construct the type and the parameterless constructor will be used.
-
-
-
-
- If set to true, Interface types will be prefered over concrete types when serializing.
-
-
-
-
- Always emit type info for this type. Takes precedence over ExcludeTypeInfo
-
-
-
-
- Never emit type info for this type
-
-
-
-
- if the is configured
- to take advantage of specification,
- to support user-friendly serialized formats, ie emitting camelCasing for JSON
- and parsing member names and enum values in a case-insensitive manner.
-
-
-
-
- Define custom serialization fn for BCL Structs
-
-
-
-
- Define custom raw serialization fn
-
-
-
-
- Define custom serialization hook
-
-
-
-
- Define custom after serialization hook
-
-
-
-
- Define custom deserialization fn for BCL Structs
-
-
-
-
- Define custom raw deserialization fn for objects
-
-
-
-
- Exclude specific properties of this type from being serialized
-
-
-
-
- Opt-in flag to set some Value Types to be treated as a Ref Type
-
-
-
-
- Whether there is a fn (raw or otherwise)
-
-
-
-
- The property names on target types must match property names in the JSON source
-
-
-
-
- The property names on target types may not match the property names in the JSON source
-
-
-
-
- Uses the xsd format like PT15H10M20S
-
-
-
-
- Uses the standard .net ToString method of the TimeSpan class
-
-
-
-
- Get JSON string value converted to T
-
-
-
-
- Get JSON string value
-
-
-
-
- Get unescaped string value
-
-
-
-
- Get unescaped string value
-
-
-
-
- Write JSON Array, Object, bool or number values as raw string
-
-
-
-
- Get JSON string value
-
-
-
-
- Creates an instance of a Type from a string value
-
-
-
-
- Parses the specified value.
-
- The value.
-
-
-
-
- Shortcut escape when we're sure value doesn't contain any escaped chars
-
-
-
-
-
-
- Given a character as utf32, returns the equivalent string provided that the character
- is legal json.
-
-
-
-
-
-
- micro optimizations: using flags instead of value.IndexOfAny(EscapeChars)
-
-
-
-
-
-
- Implement the serializer using a more static approach
-
-
-
-
-
- Implement the serializer using a more static approach
-
-
-
-
-
- Public Code API to register commercial license for ServiceStack.
-
-
-
-
- Internal Utilities to verify licensing
-
-
-
-
- Pretty Thread-Safe cache class from:
- http://code.google.com/p/dapper-dot-net/source/browse/Dapper/SqlMapper.cs
-
- This is a micro-cache; suitable when the number of terms is controllable (a few hundred, for example),
- and strictly append-only; you cannot change existing values. All key matches are on **REFERENCE**
- equality. The type is fully thread-safe.
-
-
-
-
- Represents an individual object, allowing access to members by-name
-
-
-
-
- Use the target types definition of equality
-
-
-
-
- Obtain the hash of the target object
-
-
-
-
- Use the target's definition of a string representation
-
-
-
-
- Wraps an individual object, allowing by-name access to that instance
-
-
-
-
- Get or Set the value of a named member for the underlying object
-
-
-
-
- The object represented by this instance
-
-
-
-
- Provides by-name member-access to objects of a given type
-
-
-
-
- Create a new instance of this type
-
-
-
-
- Provides a type-specific accessor, allowing by-name access for all objects of that type
-
- The accessor is cached internally; a pre-existing accessor may be returned
-
-
-
- Does this type support new instances via a parameterless constructor?
-
-
-
-
- Get or set the value of a named member on the target instance
-
-
-
-
- Maps the path of a file in the context of a VS project
-
- the relative path
- the absolute path
- Assumes static content is two directories above the /bin/ directory,
- eg. in a unit test scenario the assembly would be in /bin/Debug/.
-
-
-
- Maps the path of a file in a self-hosted scenario
-
- the relative path
- the absolute path
- Assumes static content is copied to /bin/ folder with the assemblies
-
-
-
- Maps the path of a file in an Asp.Net hosted scenario
-
- the relative path
- the absolute path
- Assumes static content is in the parent folder of the /bin/ directory
-
-
-
- Implement the serializer using a more static approach
-
-
-
-
-
- Creates a new instance of type.
- First looks at JsConfig.ModelFactory before falling back to CreateInstance
-
-
-
-
- Creates a new instance of type.
- First looks at JsConfig.ModelFactory before falling back to CreateInstance
-
-
-
-
- Creates a new instance from the default constructor of type
-
-
-
-
- Add a Property attribute at runtime.
- Not threadsafe, should only add attributes on Startup.
-
-
-
-
- Add a Property attribute at runtime.
- Not threadsafe, should only add attributes on Startup.
-
-
-
-
- @jonskeet: Collection of utility methods which operate on streams.
- r285, February 26th 2009: http://www.yoda.arachsys.com/csharp/miscutil/
-
-
-
-
- Reads the given stream up to the end, returning the data as a byte
- array.
-
-
-
-
- Reads the given stream up to the end, returning the data as a byte
- array, using the given buffer size.
-
-
-
-
- Reads the given stream up to the end, returning the data as a byte
- array, using the given buffer for transferring data. Note that the
- current contents of the buffer is ignored, so the buffer needn't
- be cleared beforehand.
-
-
-
-
- Copies all the data from one stream into another.
-
-
-
-
- Copies all the data from one stream into another, using a buffer
- of the given size.
-
-
-
-
- Copies all the data from one stream into another, using the given
- buffer for transferring data. Note that the current contents of
- the buffer is ignored, so the buffer needn't be cleared beforehand.
-
-
-
-
- Reads exactly the given number of bytes from the specified stream.
- If the end of the stream is reached before the specified amount
- of data is read, an exception is thrown.
-
-
-
-
- Reads into a buffer, filling it completely.
-
-
-
-
- Reads exactly the given number of bytes from the specified stream,
- into the given buffer, starting at position 0 of the array.
-
-
-
-
- Reads exactly the given number of bytes from the specified stream,
- into the given buffer, starting at position 0 of the array.
-
-
-
-
- Same as ReadExactly, but without the argument checks.
-
-
-
-
- Converts from base: 0 - 62
-
- The source.
- From.
- To.
-
-
-
-
- Skip the encoding process for 'safe strings'
-
-
-
-
-
-
- A class to allow the conversion of doubles to string representations of
- their exact decimal values. The implementation aims for readability over
- efficiency.
-
- Courtesy of @JonSkeet
- http://www.yoda.arachsys.com/csharp/DoubleConverter.cs
-
-
-
-
-
-
-
- How many digits are *after* the decimal point
-
-
-
-
- Constructs an arbitrary decimal expansion from the given long.
- The long must not be negative.
-
-
-
-
- Multiplies the current expansion by the given amount, which should
- only be 2 or 5.
-
-
-
-
- Shifts the decimal point; a negative value makes
- the decimal expansion bigger (as fewer digits come after the
- decimal place) and a positive value makes the decimal
- expansion smaller.
-
-
-
-
- Removes leading/trailing zeroes from the expansion.
-
-
-
-
- Converts the value to a proper decimal string representation.
-
-
-
-
- Creates an instance of a Type from a string value
-
-
-
-
- Determines whether the specified type is convertible from string.
-
- The type.
-
- true if the specified type is convertible from string; otherwise, false.
-
-
-
-
- Parses the specified value.
-
- The value.
-
-
-
-
- Parses the specified type.
-
- The type.
- The value.
-
-
-
-
- Useful extension method to get the Dictionary[string,string] representation of any POCO type.
-
-
-
-
-
- Recursively prints the contents of any POCO object in a human-friendly, readable format
-
-
-
-
-
- Print Dump to Console.WriteLine
-
-
-
-
- Print string.Format to Console.WriteLine
-
-
-
-
- Parses the specified value.
-
- The value.
-
-
-
-
diff --git a/lib/tests/ServiceStack.XML b/lib/tests/ServiceStack.XML
deleted file mode 100644
index 7662723f..00000000
--- a/lib/tests/ServiceStack.XML
+++ /dev/null
@@ -1,8319 +0,0 @@
-
-
-
- ServiceStack
-
-
-
-
- Base class to create request filter attributes only for specific HTTP methods (GET, POST...)
-
-
-
-
- Creates a new
-
- Defines when the filter should be executed
-
-
-
- This method is only executed if the HTTP method matches the property.
-
- The http request wrapper
- The http response wrapper
- The request DTO
-
-
-
- Create a ShallowCopy of this instance.
-
-
-
-
-
- Inherit from this class if you want to host your web services inside a
- Console Application, Windows Service, etc.
-
- Usage of HttpListener allows you to host webservices on the same port (:80) as IIS
- however it requires admin user privillages.
-
-
-
-
- Wrapper class for the HTTPListener to allow easier access to the
- server, for start and stop management and event routing of the actual
- inbound requests.
-
-
-
-
- ASP.NET or HttpListener ServiceStack host
-
-
-
-
- Register dependency in AppHost IOC on Startup
-
-
-
-
- AutoWired Registration of an interface with a concrete type in AppHost IOC on Startup.
-
-
-
-
- Allows the clean up for executed autowired services and filters.
- Calls directly after services and filters are executed.
-
-
-
-
- Called at the end of each request. Enables Request Scope.
-
-
-
-
- Register an Adhoc web service on Startup
-
-
-
-
- Apply plugins to this AppHost
-
-
-
-
- Create a service runner for IService actions
-
-
-
-
- Resolve the absolute url for this request
-
-
-
-
- Resolve localized text, returns itself by default.
- The Request is provided when exists.
-
-
-
-
- Register user-defined custom routes.
-
-
-
-
- Inferred Metadata available from existing services
-
-
-
-
- Register custom ContentType serializers
-
-
-
-
- Add Request Filters, to be applied before the dto is deserialized
-
-
-
-
- Add Request Filters for HTTP Requests
-
-
-
-
- Add Response Filters for HTTP Responses
-
-
-
-
- Add Request Filters for MQ/TCP Requests
-
-
-
-
- Add Response Filters for MQ/TCP Responses
-
-
-
-
- Add alternative HTML View Engines
-
-
-
-
- Provide an exception handler for unhandled exceptions
-
-
-
-
- Provide an exception handler for un-caught exceptions
-
-
-
-
- Provide callbacks to be fired after the AppHost has finished initializing
-
-
-
-
- Provide callbacks to be fired when AppHost is being disposed
-
-
-
-
- Skip the ServiceStack Request Pipeline and process the returned IHttpHandler instead
-
-
-
-
- Provide a catch-all handler that doesn't match any routes
-
-
-
-
- Use a fall-back Error Handler for handling global errors
-
-
-
-
- Use a Custom Error Handler for handling specific error HttpStatusCodes
-
-
-
-
- Provide a custom model minder for a specific Request DTO
-
-
-
-
- The AppHost config
-
-
-
-
- The AppHost AppSettings. Defaults to App or Web.config appSettings.
-
-
-
-
- List of pre-registered and user-defined plugins to be enabled in this AppHost
-
-
-
-
- Virtual access to file resources
-
-
-
-
- Funqlets are a set of components provided as a package
- to an existing container (like a module).
-
-
-
-
- Configure the given container with the
- registrations provided by the funqlet.
-
- Container to register.
-
-
-
- Retain the same behavior as ASP.NET and redirect requests to directores
- without a trailing '/'
-
-
-
-
- Executed immediately before a Service is executed. Use return to change the request DTO used, must be of the same type.
-
-
-
-
- Executed immediately after a service is executed. Use return to change response used.
-
-
-
-
- Occurs when the Service throws an Exception.
-
-
-
-
- Occurs when an exception is thrown whilst processing a request.
-
-
-
-
- Apply PreRequest Filters for participating Custom Handlers, e.g. RazorFormat, MarkdownFormat, etc
-
-
-
-
- Applies the raw request filters. Returns whether or not the request has been handled
- and no more processing should be done.
-
-
-
-
-
- Applies the request filters. Returns whether or not the request has been handled
- and no more processing should be done.
-
-
-
-
-
- Applies the response filters. Returns whether or not the request has been handled
- and no more processing should be done.
-
-
-
-
-
- The AppHost.Container. Note: it is not thread safe to register dependencies after AppStart.
-
-
-
-
- Starts the Web Service
-
-
- A Uri that acts as the base that the server is listening on.
- Format should be: http://127.0.0.1:8080/ or http://127.0.0.1:8080/somevirtual/
- Note: the trailing slash is required! For more info see the
- HttpListener.Prefixes property on MSDN.
-
-
-
-
- Shut down the Web Service
-
-
-
-
- Overridable method that can be used to implement a custom hnandler
-
-
-
-
-
- Reserves the specified URL for non-administrator users and accounts.
- http://msdn.microsoft.com/en-us/library/windows/desktop/cc307223(v=vs.85).aspx
-
- Reserved Url if the process completes successfully
-
-
-
- Default redirct URL if [Authenticate] attribute doesn't permit access.
-
-
-
-
- Default redirct URL if Required Role or Permission attributes doesn't permit access.
-
-
-
-
- Provides a common interface for Settings providers such as
- ConfigurationManager or Azure's RoleEnvironment. The only
- requirement is that if the implementation cannot find the
- specified key, the return value must be null
-
- The key for the setting
- The string value of the specified key, or null if the key
- was invalid
-
-
-
- Return all keys in this configuration source.
-
-
-
-
-
- Typed UserSession
-
-
-
-
- Dynamic Session Bag
-
-
-
-
- Remove the Users Session
-
-
-
-
-
-
-
- The entry point for all AuthProvider providers. Runs inside the AuthService so exceptions are treated normally.
- Overridable so you can provide your own Auth implementation.
-
-
-
-
- Determine if the current session is already authenticated with this AuthProvider
-
-
-
-
- Allows specifying a global fallback config that if exists is formatted with the Provider as the first arg.
- E.g. this appSetting with the TwitterAuthProvider:
- oauth.CallbackUrl="http://localhost:11001/auth/{0}"
- Would result in:
- oauth.CallbackUrl="http://localhost:11001/auth/twitter"
-
-
-
-
-
- Remove the Users Session
-
-
-
-
-
-
-
- Saves the Auth Tokens for this request. Called in OnAuthenticated().
- Overrideable, the default behaviour is to call IUserAuthRepository.CreateOrMergeAuthSession().
-
-
-
-
- Specify all roles to be used by this application
-
-
-
-
- Only allow access to users in specified roles
-
-
-
-
- Conveneint base class with empty virtual methods so subclasses only need to override the hooks they need.
-
-
-
-
- Create Odnoklassniki App at: http://www.odnoklassniki.ru/devaccess
- The Callback URL for your app should match the CallbackUrl provided.
-
- NB: They claim they use OAuth 2.0, but they in fact don't.
- http://apiok.ru/wiki/display/api/Authorization+OAuth+2.0
-
-
-
-
- The entry point for all AuthProvider providers. Runs inside the AuthService so exceptions are treated normally.
- Overridable so you can provide your own Auth implementation.
-
-
-
-
-
-
-
-
- Sets the CallbackUrl and session.ReferrerUrl if not set and initializes the session tokens for this AuthProvider
-
-
-
-
-
-
-
-
- Create VK App at: http://vk.com/editapp?act=create
- The Callback URL for your app should match the CallbackUrl provided.
-
-
-
-
- If previous attemts failes, the subsequential calls
- build up code value like "code1,code2,code3"
- so we need the last one only
-
-
-
-
-
-
- Create Yandex App at: https://oauth.yandex.ru/client/new
- The Callback URL for your app should match the CallbackUrl provided.
-
-
-
-
- Create an App at: https://github.com/settings/applications/new
- The Callback URL for your app should match the CallbackUrl provided.
-
-
-
-
- Calling to Github API without defined Useragent throws
- exception "The server committed a protocol violation. Section=ResponseStatusLine"
-
-
-
-
- Creates the required missing tables or DB schema
-
-
-
-
- Generic + Useful IService base class
-
-
-
-
- Resolve an alternate Web Service from ServiceStack's IOC container.
-
-
-
-
-
-
- Dynamic Session Bag
-
-
-
-
- Typed UserSession
-
-
-
-
- Redirect to the https:// version of this url if not already.
-
-
-
-
- Don't redirect when in DebugMode
-
-
-
-
- Don't redirect if the request was a forwarded request, e.g. from a Load Balancer
-
-
-
-
- Single threaded message handler that can process all messages
- of a particular message type.
-
-
-
-
- Process all messages pending
-
-
-
-
-
- Process messages from a single queue.
-
-
- The queue to process
- A predicate on whether to continue processing the next message if any
-
-
-
-
- Process a single message
-
-
-
-
- Get Current Stats for this Message Handler
-
-
-
-
-
- The type of the message this handler processes
-
-
-
-
- Encapsulates creating a new message handler
-
-
-
-
- Processes all messages in a Normal and Priority Queue.
- Expects to be called in 1 thread. i.e. Non Thread-Safe.
-
-
-
-
-
- A convenient repository base class you can inherit from to reduce the boilerplate
- with accessing a managed IDbConnection
-
-
-
-
- A convenient base class for your injected service dependencies that reduces the boilerplate
- with managed access to ServiceStack's built-in providers
-
-
-
-
- Only generate specified Verb entries for "ANY" routes
-
-
-
-
- Tell ServiceStack to use ThreadStatic Items Collection for RequestScoped items.
- Warning: ThreadStatic Items aren't pinned to the same request in async services which callback on different threads.
-
-
-
-
- Track any IDisposable's to dispose of at the end of the request in IAppHost.OnEndRequest()
-
-
-
-
-
- Gets a list of items for this request.
-
- This list will be cleared on every request and is specific to the original thread that is handling the request.
- If a handler uses additional threads, this data will not be available on those threads.
-
-
-
-
- This class stores the caller call context in order to restore
- it when the work item is executed in the thread pool environment.
-
-
-
-
- Constructor
-
-
-
-
- Captures the current thread context
-
-
-
-
-
- Applies the thread context stored earlier
-
-
-
-
-
- EventWaitHandleFactory class.
- This is a static class that creates AutoResetEvent and ManualResetEvent objects.
- In WindowCE the WaitForMultipleObjects API fails to use the Handle property
- of XxxResetEvent. It can use only handles that were created by the CreateEvent API.
- Consequently this class creates the needed XxxResetEvent and replaces the handle if
- it's a WindowsCE OS.
-
-
-
-
- Create a new AutoResetEvent object
-
- Return a new AutoResetEvent object
-
-
-
- Create a new ManualResetEvent object
-
- Return a new ManualResetEvent object
-
-
-
- Represents an exception in case IWorkItemResult.GetResult has been canceled
-
-
- Represents an exception in case IWorkItemResult.GetResult has been canceled
-
-
-
-
- Represents an exception in case IWorkItemResult.GetResult has been timed out
-
-
- Represents an exception in case IWorkItemResult.GetResult has been timed out
-
-
-
-
- Represents an exception in case IWorkItemResult.GetResult has been timed out
-
-
- Represents an exception in case IWorkItemResult.GetResult has been timed out
-
-
-
-
- A delegate that represents the method to run as the work item
-
- A state object for the method to run
-
-
-
- A delegate to call after the WorkItemCallback completed
-
- The work item result object
-
-
-
- A delegate to call after the WorkItemCallback completed
-
- The work item result object
-
-
-
- A delegate to call when a WorkItemsGroup becomes idle
-
- A reference to the WorkItemsGroup that became idle
-
-
-
- A delegate to call after a thread is created, but before
- it's first use.
-
-
-
-
- A delegate to call when a thread is about to exit, after
- it is no longer belong to the pool.
-
-
-
-
- Defines the availeable priorities of a work item.
- The higher the priority a work item has, the sooner
- it will be executed.
-
-
-
-
- IWorkItemsGroup interface
- Created by SmartThreadPool.CreateWorkItemsGroup()
-
-
-
-
- Get an array with all the state objects of the currently running items.
- The array represents a snap shot and impact performance.
-
-
-
-
- Starts to execute work items
-
-
-
-
- Cancel all the work items.
- Same as Cancel(false)
-
-
-
-
- Cancel all work items using thread abortion
-
- True to stop work items by raising ThreadAbortException
-
-
-
- Wait for all work item to complete.
-
-
-
-
- Wait for all work item to complete, until timeout expired
-
- How long to wait for the work items to complete
- Returns true if work items completed within the timeout, otherwise false.
-
-
-
- Wait for all work item to complete, until timeout expired
-
- How long to wait for the work items to complete in milliseconds
- Returns true if work items completed within the timeout, otherwise false.
-
-
-
- Queue a work item
-
- A callback to execute
- Returns a work item result
-
-
-
- Queue a work item
-
- A callback to execute
- The priority of the work item
- Returns a work item result
-
-
-
- Queue a work item
-
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
- Returns a work item result
-
-
-
- Queue a work item
-
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
- The work item priority
- Returns a work item result
-
-
-
- Queue a work item
-
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
-
- A delegate to call after the callback completion
-
- Returns a work item result
-
-
-
- Queue a work item
-
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
-
- A delegate to call after the callback completion
-
- The work item priority
- Returns a work item result
-
-
-
- Queue a work item
-
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
-
- A delegate to call after the callback completion
-
- Indicates on which cases to call to the post execute callback
- Returns a work item result
-
-
-
- Queue a work item
-
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
-
- A delegate to call after the callback completion
-
- Indicates on which cases to call to the post execute callback
- The work item priority
- Returns a work item result
-
-
-
- Queue a work item
-
- Work item info
- A callback to execute
- Returns a work item result
-
-
-
- Queue a work item
-
- Work item information
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
- Returns a work item result
-
-
-
- Queue a work item.
-
- Returns a IWorkItemResult object, but its GetResult() will always return null
-
-
-
- Queue a work item.
-
- Returns a IWorkItemResult object, but its GetResult() will always return null
-
-
-
- Queue a work item.
-
- Returns a IWorkItemResult object, but its GetResult() will always return null
-
-
-
- Queue a work item.
-
- Returns a IWorkItemResult object, but its GetResult() will always return null
-
-
-
- Queue a work item.
-
- Returns a IWorkItemResult object, but its GetResult() will always return null
-
-
-
- Queue a work item.
-
- Returns a IWorkItemResult<TResult> object.
- its GetResult() returns a TResult object
-
-
-
- Queue a work item.
-
- Returns a IWorkItemResult<TResult> object.
- its GetResult() returns a TResult object
-
-
-
- Queue a work item.
-
- Returns a IWorkItemResult<TResult> object.
- its GetResult() returns a TResult object
-
-
-
- Queue a work item.
-
- Returns a IWorkItemResult<TResult> object.
- its GetResult() returns a TResult object
-
-
-
- Queue a work item.
-
- Returns a IWorkItemResult<TResult> object.
- its GetResult() returns a TResult object
-
-
-
- Get/Set the name of the WorkItemsGroup
-
-
-
-
- Get/Set the maximum number of workitem that execute cocurrency on the thread pool
-
-
-
-
- Get the number of work items waiting in the queue.
-
-
-
-
- Get the WorkItemsGroup start information
-
-
-
-
- IsIdle is true when there are no work items running or queued.
-
-
-
-
- This event is fired when all work items are completed.
- (When IsIdle changes to true)
- This event only work on WorkItemsGroup. On SmartThreadPool
- it throws the NotImplementedException.
-
-
-
-
- Never call to the PostExecute call back
-
-
-
-
- Call to the PostExecute only when the work item is cancelled
-
-
-
-
- Call to the PostExecute only when the work item is not cancelled
-
-
-
-
- Always call to the PostExecute
-
-
-
-
- The common interface of IWorkItemResult and IWorkItemResult<T>
-
-
-
-
- This method intent is for internal use.
-
-
-
-
-
- This method intent is for internal use.
-
-
-
-
-
- IWorkItemResult interface.
- Created when a WorkItemCallback work item is queued.
-
-
-
-
- IWorkItemResult<TResult> interface.
- Created when a Func<TResult> work item is queued.
-
-
-
-
- Get the result of the work item.
- If the work item didn't run yet then the caller waits.
-
- The result of the work item
-
-
-
- Get the result of the work item.
- If the work item didn't run yet then the caller waits until timeout.
-
- The result of the work item
- On timeout throws WorkItemTimeoutException
-
-
-
- Get the result of the work item.
- If the work item didn't run yet then the caller waits until timeout.
-
- The result of the work item
- On timeout throws WorkItemTimeoutException
-
-
-
- Get the result of the work item.
- If the work item didn't run yet then the caller waits until timeout or until the cancelWaitHandle is signaled.
-
- Timeout in milliseconds, or -1 for infinite
-
- true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
-
- A cancel wait handle to interrupt the blocking if needed
- The result of the work item
- On timeout throws WorkItemTimeoutException
- On cancel throws WorkItemCancelException
-
-
-
- Get the result of the work item.
- If the work item didn't run yet then the caller waits until timeout or until the cancelWaitHandle is signaled.
-
- The result of the work item
- On timeout throws WorkItemTimeoutException
- On cancel throws WorkItemCancelException
-
-
-
- Get the result of the work item.
- If the work item didn't run yet then the caller waits.
-
- Filled with the exception if one was thrown
- The result of the work item
-
-
-
- Get the result of the work item.
- If the work item didn't run yet then the caller waits until timeout.
-
-
-
- Filled with the exception if one was thrown
- The result of the work item
- On timeout throws WorkItemTimeoutException
-
-
-
- Get the result of the work item.
- If the work item didn't run yet then the caller waits until timeout.
-
-
- Filled with the exception if one was thrown
-
- The result of the work item
- On timeout throws WorkItemTimeoutException
-
-
-
- Get the result of the work item.
- If the work item didn't run yet then the caller waits until timeout or until the cancelWaitHandle is signaled.
-
- Timeout in milliseconds, or -1 for infinite
-
- true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
-
- A cancel wait handle to interrupt the blocking if needed
- Filled with the exception if one was thrown
- The result of the work item
- On timeout throws WorkItemTimeoutException
- On cancel throws WorkItemCancelException
-
-
-
- Get the result of the work item.
- If the work item didn't run yet then the caller waits until timeout or until the cancelWaitHandle is signaled.
-
- The result of the work item
-
- Filled with the exception if one was thrown
-
-
- On timeout throws WorkItemTimeoutException
- On cancel throws WorkItemCancelException
-
-
-
- Same as Cancel(false).
-
-
-
-
- Cancel the work item execution.
- If the work item is in the queue then it won't execute
- If the work item is completed, it will remain completed
- If the work item is in progress then the user can check the SmartThreadPool.IsWorkItemCanceled
- property to check if the work item has been cancelled. If the abortExecution is set to true then
- the Smart Thread Pool will send an AbortException to the running thread to stop the execution
- of the work item. When an in progress work item is canceled its GetResult will throw WorkItemCancelException.
- If the work item is already cancelled it will remain cancelled
-
- When true send an AbortException to the executing thread.
- Returns true if the work item was not completed, otherwise false.
-
-
-
- Gets an indication whether the asynchronous operation has completed.
-
-
-
-
- Gets an indication whether the asynchronous operation has been canceled.
-
-
-
-
- Gets the user-defined object that contains context data
- for the work item method.
-
-
-
-
- Get the work item's priority
-
-
-
-
- Return the result, same as GetResult()
-
-
-
-
- Returns the exception if occured otherwise returns null.
-
-
-
-
- An internal delegate to call when the WorkItem starts or completes
-
-
-
-
- This method is intent for internal use.
-
-
-
-
- PriorityQueue class
- This class is not thread safe because we use external lock
-
-
-
-
- The number of queues, there is one for each type of priority
-
-
-
-
- Work items queues. There is one for each type of priority
-
-
-
-
- The total number of work items within the queues
-
-
-
-
- Use with IEnumerable interface
-
-
-
-
- Enqueue a work item.
-
- A work item
-
-
-
- Dequeque a work item.
-
- Returns the next work item
-
-
-
- Find the next non empty queue starting at queue queueIndex+1
-
- The index-1 to start from
-
- The index of the next non empty queue or -1 if all the queues are empty
-
-
-
-
- Clear all the work items
-
-
-
-
- Returns an enumerator to iterate over the work items
-
- Returns an enumerator
-
-
-
- The number of work items
-
-
-
-
- The class the implements the enumerator
-
-
-
-
- Smart thread pool class.
-
-
-
-
- Contains the name of this instance of SmartThreadPool.
- Can be changed by the user.
-
-
-
-
- Cancel all the work items.
- Same as Cancel(false)
-
-
-
-
- Wait for the SmartThreadPool/WorkItemsGroup to be idle
-
-
-
-
- Wait for the SmartThreadPool/WorkItemsGroup to be idle
-
-
-
-
- Queue a work item
-
- A callback to execute
- Returns a work item result
-
-
-
- Queue a work item
-
- A callback to execute
- The priority of the work item
- Returns a work item result
-
-
-
- Queue a work item
-
- Work item info
- A callback to execute
- Returns a work item result
-
-
-
- Queue a work item
-
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
- Returns a work item result
-
-
-
- Queue a work item
-
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
- The work item priority
- Returns a work item result
-
-
-
- Queue a work item
-
- Work item information
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
- Returns a work item result
-
-
-
- Queue a work item
-
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
-
- A delegate to call after the callback completion
-
- Returns a work item result
-
-
-
- Queue a work item
-
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
-
- A delegate to call after the callback completion
-
- The work item priority
- Returns a work item result
-
-
-
- Queue a work item
-
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
-
- A delegate to call after the callback completion
-
- Indicates on which cases to call to the post execute callback
- Returns a work item result
-
-
-
- Queue a work item
-
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
-
- A delegate to call after the callback completion
-
- Indicates on which cases to call to the post execute callback
- The work item priority
- Returns a work item result
-
-
-
- Get/Set the name of the SmartThreadPool/WorkItemsGroup instance
-
-
-
-
- IsIdle is true when there are no work items running or queued.
-
-
-
-
- Default minimum number of threads the thread pool contains. (0)
-
-
-
-
- Default maximum number of threads the thread pool contains. (25)
-
-
-
-
- Default idle timeout in milliseconds. (One minute)
-
-
-
-
- Indicate to copy the security context of the caller and then use it in the call. (false)
-
-
-
-
- Indicate to copy the HTTP context of the caller and then use it in the call. (false)
-
-
-
-
- Indicate to dispose of the state objects if they support the IDispose interface. (false)
-
-
-
-
- The default option to run the post execute (CallToPostExecute.Always)
-
-
-
-
- The default work item priority (WorkItemPriority.Normal)
-
-
-
-
- The default is to work on work items as soon as they arrive
- and not to wait for the start. (false)
-
-
-
-
- The default thread priority (ThreadPriority.Normal)
-
-
-
-
- The default thread pool name. (SmartThreadPool)
-
-
-
-
- The default fill state with params. (false)
- It is relevant only to QueueWorkItem of Action<...>/Func<...>
-
-
-
-
- The default thread backgroundness. (true)
-
-
-
-
- The default apartment state of a thread in the thread pool.
- The default is ApartmentState.Unknown which means the STP will not
- set the apartment of the thread. It will use the .NET default.
-
-
-
-
- The default post execute method to run. (None)
- When null it means not to call it.
-
-
-
-
- The default name to use for the performance counters instance. (null)
-
-
-
-
- The default Max Stack Size. (SmartThreadPool)
-
-
-
-
- Dictionary of all the threads in the thread pool.
-
-
-
-
- Queue of work items.
-
-
-
-
- Count the work items handled.
- Used by the performance counter.
-
-
-
-
- Number of threads that currently work (not idle).
-
-
-
-
- Stores a copy of the original STPStartInfo.
- It is used to change the MinThread and MaxThreads
-
-
-
-
- Total number of work items that are stored in the work items queue
- plus the work items that the threads in the pool are working on.
-
-
-
-
- Signaled when the thread pool is idle, i.e. no thread is busy
- and the work items queue is empty
-
-
-
-
- An event to signal all the threads to quit immediately.
-
-
-
-
- A flag to indicate if the Smart Thread Pool is now suspended.
-
-
-
-
- A flag to indicate the threads to quit.
-
-
-
-
- Counts the threads created in the pool.
- It is used to name the threads.
-
-
-
-
- Indicate that the SmartThreadPool has been disposed
-
-
-
-
- Holds all the WorkItemsGroup instaces that have at least one
- work item int the SmartThreadPool
- This variable is used in case of Shutdown
-
-
-
-
- A common object for all the work items int the STP
- so we can mark them to cancel in O(1)
-
-
-
-
- Windows STP performance counters
-
-
-
-
- Local STP performance counters
-
-
-
-
- Constructor
-
-
-
-
- Constructor
-
- Idle timeout in milliseconds
-
-
-
- Constructor
-
- Idle timeout in milliseconds
- Upper limit of threads in the pool
-
-
-
- Constructor
-
- Idle timeout in milliseconds
- Upper limit of threads in the pool
- Lower limit of threads in the pool
-
-
-
- Constructor
-
- A SmartThreadPool configuration that overrides the default behavior
-
-
-
- Waits on the queue for a work item, shutdown, or timeout.
-
-
- Returns the WaitingCallback or null in case of timeout or shutdown.
-
-
-
-
- Put a new work item in the queue
-
- A work item to queue
-
-
-
- Inform that the current thread is about to quit or quiting.
- The same thread may call this method more than once.
-
-
-
-
- Starts new threads
-
- The number of threads to start
-
-
-
- A worker thread method that processes work items from the work items queue.
-
-
-
-
- Force the SmartThreadPool to shutdown
-
-
-
-
- Force the SmartThreadPool to shutdown with timeout
-
-
-
-
- Empties the queue of work items and abort the threads in the pool.
-
-
-
-
- Wait for all work items to complete
-
- Array of work item result objects
-
- true when every work item in workItemResults has completed; otherwise false.
-
-
-
-
- Wait for all work items to complete
-
- Array of work item result objects
- The number of milliseconds to wait, or a TimeSpan that represents -1 milliseconds to wait indefinitely.
-
- true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
-
-
- true when every work item in workItemResults has completed; otherwise false.
-
-
-
-
- Wait for all work items to complete
-
- Array of work item result objects
- The number of milliseconds to wait, or a TimeSpan that represents -1 milliseconds to wait indefinitely.
-
- true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
-
- A cancel wait handle to interrupt the wait if needed
-
- true when every work item in workItemResults has completed; otherwise false.
-
-
-
-
- Wait for all work items to complete
-
- Array of work item result objects
- The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.
-
- true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
-
-
- true when every work item in workItemResults has completed; otherwise false.
-
-
-
-
- Wait for all work items to complete
-
- Array of work item result objects
- The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.
-
- true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
-
- A cancel wait handle to interrupt the wait if needed
-
- true when every work item in workItemResults has completed; otherwise false.
-
-
-
-
- Waits for any of the work items in the specified array to complete, cancel, or timeout
-
- Array of work item result objects
-
- The array index of the work item result that satisfied the wait, or WaitTimeout if any of the work items has been canceled.
-
-
-
-
- Waits for any of the work items in the specified array to complete, cancel, or timeout
-
- Array of work item result objects
- The number of milliseconds to wait, or a TimeSpan that represents -1 milliseconds to wait indefinitely.
-
- true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
-
-
- The array index of the work item result that satisfied the wait, or WaitTimeout if no work item result satisfied the wait and a time interval equivalent to millisecondsTimeout has passed or the work item has been canceled.
-
-
-
-
- Waits for any of the work items in the specified array to complete, cancel, or timeout
-
- Array of work item result objects
- The number of milliseconds to wait, or a TimeSpan that represents -1 milliseconds to wait indefinitely.
-
- true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
-
- A cancel wait handle to interrupt the wait if needed
-
- The array index of the work item result that satisfied the wait, or WaitTimeout if no work item result satisfied the wait and a time interval equivalent to millisecondsTimeout has passed or the work item has been canceled.
-
-
-
-
- Waits for any of the work items in the specified array to complete, cancel, or timeout
-
- Array of work item result objects
- The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.
-
- true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
-
-
- The array index of the work item result that satisfied the wait, or WaitTimeout if no work item result satisfied the wait and a time interval equivalent to millisecondsTimeout has passed or the work item has been canceled.
-
-
-
-
- Waits for any of the work items in the specified array to complete, cancel, or timeout
-
- Array of work item result objects
- The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.
-
- true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
-
- A cancel wait handle to interrupt the wait if needed
-
- The array index of the work item result that satisfied the wait, or WaitTimeout if no work item result satisfied the wait and a time interval equivalent to millisecondsTimeout has passed or the work item has been canceled.
-
-
-
-
- Creates a new WorkItemsGroup.
-
- The number of work items that can be run concurrently
- A reference to the WorkItemsGroup
-
-
-
- Creates a new WorkItemsGroup.
-
- The number of work items that can be run concurrently
- A WorkItemsGroup configuration that overrides the default behavior
- A reference to the WorkItemsGroup
-
-
-
- Checks if the work item has been cancelled, and if yes then abort the thread.
- Can be used with Cancel and timeout
-
-
-
-
- Get an array with all the state objects of the currently running items.
- The array represents a snap shot and impact performance.
-
-
-
-
- Start the thread pool if it was started suspended.
- If it is already running, this method is ignored.
-
-
-
-
- Cancel all work items using thread abortion
-
- True to stop work items by raising ThreadAbortException
-
-
-
- Wait for the thread pool to be idle
-
-
-
-
- Executes all actions in parallel.
- Returns when they all finish.
-
- Actions to execute
-
-
-
- Executes all actions in parallel.
- Returns when they all finish.
-
- Actions to execute
-
-
-
- Executes all actions in parallel
- Returns when the first one completes
-
- Actions to execute
-
-
-
- Executes all actions in parallel
- Returns when the first one completes
-
- Actions to execute
-
-
-
- Executes actions in sequence asynchronously.
- Returns immediately.
-
- A state context that passes
- Actions to execute in the order they should run
-
-
-
- Executes actions in sequence asynchronously.
- Returns immediately.
-
-
- Actions to execute in the order they should run
-
-
-
- An event to call after a thread is created, but before
- it's first use.
-
-
-
-
- An event to call when a thread is about to exit, after
- it is no longer belong to the pool.
-
-
-
-
- A reference to the current work item a thread from the thread pool
- is executing.
-
-
-
-
- This event is fired when a thread is created.
- Use it to initialize a thread before the work items use it.
-
-
-
-
- This event is fired when a thread is terminating.
- Use it for cleanup.
-
-
-
-
- Get/Set the lower limit of threads in the pool.
-
-
-
-
- Get/Set the upper limit of threads in the pool.
-
-
-
-
- Get the number of threads in the thread pool.
- Should be between the lower and the upper limits.
-
-
-
-
- Get the number of busy (not idle) threads in the thread pool.
-
-
-
-
- Returns true if the current running work item has been cancelled.
- Must be used within the work item's callback method.
- The work item should sample this value in order to know if it
- needs to quit before its completion.
-
-
-
-
- Thread Pool start information (readonly)
-
-
-
-
- Return the local calculated performance counters
- Available only if STPStartInfo.EnableLocalPerformanceCounters is true.
-
-
-
-
- Get/Set the maximum number of work items that execute cocurrency on the thread pool
-
-
-
-
- Get the number of work items in the queue.
-
-
-
-
- WorkItemsGroup start information (readonly)
-
-
-
-
- This event is fired when all work items are completed.
- (When IsIdle changes to true)
- This event only work on WorkItemsGroup. On SmartThreadPool
- it throws the NotImplementedException.
-
-
-
-
- The thread creation time
- The value is stored as UTC value.
-
-
-
-
- The last time this thread has been running
- It is updated by IAmAlive() method
- The value is stored as UTC value.
-
-
-
-
- A reference from each thread in the thread pool to its SmartThreadPool
- object container.
- With this variable a thread can know whatever it belongs to a
- SmartThreadPool.
-
-
-
-
- A reference to the current work item a thread from the thread pool
- is executing.
-
-
-
-
- Summary description for STPPerformanceCounter.
-
-
-
-
- Summary description for STPStartInfo.
-
-
-
-
- Summary description for WIGStartInfo.
-
-
-
-
- Get a readonly version of this WIGStartInfo
-
- Returns a readonly reference to this WIGStartInfoRO
-
-
-
- Get/Set if to use the caller's security context
-
-
-
-
- Get/Set if to use the caller's HTTP context
-
-
-
-
- Get/Set if to dispose of the state object of a work item
-
-
-
-
- Get/Set the run the post execute options
-
-
-
-
- Get/Set the default post execute callback
-
-
-
-
- Get/Set if the work items execution should be suspended until the Start()
- method is called.
-
-
-
-
- Get/Set the default priority that a work item gets when it is enqueued
-
-
-
-
- Get/Set the if QueueWorkItem of Action<...>/Func<...> fill the
- arguments as an object array into the state of the work item.
- The arguments can be access later by IWorkItemResult.State.
-
-
-
-
- Get a readonly version of this STPStartInfo.
-
- Returns a readonly reference to this STPStartInfo
-
-
-
- Get/Set the idle timeout in milliseconds.
- If a thread is idle (starved) longer than IdleTimeout then it may quit.
-
-
-
-
- Get/Set the lower limit of threads in the pool.
-
-
-
-
- Get/Set the upper limit of threads in the pool.
-
-
-
-
- Get/Set the scheduling priority of the threads in the pool.
- The Os handles the scheduling.
-
-
-
-
- Get/Set the thread pool name. Threads will get names depending on this.
-
-
-
-
- Get/Set the performance counter instance name of this SmartThreadPool
- The default is null which indicate not to use performance counters at all.
-
-
-
-
- Enable/Disable the local performance counter.
- This enables the user to get some performance information about the SmartThreadPool
- without using Windows performance counters. (Useful on WindowsCE, Silverlight, etc.)
- The default is false.
-
-
-
-
- Get/Set backgroundness of thread in thread pool.
-
-
-
-
- Get/Set the apartment state of threads in the thread pool
-
-
-
-
- Get/Set the max stack size of threads in the thread pool
-
-
-
-
- Holds a callback delegate and the state for that delegate.
-
-
-
-
- Callback delegate for the callback.
-
-
-
-
- State with which to call the callback delegate.
-
-
-
-
- Stores the caller's context
-
-
-
-
- Holds the result of the mehtod
-
-
-
-
- Hold the exception if the method threw it
-
-
-
-
- Hold the state of the work item
-
-
-
-
- A ManualResetEvent to indicate that the result is ready
-
-
-
-
- A reference count to the _workItemCompleted.
- When it reaches to zero _workItemCompleted is Closed
-
-
-
-
- Represents the result state of the work item
-
-
-
-
- Work item info
-
-
-
-
- A reference to an object that indicates whatever the
- WorkItemsGroup has been canceled
-
-
-
-
- A reference to an object that indicates whatever the
- SmartThreadPool has been canceled
-
-
-
-
- The work item group this work item belong to.
-
-
-
-
- The thread that executes this workitem.
- This field is available for the period when the work item is executed, before and after it is null.
-
-
-
-
- The absulote time when the work item will be timeout
-
-
-
-
- Stores how long the work item waited on the stp queue
-
-
-
-
- Stores how much time it took the work item to execute after it went out of the queue
-
-
-
-
- Initialize the callback holding object.
-
- The workItemGroup of the workitem
- The WorkItemInfo of te workitem
- Callback delegate for the callback.
- State with which to call the callback delegate.
-
- We assume that the WorkItem object is created within the thread
- that meant to run the callback
-
-
-
- Change the state of the work item to in progress if it wasn't canceled.
-
-
- Return true on success or false in case the work item was canceled.
- If the work item needs to run a post execute then the method will return true.
-
-
-
-
- Execute the work item and the post execute
-
-
-
-
- Execute the work item
-
-
-
-
- Runs the post execute callback
-
-
-
-
- Set the result of the work item to return
-
- The result of the work item
- The exception that was throw while the workitem executed, null
- if there was no exception.
-
-
-
- Returns the work item result
-
- The work item result
-
-
-
- Wait for all work items to complete
-
- Array of work item result objects
- The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.
-
- true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
-
- A cancel wait handle to interrupt the wait if needed
-
- true when every work item in waitableResults has completed; otherwise false.
-
-
-
-
- Waits for any of the work items in the specified array to complete, cancel, or timeout
-
- Array of work item result objects
- The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.
-
- true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it; otherwise, false.
-
- A cancel wait handle to interrupt the wait if needed
-
- The array index of the work item result that satisfied the wait, or WaitTimeout if no work item result satisfied the wait and a time interval equivalent to millisecondsTimeout has passed or the work item has been canceled.
-
-
-
-
- Fill an array of wait handles with the work items wait handles.
-
- An array of work item results
- An array of wait handles to fill
-
-
-
- Release the work items' wait handles
-
- An array of work item results
-
-
-
- Sets the work item's state
-
- The state to set the work item to
-
-
-
- Signals that work item has been completed or canceled
-
- Indicates that the work item has been canceled
-
-
-
- Cancel the work item if it didn't start running yet.
-
- Returns true on success or false if the work item is in progress or already completed
-
-
-
- Get the result of the work item.
- If the work item didn't run yet then the caller waits for the result, timeout, or cancel.
- In case of error the method throws and exception
-
- The result of the work item
-
-
-
- Get the result of the work item.
- If the work item didn't run yet then the caller waits for the result, timeout, or cancel.
- In case of error the e argument is filled with the exception
-
- The result of the work item
-
-
-
- A wait handle to wait for completion, cancel, or timeout
-
-
-
-
- Called when the WorkItem starts
-
-
-
-
- Called when the WorkItem completes
-
-
-
-
- Returns true when the work item has completed or canceled
-
-
-
-
- Returns true when the work item has canceled
-
-
-
-
- Returns the priority of the work item
-
-
-
-
- Indicates the state of the work item in the thread pool
-
-
-
-
- A back reference to the work item
-
-
-
-
- Return the result, same as GetResult()
-
-
-
-
- Returns the exception if occured otherwise returns null.
- This value is valid only after the work item completed,
- before that it is always null.
-
-
-
-
- Create a new work item
-
- The WorkItemsGroup of this workitem
- Work item group start information
- A callback to execute
- Returns a work item
-
-
-
- Create a new work item
-
- The WorkItemsGroup of this workitem
- Work item group start information
- A callback to execute
- The priority of the work item
- Returns a work item
-
-
-
- Create a new work item
-
- The WorkItemsGroup of this workitem
- Work item group start information
- Work item info
- A callback to execute
- Returns a work item
-
-
-
- Create a new work item
-
- The WorkItemsGroup of this workitem
- Work item group start information
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
- Returns a work item
-
-
-
- Create a new work item
-
- The work items group
- Work item group start information
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
- The work item priority
- Returns a work item
-
-
-
- Create a new work item
-
- The work items group
- Work item group start information
- Work item information
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
- Returns a work item
-
-
-
- Create a new work item
-
- The work items group
- Work item group start information
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
-
- A delegate to call after the callback completion
-
- Returns a work item
-
-
-
- Create a new work item
-
- The work items group
- Work item group start information
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
-
- A delegate to call after the callback completion
-
- The work item priority
- Returns a work item
-
-
-
- Create a new work item
-
- The work items group
- Work item group start information
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
-
- A delegate to call after the callback completion
-
- Indicates on which cases to call to the post execute callback
- Returns a work item
-
-
-
- Create a new work item
-
- The work items group
- Work item group start information
- A callback to execute
-
- The context object of the work item. Used for passing arguments to the work item.
-
-
- A delegate to call after the callback completion
-
- Indicates on which cases to call to the post execute callback
- The work item priority
- Returns a work item
-
-
-
- Summary description for WorkItemInfo.
-
-
-
-
- Get/Set if to use the caller's security context
-
-
-
-
- Get/Set if to use the caller's HTTP context
-
-
-
-
- Get/Set if to dispose of the state object of a work item
-
-
-
-
- Get/Set the run the post execute options
-
-
-
-
- Get/Set the post execute callback
-
-
-
-
- Get/Set the work item's priority
-
-
-
-
- Get/Set the work item's timout in milliseconds.
- This is a passive timout. When the timout expires the work item won't be actively aborted!
-
-
-
-
- Summary description for WorkItemsGroup.
-
-
-
-
- A reference to the SmartThreadPool instance that created this
- WorkItemsGroup.
-
-
-
-
- A flag to indicate if the Work Items Group is now suspended.
-
-
-
-
- Defines how many work items of this WorkItemsGroup can run at once.
-
-
-
-
- Priority queue to hold work items before they are passed
- to the SmartThreadPool.
-
-
-
-
- Indicate how many work items are waiting in the SmartThreadPool
- queue.
- This value is used to apply the concurrency.
-
-
-
-
- Indicate how many work items are currently running in the SmartThreadPool.
- This value is used with the Cancel, to calculate if we can send new
- work items to the STP.
-
-
-
-
- WorkItemsGroup start information
-
-
-
-
- Signaled when all of the WorkItemsGroup's work item completed.
-
-
-
-
- A common object for all the work items that this work items group
- generate so we can mark them to cancel in O(1)
-
-
-
-
- Start the Work Items Group if it was started suspended
-
-
-
-
- Wait for the thread pool to be idle
-
-
-
-
- The OnIdle event
-
-
-
-
- WorkItemsGroup start information
-
-
-
-
- WorkItemsQueue class.
-
-
-
-
- Waiters queue (implemented as stack).
-
-
-
-
- Waiters count
-
-
-
-
- Work items queue
-
-
-
-
- Indicate that work items are allowed to be queued
-
-
-
-
- A flag that indicates if the WorkItemsQueue has been disposed.
-
-
-
-
- Enqueue a work item to the queue.
-
-
-
-
- Waits for a work item or exits on timeout or cancel
-
- Timeout in milliseconds
- Cancel wait handle
- Returns true if the resource was granted
-
-
-
- Cleanup the work items queue, hence no more work
- items are allowed to be queue
-
-
-
-
- Returns the WaiterEntry of the current thread
-
-
- In order to avoid creation and destuction of WaiterEntry
- objects each thread has its own WaiterEntry object.
-
-
-
- Push a new waiter into the waiter's stack
-
- A waiter to put in the stack
-
-
-
- Pop a waiter from the waiter's stack
-
- Returns the first waiter in the stack
-
-
-
- Remove a waiter from the stack
-
- A waiter entry to remove
- If true the waiter count is always decremented
-
-
-
- Each thread in the thread pool keeps its own waiter entry.
-
-
-
-
- Returns the current number of work items in the queue
-
-
-
-
- Returns the current number of waiters
-
-
-
-
- Event to signal the waiter that it got the work item.
-
-
-
-
- Flag to know if this waiter already quited from the queue
- because of a timeout.
-
-
-
-
- Flag to know if the waiter was signaled and got a work item.
-
-
-
-
- A work item that passed directly to the waiter withou going
- through the queue
-
-
-
-
- Signal the waiter that it got a work item.
-
- Return true on success
- The method fails if Timeout() preceded its call
-
-
-
- Mark the wait entry that it has been timed out
-
- Return true on success
- The method fails if Signal() preceded its call
-
-
-
- Reset the wait entry so it can be used again
-
-
-
-
- Free resources
-
-
-
-
- Respond with a 'Soft redirect' so smart clients (e.g. ajax) have access to the response and
- can decide whether or not they should redirect
-
-
-
-
- Decorate the response with an additional client-side event to instruct participating
- smart clients (e.g. ajax) with hints to transparently invoke client-side functionality
-
-
-
-
- Shortcut to get the ResponseDTO whether it's bare or inside a IHttpResult
-
-
-
-
-
-
- Alias of AsDto
-
-
-
-
- Shortcut to get the ResponseDTO whether it's bare or inside a IHttpResult
-
-
- TResponse if found; otherwise null
-
-
-
- Alias of AsDto
-
-
-
-
- Whether the response is an IHttpError or Exception
-
-
-
-
- rangeHeader should be of the format "bytes=0-" or "bytes=0-12345" or "bytes=123-456"
-
-
-
-
- Adds 206 PartialContent Status, Content-Range and Content-Length headers
-
-
-
-
- Writes partial range as specified by start-end, from fromStream to toStream.
-
-
-
-
- Service error logs are kept in 'urn:ServiceErrors:{ServiceName}'
-
-
-
-
- Combined service error logs are maintained in 'urn:ServiceErrors:All'
-
-
-
-
- RequestLogs service Route, default is /requestlogs
-
-
-
-
- Turn On/Off Session Tracking
-
-
-
-
- Turn On/Off Logging of Raw Request Body, default is Off
-
-
-
-
- Turn On/Off Tracking of Responses
-
-
-
-
- Turn On/Off Tracking of Exceptions
-
-
-
-
- Size of InMemoryRollingRequestLogger circular buffer
-
-
-
-
- Limit access to /requestlogs service to these roles
-
-
-
-
- Change the RequestLogger provider. Default is InMemoryRollingRequestLogger
-
-
-
-
- Don't log requests of these types. By default RequestLog's are excluded
-
-
-
-
- Don't log request bodys for services with sensitive information.
- By default Auth and Registration requests are hidden.
-
-
-
-
- Indicates that the request dto, which is associated with this attribute,
- requires authentication.
-
-
-
-
- Restrict authentication to a specific .
- For example, if this attribute should only permit access
- if the user is authenticated with ,
- you should set this property to .
-
-
-
-
- Redirect the client to a specific URL if authentication failed.
- If this property is null, simply `401 Unauthorized` is returned.
-
-
-
-
- Enable the authentication feature and configure the AuthService.
-
-
-
-
- Inject logic into existing services by introspecting the request and injecting your own
- validation logic. Exceptions thrown will have the same behaviour as if the service threw it.
-
- If a non-null object is returned the request will short-circuit and return that response.
-
- The instance of the service
- GET,POST,PUT,DELETE
-
- Response DTO; non-null will short-circuit execution and return that response
-
-
-
- Public API entry point to authenticate via code
-
-
- null; if already autenticated otherwise a populated instance of AuthResponse
-
-
-
- The specified may change as a side-effect of this method. If
- subsequent code relies on current data be sure to reload
- the session istance via .
-
-
-
-
- Base class for entity validator classes.
-
- The type of the object being validated
-
-
-
- Defines a validator for a particualr type.
-
-
-
-
-
- Defines a validator for a particular type.
-
-
-
-
- Validates the specified instance
-
-
- A ValidationResult containing any validation failures
-
-
-
- Validates the specified instance.
-
- A ValidationContext
- A ValidationResult object containy any validation failures.
-
-
-
- Creates a hook to access various meta data properties
-
- A IValidatorDescriptor object which contains methods to access metadata
-
-
-
- Checks to see whether the validator can validate objects of the specified type
-
-
-
-
- Validates the specified instance.
-
- The instance to validate
- A ValidationResult object containing any validation failures.
-
-
-
- Sets the cascade mode for all rules within this validator.
-
-
-
-
- Validates the specified instance
-
- The object to validate
- A ValidationResult object containing any validation failures
-
-
-
- Validates the specified instance.
-
- Validation Context
- A ValidationResult object containing any validation failures.
-
-
-
- Adds a rule to the current validator.
-
-
-
-
-
- Creates a that can be used to obtain metadata about the current validator.
-
-
-
-
- Defines a validation rule for a specify property.
-
-
- RuleFor(x => x.Surname)...
-
- The type of property being validated
- The expression representing the property to validate
- an IRuleBuilder instance on which validators can be defined
-
-
-
- Defines a custom validation rule using a lambda expression.
- If the validation rule fails, it should return a instance of a ValidationFailure
- If the validation rule succeeds, it should return null.
-
- A lambda that executes custom validation rules.
-
-
-
- Defines a custom validation rule using a lambda expression.
- If the validation rule fails, it should return an instance of ValidationFailure
- If the validation rule succeeds, it should return null.
-
- A lambda that executes custom validation rules
-
-
-
- Defines a RuleSet that can be used to group together several validators.
-
- The name of the ruleset.
- Action that encapsulates the rules in the ruleset.
-
-
-
- Defines a RuleSet that can be used to provide specific validation rules for specific HTTP methods (GET, POST...)
-
- The HTTP methods where this rule set should be used.
- Action that encapuslates the rules in the ruleset.
-
-
-
- Defines a condition that applies to several rules
-
- The condition that should apply to multiple rules
- Action that encapsulates the rules.
-
-
-
-
- Defiles an inverse condition that applies to several rules
-
- The condition that should be applied to multiple rules
- Action that encapsulates the rules
-
-
-
- Returns an enumerator that iterates through the collection of validation rules.
-
-
- A that can be used to iterate through the collection.
-
- 1
-
-
-
- Sets the cascade mode for all rules within this validator.
-
-
-
-
- Create a Facebook App at: https://developers.facebook.com/apps
- The Callback URL for your app should match the CallbackUrl provided.
-
-
-
-
- Download Yammer User Info given its ID.
-
-
- The Yammer User ID.
-
-
- The User info in JSON format.
-
-
-
- Yammer provides a method to retrieve current user information via
- "https://www.yammer.com/api/v1/users/current.json".
-
-
- However, to ensure consistency with the rest of the Auth codebase,
- the explicit URL will be used, where [:id] denotes the User ID:
- "https://www.yammer.com/api/v1/users/[:id].json"
-
-
- Refer to: https://developer.yammer.com/restapi/ for full documentation.
-
-
-
-
-
- Thread-safe In memory UserAuth data store so it can be used without a dependency on Redis.
-
-
-
-
- Creates the required missing tables or DB schema
-
-
-
-
- Update an existing registraiton
-
-
-
-
- Create new Registration
-
-
-
-
- Logic to update UserAuth from Registration info, not enabled on PUT because of security.
-
-
-
-
- Thank you Martijn
- http://www.dijksterhuis.org/creating-salted-hash-values-in-c/
-
-
-
-
- Create an app at https://dev.twitter.com/apps to get your ConsumerKey and ConsumerSecret for your app.
- The Callback URL for your app should match the CallbackUrl provided.
-
-
-
-
- The ServiceStack Yammer OAuth provider.
-
-
-
- This provider is loosely based on the existing ServiceStack's Facebook OAuth provider.
-
-
- For the full info on Yammer's OAuth2 authentication flow, refer to:
- https://developer.yammer.com/authentication/#a-oauth2
-
-
- Note: Add these to your application / web config settings under appSettings and replace
- values as appropriate.
-
-
-
-
-
-
-
-
- ]]>
-
-
-
-
-
- The OAuth provider name / identifier.
-
-
-
-
- Initializes a new instance of the class.
-
-
- The application settings (in web.config).
-
-
-
-
- Authenticate against Yammer OAuth endpoint.
-
-
- The auth service.
-
-
- The session.
-
-
- The request.
-
-
- The .
-
-
-
-
- Load the UserAuth info into the session.
-
-
- The User session.
-
-
- The OAuth tokens.
-
-
- The auth info.
-
-
-
-
- Load the UserOAuth info into the session.
-
-
- The auth session.
-
-
- The OAuth tokens.
-
-
-
-
- Gets or sets the Yammer OAuth client id.
-
-
-
-
- Gets or sets the Yammer OAuth client secret.
-
-
-
-
- Gets or sets the Yammer OAuth pre-auth url.
-
-
-
-
- The Yammer User's email addresses.
-
-
-
-
- Gets or sets the email address type (e.g. primary).
-
-
-
-
- Gets or sets the email address.
-
-
-
-
- Removes items from cache that have keys matching the specified wildcard pattern
-
- Cache client
- The wildcard, where "*" means any sequence of characters and "?" means any single character.
-
-
-
- Removes items from the cache based on the specified regular expression pattern
-
- Cache client
- Regular expression pattern to search cache keys
-
-
-
- Add value with specified key to the cache, and set the cache entry to never expire.
-
-
-
-
- Stores The value with key only if such key doesn't exist at the server yet.
-
-
-
-
- Adds or replaces the value with key, and sets the cache entry to never expire.
-
-
-
-
- Adds or replaces the value with key.
-
-
-
-
- Adds or replaces the value with key.
-
-
-
-
- Replace the value with specified key if it exists, and set the cache entry to never expire.
-
-
-
-
- Replace the value with specified key if it exists.
-
-
-
-
- Add the value with key to the cache, set to never expire.
-
-
-
-
- Add or replace the value with key to the cache, set to never expire.
-
-
-
-
- Replace the value with key in the cache, set to never expire.
-
-
-
-
- Add the value with key to the cache, set to expire at specified DateTime.
-
- This method examines the DateTimeKind of expiresAt to determine if conversion to
- universal time is needed. The version of Add that takes a TimeSpan expiration is faster
- than using this method with a DateTime of Kind other than Utc, and is not affected by
- ambiguous local time during daylight savings/standard time transition.
-
-
-
- Add or replace the value with key to the cache, set to expire at specified DateTime.
-
- This method examines the DateTimeKind of expiresAt to determine if conversion to
- universal time is needed. The version of Set that takes a TimeSpan expiration is faster
- than using this method with a DateTime of Kind other than Utc, and is not affected by
- ambiguous local time during daylight savings/standard time transition.
-
-
-
- Replace the value with key in the cache, set to expire at specified DateTime.
-
- This method examines the DateTimeKind of expiresAt to determine if conversion to
- universal time is needed. The version of Replace that takes a TimeSpan expiration is faster
- than using this method with a DateTime of Kind other than Utc, and is not affected by
- ambiguous local time during daylight savings/standard time transition.
-
-
-
- Add the value with key to the cache, set to expire after specified TimeSpan.
-
-
-
-
- Add or replace the value with key to the cache, set to expire after specified TimeSpan.
-
-
-
-
- Replace the value with key in the cache, set to expire after specified TimeSpan.
-
-
-
-
- Create new instance of CacheEntry.
-
-
-
- UTC time at which CacheEntry expires.
-
-
-
- Would've preferred to use [assembly: ContractNamespace] attribute but it is not supported in Mono
-
-
-
-
- More familiar name for the new crowd.
-
-
-
-
- The tier lets you specify a retrieving a setting with the tier prefix first before falling back to the original key.
- E.g a tier of 'Live' looks for 'Live.{Key}' or if not found falls back to '{Key}'.
-
-
-
-
- Returns string if exists, otherwise null
-
-
-
-
-
-
- Gets the nullable app setting.
-
-
-
-
- Gets the app setting.
-
-
-
-
- Determines wheter the Config section identified by the sectionName exists.
-
-
-
-
- Returns AppSetting[key] if exists otherwise defaultValue
-
-
-
-
- Returns AppSetting[key] if exists otherwise defaultValue, for non-string values
-
-
-
-
- Gets the connection string setting.
-
-
-
-
- Gets the connection string.
-
-
-
-
- Gets the list from app setting.
-
-
-
-
- Gets the dictionary from app setting.
-
-
-
-
- Get the static Parse(string) method on the type supplied
-
-
-
-
- Gets the constructor info for T(string) if exists.
-
-
-
-
- Returns the value returned by the 'T.Parse(string)' method if exists otherwise 'new T(string)'.
- e.g. if T was a TimeSpan it will return TimeSpan.Parse(textValue).
- If there is no Parse Method it will attempt to create a new instance of the destined type
-
-
-
-
- Plugin adds support for Cross-origin resource sharing (CORS, see http://www.w3.org/TR/access-control/).
- CORS allows to access resources from different domain which usually forbidden by origin policy.
-
-
-
-
- Represents a default constructor with Allow Origin equals to "*", Allowed GET, POST, PUT, DELETE, OPTIONS request and allowed "Content-Type" header.
-
-
-
-
- Attribute marks that specific response class has support for Cross-origin resource sharing (CORS, see http://www.w3.org/TR/access-control/). CORS allows to access resources from different domain which usually forbidden by origin policy.
-
-
-
-
- Represents a default constructor with Allow Origin equals to "*", Allowed GET, POST, PUT, DELETE, OPTIONS request and allowed "Content-Type" header.
-
-
-
-
- Change the default HTML view or template used for the HTML response of this service
-
-
-
-
- Class that can be used to find all the validators from a collection of types.
-
-
-
-
- Creates a scanner that works on a sequence of types.
-
-
-
-
- Finds all the validators in the specified assembly.
-
-
-
-
- Finds all the validators in the assembly containing the specified type.
-
-
-
-
- Performs the specified action to all of the assembly scan results.
-
-
-
-
- Returns an enumerator that iterates through the collection.
-
-
- A that can be used to iterate through the collection.
-
- 1
-
-
-
- Result of performing a scan.
-
-
-
-
- Creates an instance of an AssemblyScanResult.
-
-
-
-
- Validator interface type, eg IValidator<Foo>
-
-
-
-
- Concrete type that implements the InterfaceType, eg FooValidator.
-
-
-
-
- Implementation of IValidatorFactory that looks for ValidatorAttribute instances on the specified type in order to provide the validator instance.
-
-
-
-
- Gets validators for a particular type.
-
-
-
-
- Gets the validator for the specified type.
-
-
-
-
- Gets the validator for the specified type.
-
-
-
-
- Gets a validator for the appropriate type.
-
-
-
-
- Gets a validator for the appropriate type.
-
-
-
-
- Validator attribute to define the class that will describe the Validation rules
-
-
-
-
- Creates an instance of the ValidatorAttribute allowing a validator type to be specified.
-
-
-
-
- The type of the validator used to validate the current type.
-
-
-
-
- Associates an instance of IValidator with the current property rule and is used to validate each item within the collection.
-
- The validator to use
-
-
-
- Rule builder
-
-
-
-
-
-
- Rule builder
-
-
-
-
-
-
- Associates a validator with this the property for this rule builder.
-
- The validator to set
-
-
-
-
- Associates an instance of IValidator with the current property rule.
-
- The validator to use
-
-
-
- Represents an object that is configurable.
-
- Type of object being configured
- Return type
-
-
-
- Configures the current object.
-
- Action to configure the object.
-
-
-
-
- Extension methods that provide the default set of validators.
-
-
-
-
- Defines a 'not null' validator on the current rule builder.
- Validation will fail if the property is null.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
-
-
-
-
- Defines a 'not empty' validator on the current rule builder.
- Validation will fail if the property is null, an empty or the default value for the type (for example, 0 for integers)
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
-
-
-
-
- Defines a length validator on the current rule builder, but only for string properties.
- Validation will fail if the length of the string is outside of the specifed range. The range is inclusive.
-
- Type of object being validated
- The rule builder on which the validator should be defined
-
-
-
-
- Defines a length validator on the current rule builder, but only for string properties.
- Validation will fail if the length of the string is not equal to the length specified.
-
- Type of object being validated
- The rule builder on which the validator should be defined
-
-
-
-
- Defines a regular expression validator on the current rule builder, but only for string properties.
- Validation will fail if the value returned by the lambda does not match the regular expression.
-
- Type of object being validated
- The rule builder on which the validator should be defined
- The regular expression to check the value against.
-
-
-
-
- Defines a regular expression validator on the current rule builder, but only for string properties.
- Validation will fail if the value returned by the lambda is not a valid email address.
-
- Type of object being validated
- The rule builder on which the validator should be defined
-
-
-
-
- Defines a 'not equal' validator on the current rule builder.
- Validation will fail if the specified value is equal to the value of the property.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The value to compare
- Equality comparer to use
-
-
-
-
- Defines a 'not equal' validator on the current rule builder using a lambda to specify the value.
- Validation will fail if the value returned by the lambda is equal to the value of the property.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- A lambda expression to provide the comparison value
- Equality Comparer to use
-
-
-
-
- Defines an 'equals' validator on the current rule builder.
- Validation will fail if the specified value is not equal to the value of the property.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The value to compare
- Equality Comparer to use
-
-
-
-
- Defines an 'equals' validator on the current rule builder using a lambda to specify the comparison value.
- Validation will fail if the value returned by the lambda is not equal to the value of the property.
-
- The type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- A lambda expression to provide the comparison value
- Equality comparer to use
-
-
-
-
- Defines a predicate validator on the current rule builder using a lambda expression to specify the predicate.
- Validation will fail if the specified lambda returns false.
- Validation will succeed if the specifed lambda returns true.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- A lambda expression specifying the predicate
-
-
-
-
- Defines a predicate validator on the current rule builder using a lambda expression to specify the predicate.
- Validation will fail if the specified lambda returns false.
- Validation will succeed if the specifed lambda returns true.
- This overload accepts the object being validated in addition to the property being validated.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- A lambda expression specifying the predicate
-
-
-
-
- Defines a predicate validator on the current rule builder using a lambda expression to specify the predicate.
- Validation will fail if the specified lambda returns false.
- Validation will succeed if the specifed lambda returns true.
- This overload accepts the object being validated in addition to the property being validated.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- A lambda expression specifying the predicate
-
-
-
-
- Defines a 'less than' validator on the current rule builder.
- The validation will succeed if the property value is less than the specified value.
- The validation will fail if the property value is greater than or equal to the specified value.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The value being compared
-
-
-
-
- Defines a 'less than' validator on the current rule builder.
- The validation will succeed if the property value is less than the specified value.
- The validation will fail if the property value is greater than or equal to the specified value.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The value being compared
-
-
-
-
- Defines a 'less than or equal' validator on the current rule builder.
- The validation will succeed if the property value is less than or equal to the specified value.
- The validation will fail if the property value is greater than the specified value.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The value being compared
-
-
-
-
- Defines a 'less than or equal' validator on the current rule builder.
- The validation will succeed if the property value is less than or equal to the specified value.
- The validation will fail if the property value is greater than the specified value.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The value being compared
-
-
-
-
- Defines a 'greater than' validator on the current rule builder.
- The validation will succeed if the property value is greater than the specified value.
- The validation will fail if the property value is less than or equal to the specified value.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The value being compared
-
-
-
-
- Defines a 'greater than' validator on the current rule builder.
- The validation will succeed if the property value is greater than the specified value.
- The validation will fail if the property value is less than or equal to the specified value.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The value being compared
-
-
-
-
- Defines a 'greater than or equal' validator on the current rule builder.
- The validation will succeed if the property value is greater than or equal the specified value.
- The validation will fail if the property value is less than the specified value.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The value being compared
-
-
-
-
- Defines a 'greater than or equal' validator on the current rule builder.
- The validation will succeed if the property value is greater than or equal the specified value.
- The validation will fail if the property value is less than the specified value.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The value being compared
-
-
-
-
- Defines a 'less than' validator on the current rule builder using a lambda expression.
- The validation will succeed if the property value is less than the specified value.
- The validation will fail if the property value is greater than or equal to the specified value.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- A lambda that should return the value being compared
-
-
-
-
- Defines a 'less than' validator on the current rule builder using a lambda expression.
- The validation will succeed if the property value is less than the specified value.
- The validation will fail if the property value is greater than or equal to the specified value.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- A lambda that should return the value being compared
-
-
-
-
- Defines a 'less than or equal' validator on the current rule builder using a lambda expression.
- The validation will succeed if the property value is less than or equal to the specified value.
- The validation will fail if the property value is greater than the specified value.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The value being compared
-
-
-
-
- Defines a 'less than or equal' validator on the current rule builder using a lambda expression.
- The validation will succeed if the property value is less than or equal to the specified value.
- The validation will fail if the property value is greater than the specified value.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The value being compared
-
-
-
-
- Defines a 'less than' validator on the current rule builder using a lambda expression.
- The validation will succeed if the property value is greater than the specified value.
- The validation will fail if the property value is less than or equal to the specified value.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The value being compared
-
-
-
-
- Defines a 'less than' validator on the current rule builder using a lambda expression.
- The validation will succeed if the property value is greater than the specified value.
- The validation will fail if the property value is less than or equal to the specified value.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The value being compared
-
-
-
-
- Defines a 'less than' validator on the current rule builder using a lambda expression.
- The validation will succeed if the property value is greater than or equal the specified value.
- The validation will fail if the property value is less than the specified value.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The value being compared
-
-
-
-
- Defines a 'less than' validator on the current rule builder using a lambda expression.
- The validation will succeed if the property value is greater than or equal the specified value.
- The validation will fail if the property value is less than the specified value.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The value being compared
-
-
-
-
- Validates certain properties of the specified instance.
-
- The current validator
- The object to validate
- Expressions to specify the properties to validate
- A ValidationResult object containing any validation failures
-
-
-
- Validates certain properties of the specified instance.
-
- The object to validate
- The names of the properties to validate.
- A ValidationResult object containing any validation failures.
-
-
-
- Performs validation and then throws an exception if validation fails.
-
-
-
-
- Defines an 'inclusive between' validator on the current rule builder, but only for properties of types that implement IComparable.
- Validation will fail if the value of the property is outside of the specifed range. The range is inclusive.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The lowest allowed value
- The highest allowed value
-
-
-
-
- Defines an 'inclusive between' validator on the current rule builder, but only for properties of types that implement IComparable.
- Validation will fail if the value of the property is outside of the specifed range. The range is inclusive.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The lowest allowed value
- The highest allowed value
-
-
-
-
- Defines an 'exclusive between' validator on the current rule builder, but only for properties of types that implement IComparable.
- Validation will fail if the value of the property is outside of the specifed range. The range is exclusive.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The lowest allowed value
- The highest allowed value
-
-
-
-
- Defines an 'exclusive between' validator on the current rule builder, but only for properties of types that implement IComparable.
- Validation will fail if the value of the property is outside of the specifed range. The range is exclusive.
-
- Type of object being validated
- Type of property being validated
- The rule builder on which the validator should be defined
- The lowest allowed value
- The highest allowed value
-
-
-
-
- Defines a credit card validator for the current rule builder that ensures that the specified string is a valid credit card number.
-
-
-
-
- Default options that can be used to configure a validator.
-
-
-
-
- Specifies the cascade mode for failures.
- If set to 'Stop' then execution of the rule will stop once the first validator in the chain fails.
- If set to 'Continue' then all validators in the chain will execute regardless of failures.
-
-
-
-
- Specifies a custom action to be invoked when the validator fails.
-
-
-
-
-
-
-
-
-
- Specifies a custom error message to use if validation fails.
-
- The current rule
- The error message to use
-
-
-
-
- Specifies a custom error message to use if validation fails.
-
- The current rule
- The error message to use
- Additional arguments to be specified when formatting the custom error message.
-
-
-
-
- Specifies a custom error message to use if validation fails.
-
- The current rule
- The error message to use
- Additional property values to be included when formatting the custom error message.
-
-
-
-
- Specifies a custom error message resource to use when validation fails.
-
- The current rule
- The resource to use as an expression, eg () => Messages.MyResource
-
-
-
-
- Specifies a custom error message resource to use when validation fails.
-
- The current rule
- The resource to use as an expression, eg () => Messages.MyResource
- Custom message format args
-
-
-
-
- Specifies a custom error message resource to use when validation fails.
-
- The current rule
- The resource to use as an expression, eg () => Messages.MyResource
- Custom message format args
-
-
-
-
- Specifies a custom error message resource to use when validation fails.
-
- The current rule
- The resource to use as an expression, eg () => Messages.MyResource
- The resource accessor builder to use.
-
-
-
-
- Specifies a custom error code to use when validation fails
-
- The current rule
- The error code to use
-
-
-
-
- Specifies a condition limiting when the validator should run.
- The validator will only be executed if the result of the lambda returns true.
-
- The current rule
- A lambda expression that specifies a condition for when the validator should run
- Whether the condition should be applied to the current rule or all rules in the chain
-
-
-
-
- Specifies a condition limiting when the validator should not run.
- The validator will only be executed if the result of the lambda returns false.
-
- The current rule
- A lambda expression that specifies a condition for when the validator should not run
- Whether the condition should be applied to the current rule or all rules in the chain
-
-
-
-
- Specifies a custom property name to use within the error message.
-
- The current rule
- The property name to use
-
-
-
-
- Specifies a localized name for the error message.
-
- The current rule
- The resource to use as an expression, eg () => Messages.MyResource
- Resource accessor builder to use
-
-
-
- Overrides the name of the property associated with this rule.
- NOTE: This is a considered to be an advanced feature. 99% of the time that you use this, you actually meant to use WithName.
-
- The current rule
- The property name to use
-
-
-
-
- Specifies custom state that should be stored alongside the validation message when validation fails for this rule.
-
-
-
-
-
-
-
-
-
- Specifies how rules should cascade when one fails.
-
-
-
-
- When a rule fails, execution continues to the next rule.
-
-
-
-
- When a rule fails, validation is stopped and all other rules in the chain will not be executed.
-
-
-
-
- Specifies where a When/Unless condition should be applied
-
-
-
-
- Applies the condition to all validators declared so far in the chain.
-
-
-
-
- Applies the condition to the current validator only.
-
-
-
-
- Validator implementation that allows rules to be defined without inheriting from AbstractValidator.
-
-
-
- public class Customer {
- public int Id { get; set; }
- public string Name { get; set; }
-
- public static readonly InlineValidator<Customer> Validator = new InlineValidator<Customer> {
- v => v.RuleFor(x => x.Name).NotNull(),
- v => v.RuleFor(x => x.Id).NotEqual(0),
- }
- }
-
-
-
-
-
-
- Allows configuration of the validator.
-
-
-
-
- Delegate that specifies configuring an InlineValidator.
-
-
-
-
- Default validator selector that will execute all rules that do not belong to a RuleSet.
-
-
-
-
- Determines whether or not a rule should execute.
-
-
-
-
- Determines whether or not a rule should execute.
-
- The rule
- Property path (eg Customer.Address.Line1)
- Contextual information
- Whether or not the validator can execute.
-
-
-
- Determines whether or not a rule should execute.
-
- The rule
- Property path (eg Customer.Address.Line1)
- Contextual information
- Whether or not the validator can execute.
-
-
-
- Custom IValidationRule for performing custom logic.
-
-
-
-
-
- Defines a rule associated with a property which can have multiple validators.
-
-
-
-
- Performs validation using a validation context and returns a collection of Validation Failures.
-
- Validation Context
- A collection of validation failures
-
-
-
- The validators that are grouped under this rule.
-
-
-
-
- Name of the rule-set to which this rule belongs.
-
-
-
-
- Creates a new DelegateValidator using the specified function to perform validation.
-
-
-
-
- Creates a new DelegateValidator using the specified function to perform validation.
-
-
-
-
- Performs validation using a validation context and returns a collection of Validation Failures.
-
- Validation Context
- A collection of validation failures
-
-
-
- Performs validation using a validation context and returns a collection of Validation Failures.
-
- Validation Context
- A collection of validation failures
-
-
-
- Rule set to which this rule belongs.
-
-
-
-
- The validators that are grouped under this rule.
-
-
-
-
- Useful extensions
-
-
-
-
- Gets a MemberInfo from a member expression.
-
-
-
-
- Gets a MemberInfo from a member expression.
-
-
-
-
- Splits pascal case, so "FooBar" would become "Foo Bar"
-
-
-
-
- Helper method to construct a constant expression from a constant.
-
- Type of object being validated
- Type of property being validated
- The value being compared
-
-
-
-
- Based on a child validator and a propery rule, infers whether the validator should be wrapped in a ChildValidatorAdaptor or a CollectionValidatorAdaptor
-
-
-
-
- Instancace cache.
- TODO: This isn't actually completely thread safe. It would be much better to use ConcurrentDictionary, but this isn't available in Silverlight/WP7.
-
-
-
-
- Gets or creates an instance using Activator.CreateInstance
-
- The type to instantiate
- The instantiated object
-
-
-
- Gets or creates an instance using a custom factory
-
- The type to instantiate
- The custom factory
- The instantiated object
-
-
-
- Selects validators that are associated with a particular property.
-
-
-
-
- Creates a new instance of MemberNameValidatorSelector.
-
-
-
-
- Determines whether or not a rule should execute.
-
- The rule
- Property path (eg Customer.Address.Line1)
- Contextual information
- Whether or not the validator can execute.
-
-
-
- Creates a MemberNameValidatorSelector from a collection of expressions.
-
-
-
-
- Assists in the construction of validation messages.
-
-
-
-
- Default Property Name placeholder.
-
-
-
-
- Adds a value for a validation message placeholder.
-
-
-
-
-
-
-
- Appends a property name to the message.
-
- The name of the property
-
-
-
-
- Adds additional arguments to the message for use with standard string placeholders.
-
- Additional arguments
-
-
-
-
- Constructs the final message from the specified template.
-
- Message template
- The message with placeholders replaced with their appropriate values
-
-
-
- Represents a chain of properties
-
-
-
-
- Creates a new PropertyChain.
-
-
-
-
- Creates a new PropertyChain based on another.
-
-
-
-
- Adds a MemberInfo instance to the chain
-
- Member to add
-
-
-
- Adds a property name to the chain
-
- Name of the property to add
-
-
-
- Adds an indexer to the property chain. For example, if the following chain has been constructed:
- Parent.Child
- then calling AddIndexer(0) would convert this to:
- Parent.Child[0]
-
-
-
-
-
- Creates a string representation of a property chain.
-
-
-
-
- Checks if the current chain is the child of another chain.
- For example, if chain1 were for "Parent.Child" and chain2 were for "Parent.Child.GrandChild" then
- chain2.IsChildChainOf(chain1) would be true.
-
- The parent chain to compare
- True if the current chain is the child of the other chain, otherwise false
-
-
-
- Builds a property path.
-
-
-
-
- Defines a rule associated with a property.
-
-
-
-
- Creates a new property rule.
-
- Property
- Function to get the property value
- Lambda expression used to create the rule
- Function to get the cascade mode.
- Type to validate
- Container type that owns the property
-
-
-
- Creates a new property rule from a lambda expression.
-
-
-
-
- Creates a new property rule from a lambda expression.
-
-
-
-
- Adds a validator to the rule.
-
-
-
-
- Replaces a validator in this rule. Used to wrap validators.
-
-
-
-
- Display name for the property.
-
-
-
-
- Performs validation using a validation context and returns a collection of Validation Failures.
-
- Validation Context
- A collection of validation failures
-
-
-
- Invokes a property validator using the specified validation context.
-
-
-
-
- Property associated with this rule.
-
-
-
-
- Function that can be invoked to retrieve the value of the property.
-
-
-
-
- Expression that was used to create the rule.
-
-
-
-
- String source that can be used to retrieve the display name (if null, falls back to the property name)
-
-
-
-
- Rule set that this rule belongs to (if specified)
-
-
-
-
- Function that will be invoked if any of the validators associated with this rule fail.
-
-
-
-
- The current validator being configured by this rule.
-
-
-
-
- Type of the property being validated
-
-
-
-
- Cascade mode for this rule.
-
-
-
-
- Validators associated with this rule.
-
-
-
-
- Returns the property name for the property being validated.
- Returns null if it is not a property being validated (eg a method call)
-
-
-
-
- Builds a validation rule and constructs a validator.
-
- Type of object being validated
- Type of property being validated
-
-
-
- Rule builder that starts the chain
-
-
-
-
-
-
- Creates a new instance of the RuleBuilder class.
-
-
-
-
- Sets the validator associated with the rule.
-
- The validator to set
-
-
-
-
- Sets the validator associated with the rule. Use with complex properties where an IValidator instance is already declared for the property type.
-
- The validator to set
-
-
-
- The rule being created by this RuleBuilder.
-
-
-
-
- Selects validators that belong to the specified rulesets.
-
-
-
-
- Creates a new instance of the RulesetValidatorSelector.
-
-
-
-
- Determines whether or not a rule should execute.
-
- The rule
- Property path (eg Customer.Address.Line1)
- Contextual information
- Whether or not the validator can execute.
-
-
-
- Provides metadata about a validator.
-
-
-
-
- Gets the name display name for a property.
-
-
-
-
- Gets a collection of validators grouped by property.
-
-
-
-
- Gets validators for a particular property.
-
-
-
-
- Gets rules for a property.
-
-
-
-
- Builds a delegate for retrieving a localised resource from a resource type and property name.
-
-
-
-
- Gets a function that can be used to retrieve a message from a resource type and resource name.
-
-
-
-
- Builds a delegate for retrieving a localised resource from a resource type and property name.
-
-
-
-
- Builds a function used to retrieve the resource.
-
-
-
-
- Gets the PropertyInfo for a resource.
- ResourceType and ResourceName are ref parameters to allow derived types
- to replace the type/name of the resource before the delegate is constructed.
-
-
-
-
- Implemenetation of IResourceAccessorBuilder that can fall back to the default resource provider.
-
-
-
-
- Gets the PropertyInfo for a resource.
- ResourceType and ResourceName are ref parameters to allow derived types
- to replace the type/name of the resource before the delegate is constructed.
-
-
-
-
- Provides error message templates
-
-
-
-
- Construct the error message template
-
- Error message template
-
-
-
- The name of the resource if localized.
-
-
-
-
- The type of the resource provider if localized.
-
-
-
-
- Represents a localized string.
-
-
-
-
- Creates a new instance of the LocalizedErrorMessageSource class using the specified resource name and resource type.
-
- The resource type
- The resource name
- Strategy used to construct the resource accessor
-
-
-
- Creates an IErrorMessageSource from an expression: () => MyResources.SomeResourceName
-
- The expression
- Strategy used to construct the resource accessor
- Error message source
-
-
-
- Construct the error message template
-
- Error message template
-
-
-
- The name of the resource if localized.
-
-
-
-
- The type of the resource provider if localized.
-
-
-
-
- A strongly-typed resource class, for looking up localized strings, etc.
-
-
-
-
- Returns the cached ResourceManager instance used by this class.
-
-
-
-
- Overrides the current thread's CurrentUICulture property for all
- resource lookups using this strongly typed resource class.
-
-
-
-
- Looks up a localized string similar to '{PropertyName}' is not a valid credit card number..
-
-
-
-
- Looks up a localized string similar to '{PropertyName}' is not a valid email address..
-
-
-
-
- Looks up a localized string similar to '{PropertyName}' should be equal to '{PropertyValue}'..
-
-
-
-
- Looks up a localized string similar to '{PropertyName}' must be {MaxLength} characters in length. You entered {TotalLength} characters..
-
-
-
-
- Looks up a localized string similar to '{PropertyName}' must be between {From} and {To} (exclusive). You entered {Value}..
-
-
-
-
- Looks up a localized string similar to '{PropertyName}' must be greater than '{ComparisonValue}'..
-
-
-
-
- Looks up a localized string similar to '{PropertyName}' must be greater than or equal to '{ComparisonValue}'..
-
-
-
-
- Looks up a localized string similar to '{PropertyName}' must be between {From} and {To}. You entered {Value}..
-
-
-
-
- Looks up a localized string similar to '{PropertyName}' must be between {MinLength} and {MaxLength} characters. You entered {TotalLength} characters..
-
-
-
-
- Looks up a localized string similar to '{PropertyName}' must be less than '{ComparisonValue}'..
-
-
-
-
- Looks up a localized string similar to '{PropertyName}' must be less than or equal to '{ComparisonValue}'..
-
-
-
-
- Looks up a localized string similar to '{PropertyName}' should not be empty..
-
-
-
-
- Looks up a localized string similar to '{PropertyName}' should not be equal to '{PropertyValue}'..
-
-
-
-
- Looks up a localized string similar to '{PropertyName}' must not be empty..
-
-
-
-
- Looks up a localized string similar to The specified condition was not met for '{PropertyName}'..
-
-
-
-
- Looks up a localized string similar to '{PropertyName}' is not in the correct format..
-
-
-
-
- Represents a static string.
-
-
-
-
- Creates a new StringErrorMessageSource using the specified error message as the error template.
-
- The error message template.
-
-
-
- Construct the error message template
-
- Error message template
-
-
-
- The name of the resource if localized.
-
-
-
-
- The type of the resource provider if localized.
-
-
-
-
- Creates a new validation failure.
-
-
-
-
- Creates a new ValidationFailure.
-
-
-
-
- Creates a textual representation of the failure.
-
-
-
-
- The name of the property.
-
-
-
-
- The error message
-
-
-
-
- The error code
-
-
-
-
- The property value that caused the failure.
-
-
-
-
- Custom state associated with the failure.
-
-
-
-
- Used for providing metadata about a validator.
-
-
-
-
- A custom property validator.
- This interface should not be implemented directly in your code as it is subject to change.
- Please inherit from PropertyValidator instead.
-
-
-
-
- Creates an error validation result for this validator.
-
- The validator context
- Returns an error validation result.
-
-
-
- Ensures that the property value is a valid credit card number.
-
-
-
-
- Provides access to the anti-forgery system, which provides protection against
- Cross-site Request Forgery (XSRF, also called CSRF) attacks.
-
-
-
-
- Generates an anti-forgery token for this request. This token can
- be validated by calling the Validate() method.
-
- An HTML string corresponding to an <input type="hidden">
- element. This element should be put inside a <form>.
-
- This method has a side effect: it may set a response cookie.
-
-
-
-
- Generates an anti-forgery token pair (cookie and form token) for this request.
- This method is similar to GetHtml(), but this method gives the caller control
- over how to persist the returned values. To validate these tokens, call the
- appropriate overload of Validate.
-
- The anti-forgery token - if any - that already existed
- for this request. May be null. The anti-forgery system will try to reuse this cookie
- value when generating a matching form token.
- Will contain a new cookie value if the old cookie token
- was null or invalid. If this value is non-null when the method completes, the caller
- must persist this value in the form of a response cookie, and the existing cookie value
- should be discarded. If this value is null when the method completes, the existing
- cookie value was valid and needn't be modified.
- The value that should be stored in the <form>. The caller
- should take care not to accidentally swap the cookie and form tokens.
-
- Unlike the GetHtml() method, this method has no side effect. The caller
- is responsible for setting the response cookie and injecting the returned
- form token as appropriate.
-
-
-
-
- Validates an anti-forgery token that was supplied for this request.
- The anti-forgery token may be generated by calling GetHtml().
-
-
- Throws an HttpAntiForgeryException if validation fails.
-
-
-
-
- Validates an anti-forgery token pair that was generated by the GetTokens method.
-
- The token that was supplied in the request cookie.
- The token that was supplied in the request form body.
-
- Throws an HttpAntiForgeryException if validation fails.
-
-
-
-
- Provides programmatic configuration for the anti-forgery token system.
-
-
-
-
- Specifies an object that can provide additional data to put into all
- generated tokens and that can validate additional data in incoming
- tokens.
-
-
-
-
- Specifies the name of the cookie that is used by the anti-forgery
- system.
-
-
- If an explicit name is not provided, the system will automatically
- generate a name.
-
-
-
-
- Specifies whether SSL is required for the anti-forgery system
- to operate. If this setting is 'true' and a non-SSL request
- comes into the system, all anti-forgery APIs will fail.
-
-
-
-
- Specifies whether the anti-forgery system should skip checking
- for conditions that might indicate misuse of the system. Please
- use caution when setting this switch, as improper use could open
- security holes in the application.
-
-
- Setting this switch will disable several checks, including:
- - Identity.IsAuthenticated = true without Identity.Name being set
- - special-casing claims-based identities
-
-
-
-
- If claims-based authorization is in use, specifies the claim
- type from the identity that is used to uniquely identify the
- user. If this property is set, all claims-based identities
- must return unique values for this claim type.
-
-
- If claims-based authorization is in use and this property has
- not been set, the anti-forgery system will automatically look
- for claim types "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"
- and "http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider".
-
-
-
-
- Allows providing or validating additional custom data for anti-forgery tokens.
- For example, the developer could use this to supply a nonce when the token is
- generated, then he could validate the nonce when the token is validated.
-
-
- The anti-forgery system already embeds the client's username within the
- generated tokens. This interface provides and consumes supplemental
- data. If an incoming anti-forgery token contains supplemental data but no
- additional data provider is configured, the supplemental data will not be
- validated.
-
-
-
-
- Provides additional data to be stored for the anti-forgery tokens generated
- during this request.
-
- Information about the current request.
- Supplemental data to embed within the anti-forgery token.
-
-
-
- Validates additional data that was embedded inside an incoming anti-forgery
- token.
-
- Information about the current request.
- Supplemental data that was embedded within the token.
- True if the data is valid; false if the data is invalid.
-
-
-
- Initializes a new instance of the class.
-
- The base scope.
-
- The dictionary to use as a storage. Since the dictionary would be used as-is, we expect the implementer to
- use the same key-value comparison logic as we do here.
-
-
-
-
- Custom comparer for the context dictionaries
- The comparer treats strings as a special case, performing case insesitive comparison.
- This guaratees that we remain consistent throughout the chain of contexts since PageData dictionary
- behaves in this manner.
-
-
-
-
- End a ServiceStack Request
-
-
-
-
- End a ServiceStack Request
-
-
-
-
- End a HttpHandler Request
-
-
-
-
- End a HttpHandler Request
-
-
-
-
- End a ServiceStack Request with no content
-
-
-
-
- Main container class for components, supporting container hierarchies and
- lifetime management of instances.
-
-
-
-
- Initializes a new empty container.
-
-
-
-
- Creates a child container of the current one, which exposes its
- current service registration to the new child container.
-
-
-
-
- Disposes the container and all instances owned by it (see
- ), as well as all child containers
- created through .
-
-
-
-
- Registers a service instance with the container. This instance
- will have and
- behavior.
- Service instance to use.
-
-
-
- Registers a named service instance with the container. This instance
- will have and
- behavior.
- Name of the service to register.Service instance to use.
-
-
-
- Retrieves a function that can be used to lazily resolve an instance
- of the service when needed.
- Type of the service to retrieve.The function that can resolve to the service instance when invoked.The requested service has not been registered previously.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Retrieves a function that can be used to lazily resolve an instance
- of the service with the given name when needed.
- Type of the service to retrieve.Name of the service to retrieve.The function that can resolve to the service instance with the given name when invoked.The requested service with the given name has not been registered previously.
-
-
-
- Retrieves a function that can be used to lazily resolve an instance
- of the service of the given type, name and service constructor arguments when needed.
- Name of the service to retrieve.The function that can resolve to the service instance with the given and service constructor arguments name when invoked.The requested service with the given name and constructor arguments has not been registered previously.
-
-
-
- Retrieves a function that can be used to lazily resolve an instance
- of the service of the given type, name and service constructor arguments when needed.
- Name of the service to retrieve.The function that can resolve to the service instance with the given and service constructor arguments name when invoked.The requested service with the given name and constructor arguments has not been registered previously.
-
-
-
- Retrieves a function that can be used to lazily resolve an instance
- of the service of the given type, name and service constructor arguments when needed.
- Name of the service to retrieve.The function that can resolve to the service instance with the given and service constructor arguments name when invoked.The requested service with the given name and constructor arguments has not been registered previously.
-
-
-
- Retrieves a function that can be used to lazily resolve an instance
- of the service of the given type, name and service constructor arguments when needed.
- Name of the service to retrieve.The function that can resolve to the service instance with the given and service constructor arguments name when invoked.The requested service with the given name and constructor arguments has not been registered previously.
-
-
-
- Retrieves a function that can be used to lazily resolve an instance
- of the service of the given type, name and service constructor arguments when needed.
- Name of the service to retrieve.The function that can resolve to the service instance with the given and service constructor arguments name when invoked.The requested service with the given name and constructor arguments has not been registered previously.
-
-
-
- Retrieves a function that can be used to lazily resolve an instance
- of the service of the given type, name and service constructor arguments when needed.
- Name of the service to retrieve.The function that can resolve to the service instance with the given and service constructor arguments name when invoked.The requested service with the given name and constructor arguments has not been registered previously.
-
-
-
- Registers the given service by providing a factory delegate to
- instantiate it.
- The service type to register.The factory delegate to initialize new instances of the service when needed.The registration object to perform further configuration via its fluent interface.
-
-
-
- Registers the given service by providing a factory delegate that receives arguments to
- instantiate it.
- The service type to register.First argument that should be passed to the factory delegate to create the instace.The factory delegate to initialize new instances of the service when needed.The registration object to perform further configuration via its fluent interface.
-
-
-
- Registers the given service by providing a factory delegate that receives arguments to
- instantiate it.
- The service type to register.First argument that should be passed to the factory delegate to create the instace.Second argument that should be passed to the factory delegate to create the instace.The factory delegate to initialize new instances of the service when needed.The registration object to perform further configuration via its fluent interface.
-
-
-
- Registers the given service by providing a factory delegate that receives arguments to
- instantiate it.
- The service type to register.First argument that should be passed to the factory delegate to create the instace.Second argument that should be passed to the factory delegate to create the instace.Third argument that should be passed to the factory delegate to create the instace.The factory delegate to initialize new instances of the service when needed.The registration object to perform further configuration via its fluent interface.
-
-
-
- Registers the given service by providing a factory delegate that receives arguments to
- instantiate it.
- The service type to register.First argument that should be passed to the factory delegate to create the instace.Second argument that should be passed to the factory delegate to create the instace.Third argument that should be passed to the factory delegate to create the instace.Fourth argument that should be passed to the factory delegate to create the instace.The factory delegate to initialize new instances of the service when needed.The registration object to perform further configuration via its fluent interface.
-
-
-
- Registers the given service by providing a factory delegate that receives arguments to
- instantiate it.
- The service type to register.First argument that should be passed to the factory delegate to create the instace.Second argument that should be passed to the factory delegate to create the instace.Third argument that should be passed to the factory delegate to create the instace.Fourth argument that should be passed to the factory delegate to create the instace.Fifth argument that should be passed to the factory delegate to create the instace.The factory delegate to initialize new instances of the service when needed.The registration object to perform further configuration via its fluent interface.
-
-
-
- Registers the given service by providing a factory delegate that receives arguments to
- instantiate it.
- The service type to register.First argument that should be passed to the factory delegate to create the instace.Second argument that should be passed to the factory delegate to create the instace.Third argument that should be passed to the factory delegate to create the instace.Fourth argument that should be passed to the factory delegate to create the instace.Fifth argument that should be passed to the factory delegate to create the instace.Sixth argument that should be passed to the factory delegate to create the instace.The factory delegate to initialize new instances of the service when needed.The registration object to perform further configuration via its fluent interface.
-
-
-
- Registers the given named service by providing a factory delegate to
- instantiate it.
- The service type to register.A name used to differenciate this service registration.The factory delegate to initialize new instances of the service when needed.The registration object to perform further configuration via its fluent interface.
-
-
-
- Registers the given named service by providing a factory delegate that receives arguments to
- instantiate it.
- The service type to register.First argument that should be passed to the factory delegate to create the instace.A name used to differenciate this service registration.The factory delegate to initialize new instances of the service when needed.The registration object to perform further configuration via its fluent interface.
-
-
-
- Registers the given named service by providing a factory delegate that receives arguments to
- instantiate it.
- The service type to register.First argument that should be passed to the factory delegate to create the instace.Second argument that should be passed to the factory delegate to create the instace.A name used to differenciate this service registration.The factory delegate to initialize new instances of the service when needed.The registration object to perform further configuration via its fluent interface.
-
-
-
- Registers the given named service by providing a factory delegate that receives arguments to
- instantiate it.
- The service type to register.First argument that should be passed to the factory delegate to create the instace.Second argument that should be passed to the factory delegate to create the instace.Third argument that should be passed to the factory delegate to create the instace.A name used to differenciate this service registration.The factory delegate to initialize new instances of the service when needed.The registration object to perform further configuration via its fluent interface.
-
-
-
- Registers the given named service by providing a factory delegate that receives arguments to
- instantiate it.
- The service type to register.First argument that should be passed to the factory delegate to create the instace.Second argument that should be passed to the factory delegate to create the instace.Third argument that should be passed to the factory delegate to create the instace.Fourth argument that should be passed to the factory delegate to create the instace.A name used to differenciate this service registration.The factory delegate to initialize new instances of the service when needed.The registration object to perform further configuration via its fluent interface.
-
-
-
- Registers the given named service by providing a factory delegate that receives arguments to
- instantiate it.
- The service type to register.First argument that should be passed to the factory delegate to create the instace.Second argument that should be passed to the factory delegate to create the instace.Third argument that should be passed to the factory delegate to create the instace.Fourth argument that should be passed to the factory delegate to create the instace.Fifth argument that should be passed to the factory delegate to create the instace.A name used to differenciate this service registration.The factory delegate to initialize new instances of the service when needed.The registration object to perform further configuration via its fluent interface.
-
-
-
- Registers the given named service by providing a factory delegate that receives arguments to
- instantiate it.
- The service type to register.First argument that should be passed to the factory delegate to create the instace.Second argument that should be passed to the factory delegate to create the instace.Third argument that should be passed to the factory delegate to create the instace.Fourth argument that should be passed to the factory delegate to create the instace.Fifth argument that should be passed to the factory delegate to create the instace.Sixth argument that should be passed to the factory delegate to create the instace.A name used to differenciate this service registration.The factory delegate to initialize new instances of the service when needed.The registration object to perform further configuration via its fluent interface.
-
-
-
- Resolves the given service by type, without passing any arguments for
- its construction.
- Type of the service to retrieve.The resolved service instance.The given service could not be resolved.
-
-
-
- Resolves the given service by type, passing the given arguments
- for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.The resolved service instance.The given service could not be resolved.
-
-
-
- Resolves the given service by type, passing the given arguments
- for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.The resolved service instance.The given service could not be resolved.
-
-
-
- Resolves the given service by type, passing the given arguments
- for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.Third argument to pass to the factory delegate that may create the instace.The resolved service instance.The given service could not be resolved.
-
-
-
- Resolves the given service by type, passing the given arguments
- for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.Third argument to pass to the factory delegate that may create the instace.Fourth argument to pass to the factory delegate that may create the instace.The resolved service instance.The given service could not be resolved.
-
-
-
- Resolves the given service by type, passing the given arguments
- for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.Third argument to pass to the factory delegate that may create the instace.Fourth argument to pass to the factory delegate that may create the instace.Fifth argument to pass to the factory delegate that may create the instace.The resolved service instance.The given service could not be resolved.
-
-
-
- Resolves the given service by type, passing the given arguments
- for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.Third argument to pass to the factory delegate that may create the instace.Fourth argument to pass to the factory delegate that may create the instace.Fifth argument to pass to the factory delegate that may create the instace.Sixth argument to pass to the factory delegate that may create the instace.The resolved service instance.The given service could not be resolved.
-
-
-
- Resolves the given service by type and name, without passing arguments for its initialization.
- Type of the service to retrieve.The resolved service instance.The given service could not be resolved.
-
-
-
- Resolves the given service by type and name, passing the given arguments
- for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.The resolved service instance.The given service could not be resolved.
-
-
-
- Resolves the given service by type and name, passing the given arguments
- for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.The resolved service instance.The given service could not be resolved.
-
-
-
- Resolves the given service by type and name, passing the given arguments
- for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.Third argument to pass to the factory delegate that may create the instace.The resolved service instance.The given service could not be resolved.
-
-
-
- Resolves the given service by type and name, passing the given arguments
- for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.Third argument to pass to the factory delegate that may create the instace.Fourth argument to pass to the factory delegate that may create the instace.The resolved service instance.The given service could not be resolved.
-
-
-
- Resolves the given service by type and name, passing the given arguments
- for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.Third argument to pass to the factory delegate that may create the instace.Fourth argument to pass to the factory delegate that may create the instace.Fifth argument to pass to the factory delegate that may create the instace.The resolved service instance.The given service could not be resolved.
-
-
-
- Resolves the given service by type and name, passing the given arguments
- for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.Third argument to pass to the factory delegate that may create the instace.Fourth argument to pass to the factory delegate that may create the instace.Fifth argument to pass to the factory delegate that may create the instace.Sixth argument to pass to the factory delegate that may create the instace.The resolved service instance.The given service could not be resolved.
-
-
-
- Attempts to resolve the given service by type, without passing arguments for its initialization.
- Type of the service to retrieve.
- The resolved service instance or if it cannot be resolved.
-
-
-
-
- Attempts to resolve the given service by type, passing the
- given arguments arguments for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.
- The resolved service instance or if it cannot be resolved.
-
-
-
-
- Attempts to resolve the given service by type, passing the
- given arguments arguments for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.
- The resolved service instance or if it cannot be resolved.
-
-
-
-
- Attempts to resolve the given service by type, passing the
- given arguments arguments for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.Third argument to pass to the factory delegate that may create the instace.
- The resolved service instance or if it cannot be resolved.
-
-
-
-
- Attempts to resolve the given service by type, passing the
- given arguments arguments for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.Third argument to pass to the factory delegate that may create the instace.Fourth argument to pass to the factory delegate that may create the instace.
- The resolved service instance or if it cannot be resolved.
-
-
-
-
- Attempts to resolve the given service by type, passing the
- given arguments arguments for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.Third argument to pass to the factory delegate that may create the instace.Fourth argument to pass to the factory delegate that may create the instace.Fifth argument to pass to the factory delegate that may create the instace.
- The resolved service instance or if it cannot be resolved.
-
-
-
-
- Attempts to resolve the given service by type, passing the
- given arguments arguments for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.Third argument to pass to the factory delegate that may create the instace.Fourth argument to pass to the factory delegate that may create the instace.Fifth argument to pass to the factory delegate that may create the instace.Sixth argument to pass to the factory delegate that may create the instace.
- The resolved service instance or if it cannot be resolved.
-
-
-
-
- Attempts to resolve the given service by type and name, without passing
- arguments arguments for its initialization.
- Type of the service to retrieve.
- The resolved service instance or if it cannot be resolved.
-
-
-
-
- Attempts to resolve the given service by type and name, passing the
- given arguments arguments for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.
- The resolved service instance or if it cannot be resolved.
-
-
-
-
- Attempts to resolve the given service by type and name, passing the
- given arguments arguments for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.
- The resolved service instance or if it cannot be resolved.
-
-
-
-
- Attempts to resolve the given service by type and name, passing the
- given arguments arguments for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.Third argument to pass to the factory delegate that may create the instace.
- The resolved service instance or if it cannot be resolved.
-
-
-
-
- Attempts to resolve the given service by type and name, passing the
- given arguments arguments for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.Third argument to pass to the factory delegate that may create the instace.Fourth argument to pass to the factory delegate that may create the instace.
- The resolved service instance or if it cannot be resolved.
-
-
-
-
- Attempts to resolve the given service by type and name, passing the
- given arguments arguments for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.Third argument to pass to the factory delegate that may create the instace.Fourth argument to pass to the factory delegate that may create the instace.Fifth argument to pass to the factory delegate that may create the instace.
- The resolved service instance or if it cannot be resolved.
-
-
-
-
- Attempts to resolve the given service by type and name, passing the
- given arguments arguments for its initialization.
- Type of the service to retrieve.First argument to pass to the factory delegate that may create the instace.Second argument to pass to the factory delegate that may create the instace.Third argument to pass to the factory delegate that may create the instace.Fourth argument to pass to the factory delegate that may create the instace.Fifth argument to pass to the factory delegate that may create the instace.Sixth argument to pass to the factory delegate that may create the instace.
- The resolved service instance or if it cannot be resolved.
-
-
-
-
- Register an autowired dependency
-
-
-
-
-
- Register an autowired dependency as a separate type
-
-
-
-
-
- Alias for RegisterAutoWiredAs
-
-
-
-
-
- Auto-wires an existing instance,
- ie all public properties are tried to be resolved.
-
-
-
-
-
- Generates a function which creates and auto-wires .
-
-
-
-
-
-
-
- Auto-wires an existing instance of a specific type.
- The auto-wiring progress is also cached to be faster
- when calling next time with the same type.
-
-
-
-
-
- Default owner for new registrations. by default.
-
-
-
-
- Default reuse scope for new registrations. by default.
-
-
-
-
- Enable the Registration feature and configure the RegistrationService.
-
-
-
-
- Registers the type in the IoC container and
- adds auto-wiring to the specified type.
-
-
-
-
-
-
- Registers the type in the IoC container and
- adds auto-wiring to the specified type.
- The reuse scope is set to none (transient).
-
-
-
-
-
- Registers the types in the IoC container and
- adds auto-wiring to the specified types.
- The reuse scope is set to none (transient).
-
-
-
-
-
- Register a singleton instance as a runtime type
-
-
-
-
- Encapsulates a method that has five parameters and returns a value of the
- type specified by the parameter.
-
-
-
-
- Encapsulates a method that has six parameters and returns a value of the
- type specified by the parameter.
-
-
-
-
- Encapsulates a method that has seven parameters and returns a value of the
- type specified by the parameter.
-
-
-
-
- Helper interface used to hide the base
- members from the fluent API to make for much cleaner
- Visual Studio intellisense experience.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Interface used by plugins to contribute registrations
- to an existing container.
-
-
-
-
- Determines who is responsible for disposing instances
- registered with a container.
-
-
-
-
- Container should dispose provided instances when it is disposed. This is the
- default.
-
-
-
-
- Container does not dispose provided instances.
-
-
-
-
- Default owner, which equals .
-
-
-
-
- Exception thrown by the container when a service cannot be resolved.
-
-
-
-
- Initializes the exception with the service that could not be resolved.
-
-
-
-
- Initializes the exception with the service (and its name) that could not be resolved.
-
-
-
-
- Initializes the exception with an arbitrary message.
-
-
-
-
- Determines visibility and reuse of instances provided by the container.
-
-
-
-
- Instances are reused within a container hierarchy. Instances
- are created (if necessary) in the container where the registration
- was performed, and are reused by all descendent containers.
-
-
-
-
- Instances are reused only at the given container. Descendent
- containers do not reuse parent container instances and get
- a new instance at their level.
-
-
-
-
- Each request to resolve the dependency will result in a new
- instance being returned.
-
-
-
-
- Instaces are reused within the given request
-
-
-
-
- Default scope, which equals .
-
-
-
-
- Fluent API for customizing the registration of a service.
-
-
-
-
- Fluent API that exposes both
- and owner ().
-
-
-
-
- Fluent API that allows specifying the reuse instances.
-
-
-
-
- Specifies how instances are reused within a container or hierarchy. Default
- scope is .
-
-
-
-
- Fluent API that allows specifying the owner of instances
- created from a registration.
-
-
-
-
- Specifies the owner of instances created from this registration. Default
- owner is .
-
-
-
-
- Ownership setting for the service.
-
-
-
-
- Reuse scope setting for the service.
-
-
-
-
- The container where the entry was registered.
-
-
-
-
- Specifies the owner for instances, which determines how
- they will be disposed.
-
-
-
-
- Specifies the scope for instances, which determines
- visibility of instances across containers and hierarchies.
-
-
-
-
- Fluent API for customizing the registration of a service.
-
-
-
-
- Fluent API that allows registering an initializer for the
- service.
-
-
-
-
- Specifies an initializer that should be invoked after
- the service instance has been created by the factory.
-
-
-
-
- The Func delegate that creates instances of the service.
-
-
-
-
- The cached service instance if the scope is or
- .
-
-
-
-
- The Func delegate that initializes the object after creation.
-
-
-
-
- Clones the service entry assigning the to the
- . Does not copy the .
-
-
-
-
- BaseProfilerProvider. This providers some helper methods which provide access to
- internals not otherwise available.
- To use, override the , and
- methods.
-
-
-
-
- A provider used to create instances and maintain the current instance.
-
-
-
-
- Starts a new MiniProfiler and sets it to be current. By the end of this method
- should return the new MiniProfiler.
-
-
-
-
- Ends the current profiling session, if one exists.
-
-
- When true, clears the for this HttpContext, allowing profiling to
- be prematurely stopped and discarded. Useful for when a specific route does not need to be profiled.
-
-
-
-
- Returns the current MiniProfiler. This is used by .
-
-
-
-
-
- Starts a new MiniProfiler and sets it to be current. By the end of this method
- should return the new MiniProfiler.
-
-
-
-
- Stops the current MiniProfiler (if any is currently running).
- should be called if is false
-
- If true, any current results will be thrown away and nothing saved
-
-
-
- Returns the current MiniProfiler. This is used by .
-
-
-
-
-
- Sets to be active (read to start profiling)
- This should be called once a new MiniProfiler has been created.
-
- The profiler to set to active
- If is null
-
-
-
- Stops the profiler and marks it as inactive.
-
- The profiler to stop
- True if successful, false if Stop had previously been called on this profiler
- If is null
-
-
-
- Calls to save the current
- profiler using the current storage settings
-
-
-
-
-
- Categories of sql statements.
-
-
-
-
- Unknown
-
-
-
-
- DML statements that alter database state, e.g. INSERT, UPDATE
-
-
-
-
- Statements that return a single record
-
-
-
-
- Statements that iterate over a result set
-
-
-
-
- A callback for ProfiledDbConnection and family
-
-
-
-
- Called when a command starts executing
-
-
-
-
-
-
- Called when a reader finishes executing
-
-
-
-
-
-
-
- Called when a reader is done iterating through the data
-
-
-
-
-
- Called when an error happens during execution of a command
-
-
-
-
-
-
-
- True if the profiler instance is active
-
-
-
-
- This is a micro-cache; suitable when the number of terms is controllable (a few hundred, for example),
- and strictly append-only; you cannot change existing values. All key matches are on **REFERENCE**
- equality. The type is fully thread-safe.
-
-
-
-
- If the underlying command supports BindByName, this sets/clears the underlying
- implementation accordingly. This is required to support OracleCommand from dapper-dot-net
-
-
-
-
- Wraps a database connection, allowing sql execution timings to be collected when a session is started.
-
-
-
-
- This will be made private; use
-
-
-
-
- This will be made private; use
-
-
-
-
- Returns a new that wraps ,
- providing query execution profiling. If profiler is null, no profiling will occur.
-
- Your provider-specific flavor of connection, e.g. SqlConnection, OracleConnection
- The currently started or null.
- Determines whether the ProfiledDbConnection will dispose the underlying connection.
-
-
-
- The underlying, real database connection to your db provider.
-
-
-
-
- The current profiler instance; could be null.
-
-
-
-
- The raw connection this is wrapping
-
-
-
-
- Wrapper for a db provider factory to enable profiling
-
-
-
-
- Every provider factory must have an Instance public field
-
-
-
-
- Used for db provider apis internally
-
-
-
-
- Allow to re-init the provider factory.
-
-
-
-
-
-
- proxy
-
-
-
-
-
-
- proxy
-
-
-
-
- proxy
-
-
-
-
- proxy
-
-
-
-
- proxy
-
-
-
-
- proxy
-
-
-
-
- proxy
-
-
-
-
- proxy
-
-
-
-
- proxy
-
-
-
-
- proxy
-
-
-
-
- Common extension methods to use only in this project
-
-
-
-
- Answers true if this String is either null or empty.
-
-
-
-
- Answers true if this String is neither null or empty.
-
-
-
-
- Removes trailing / characters from a path and leaves just one
-
-
-
-
- Removes any leading / characters from a path
-
-
-
-
- Removes any leading / characters from a path
-
-
-
-
- Serializes to a json string.
-
-
-
-
- Gets part of a stack trace containing only methods we care about.
-
-
-
-
- Gets the current formatted and filted stack trace.
-
- Space separated list of methods
-
-
-
- Identifies users based on ip address.
-
-
-
-
- Provides functionality to identify which user is profiling a request.
-
-
-
-
- Returns a string to identify the user profiling the current 'request'.
-
- The current HttpRequest being profiled.
-
-
-
- Returns the paramter HttpRequest's client ip address.
-
-
-
-
- A single MiniProfiler can be used to represent any number of steps/levels in a call-graph, via Step()
-
- Totally baller.
-
-
-
- Starts when this profiler is instantiated. Each step will use this Stopwatch's current ticks as
- their starting time.
-
-
-
-
- Creates and starts a new MiniProfiler for the root , filtering steps to .
-
-
-
-
- Returns the 's and this profiler recorded.
-
-
-
-
- Returns true if Ids match.
-
-
-
-
- Returns hashcode of Id.
-
-
-
-
- Obsolete - used for serialization.
-
-
-
-
- Walks the hierarchy contained in this profiler, starting with , and returns each Timing found.
-
-
-
-
- Returns milliseconds based on Stopwatch's Frequency.
-
-
-
-
- Starts a new MiniProfiler based on the current . This new profiler can be accessed by
-
-
-
-
-
- Ends the current profiling session, if one exists.
-
-
- When true, clears the for this HttpContext, allowing profiling to
- be prematurely stopped and discarded. Useful for when a specific route does not need to be profiled.
-
-
-
-
- Returns an that will time the code between its creation and disposal. Use this method when you
- do not wish to include the MvcMiniProfiler namespace for the extension method.
-
- A descriptive name for the code that is encapsulated by the resulting IDisposable's lifetime.
- This step's visibility level; allows filtering when is called.
-
-
-
- Returns the css and javascript includes needed to display the MiniProfiler results UI.
-
- Which side of the page the profiler popup button should be displayed on (defaults to left)
- Whether to show trivial timings by default (defaults to false)
- Whether to show time the time with children column by default (defaults to false)
- The maximum number of trace popups to show before removing the oldest (defaults to 15)
- xhtml rendering mode, ensure script tag is closed ... etc
- when true, shows buttons to minimize and clear MiniProfiler results
- Script and link elements normally; an empty string when there is no active profiling session.
-
-
-
- Renders the current to json.
-
-
-
-
- Renders the parameter to json.
-
-
-
-
- Deserializes the json string parameter to a .
-
-
-
-
- Create a DEEP clone of this object
-
-
-
-
-
- Returns all currently open commands on this connection
-
-
-
-
- Returns all results contained in all child steps.
-
-
-
-
- Contains any sql statements that are executed, along with how many times those statements are executed.
-
-
-
-
- Adds to the current .
-
-
-
-
- Returns the number of sql statements of that were executed in all s.
-
-
-
-
- Identifies this Profiler so it may be stored/cached.
-
-
-
-
- A display name for this profiling session.
-
-
-
-
- When this profiler was instantiated.
-
-
-
-
- Where this profiler was run.
-
-
-
-
- Allows filtering of steps based on what
- the steps are created with.
-
-
-
-
- The first that is created and started when this profiler is instantiated.
- All other s will be children of this one.
-
-
-
-
- A string identifying the user/client that is profiling this request. Set
- with an -implementing class to provide a custom value.
-
-
- If this is not set manually at some point, the implementation will be used;
- by default, this will be the current request's ip address.
-
-
-
-
- Returns true when this MiniProfiler has been viewed by the that recorded it.
-
-
- Allows POSTs that result in a redirect to be profiled. implementation
- will keep a list of all profilers that haven't been fetched down.
-
-
-
-
- For unit testing, returns the timer.
-
-
-
-
- Milliseconds, to one decimal place, that this MiniProfiler ran.
-
-
-
-
- Returns true when or any of its are .
-
-
-
-
- Returns true when all child s are .
-
-
-
-
- Any Timing step with a duration less than or equal to this will be hidden by default in the UI; defaults to 2.0 ms.
-
-
-
-
- Ticks since this MiniProfiler was started.
-
-
-
-
- Json representing the collection of CustomTimings relating to this Profiler
-
-
- Is used when storing the Profiler in SqlStorage
-
-
-
-
- Points to the currently executing Timing.
-
-
-
-
- Gets the currently running MiniProfiler for the current HttpContext; null if no MiniProfiler was ed.
-
-
-
-
- Contains information about queries executed during this profiling session.
-
-
-
-
- Milliseconds, to one decimal place, that this MiniProfiler was executing sql.
-
-
-
-
- Returns true when we have profiled queries.
-
-
-
-
- Returns true when any child Timings have duplicate queries.
-
-
-
-
- How many sql data readers were executed in all steps.
-
-
-
-
- How many sql scalar queries were executed in all steps.
-
-
-
-
- How many sql non-query statements were executed in all steps.
-
-
-
-
- Various configuration properties.
-
-
-
-
- Excludes the specified assembly from the stack trace output.
-
- The short name of the assembly. AssemblyName.Name
-
-
-
- Excludes the specified type from the stack trace output.
-
- The System.Type name to exclude
-
-
-
- Excludes the specified method name from the stack trace output.
-
- The name of the method
-
-
-
- Make sure we can at least store profiler results to the http runtime cache.
-
-
-
-
- Assemblies to exclude from the stack trace report.
-
-
-
-
- Types to exclude from the stack trace report.
-
-
-
-
- Methods to exclude from the stack trace report.
-
-
-
-
- The max length of the stack string to report back; defaults to 120 chars.
-
-
-
-
- Any Timing step with a duration less than or equal to this will be hidden by default in the UI; defaults to 2.0 ms.
-
-
-
-
- Dictates if the "time with children" column is displayed by default, defaults to false.
- For a per-page override you can use .RenderIncludes(showTimeWithChildren: true/false)
-
-
-
-
- Dictates if trivial timings are displayed by default, defaults to false.
- For a per-page override you can use .RenderIncludes(showTrivial: true/false)
-
-
-
-
- Determines how many traces to show before removing the oldest; defaults to 15.
- For a per-page override you can use .RenderIncludes(maxTracesToShow: 10)
-
-
-
-
- Dictates on which side of the page the profiler popup button is displayed; defaults to left.
- For a per-page override you can use .RenderIncludes(position: RenderPosition.Left/Right)
-
-
-
-
- Determines if min-max, clear, etc are rendered; defaults to false.
- For a per-page override you can use .RenderIncludes(showControls: true/false)
-
-
-
-
- By default, SqlTimings will grab a stack trace to help locate where queries are being executed.
- When this setting is true, no stack trace will be collected, possibly improving profiler performance.
-
-
-
-
- When is called, if the current request url contains any items in this property,
- no profiler will be instantiated and no results will be displayed.
- Default value is { "/ssr-", "/content/", "/scripts/", "/favicon.ico" }.
-
-
-
-
- The path under which ALL routes are registered in, defaults to the application root. For example, "~/myDirectory/" would yield
- "/myDirectory/ssr-includes.js" rather than just "/mini-profiler-includes.js"
- Any setting here should be in APP RELATIVE FORM, e.g. "~/myDirectory/"
-
-
-
-
- Understands how to save and load MiniProfilers. Used for caching between when
- a profiling session ends and results can be fetched to the client, and for showing shared, full-page results.
-
-
- The normal profiling session life-cycle is as follows:
- 1) request begins
- 2) profiler is started
- 3) normal page/controller/request execution
- 4) profiler is stopped
- 5) profiler is cached with 's implementation of
- 6) request ends
- 7) page is displayed and profiling results are ajax-fetched down, pulling cached results from
- 's implementation of
-
-
-
-
- The formatter applied to the SQL being rendered (used only for UI)
-
-
-
-
- Assembly version of this dank MiniProfiler.
-
-
-
-
- The provider used to provider the current instance of a provider
- This is also
-
-
-
-
- A function that determines who can access the MiniProfiler results url. It should return true when
- the request client has access, false for a 401 to be returned. HttpRequest parameter is the current request and
- MiniProfiler parameter is the results that were profiled.
-
-
- Both the HttpRequest and MiniProfiler parameters that will be passed into this function should never be null.
-
-
-
-
- Allows switching out stopwatches for unit testing.
-
-
-
-
- Categorizes individual steps to allow filtering.
-
-
-
-
- Default level given to Timings.
-
-
-
-
- Useful when profiling many items in a loop, but you don't wish to always see this detail.
-
-
-
-
- Dictates on which side of the page the profiler popup button is displayed; defaults to left.
-
-
-
-
- Profiler popup button is displayed on the left.
-
-
-
-
- Profiler popup button is displayed on the right.
-
-
-
-
- Contains helper methods that ease working with null s.
-
-
-
-
- Wraps in a call and executes it, returning its result.
-
- The current profiling session or null.
- Method to execute and profile.
- The step name used to label the profiler results.
-
-
-
-
- Returns an that will time the code between its creation and disposal.
-
- The current profiling session or null.
- A descriptive name for the code that is encapsulated by the resulting IDisposable's lifetime.
- This step's visibility level; allows filtering when is called.
-
-
-
- Adds 's hierarchy to this profiler's current Timing step,
- allowing other threads, remote calls, etc. to be profiled and joined into this profiling session.
-
-
-
-
- Returns an html-encoded string with a text-representation of ; returns "" when profiler is null.
-
- The current profiling session or null.
-
-
-
- Formats any SQL query with inline parameters, optionally including the value type
-
-
-
-
- Takes a SqlTiming and returns a formatted SQL string, for parameter replacement, etc.
-
-
-
-
- Return SQL the way you want it to look on the in the trace. Usually used to format parameters
-
-
- Formatted SQL
-
-
-
- Creates a new Inline SQL Formatter, optionally including the parameter type info in comments beside the replaced value
-
- whether to include a comment after the value, indicating the type, e.g. /* @myParam DbType.Int32 */
-
-
-
- Formats the SQL in a generic frieldly format, including the parameter type information in a comment if it was specified in the InlineFormatter constructor
-
- The SqlTiming to format
- A formatted SQL string
-
-
-
- Returns a string representation of the parameter's value, including the type
-
- The parameter to get a value for
-
-
-
-
- NOT IMPLEMENTED - will format statements with paramters in an Oracle friendly way
-
-
-
-
- Does NOTHING, implement me!
-
-
-
-
- Formats SQL server queries with a DECLARE up top for parameter values
-
-
-
-
- Formats the SQL in a SQL-Server friendly way, with DECLARE statements for the parameters up top.
-
- The SqlTiming to format
- A formatted SQL string
-
-
-
- Contains helper code to time sql statements.
-
-
-
-
- Returns a new SqlProfiler to be used in the 'profiler' session.
-
-
-
-
- Tracks when 'command' is started.
-
-
-
-
- Returns all currently open commands on this connection
-
-
-
-
- Finishes profiling for 'command', recording durations.
-
-
-
-
- Called when 'reader' finishes its iterations and is closed.
-
-
-
-
- The profiling session this SqlProfiler is part of.
-
-
-
-
- Helper methods that allow operation on SqlProfilers, regardless of their instantiation.
-
-
-
-
- Tracks when 'command' is started.
-
-
-
-
- Finishes profiling for 'command', recording durations.
-
-
-
-
- Called when 'reader' finishes its iterations and is closed.
-
-
-
-
- Profiles a single sql execution.
-
-
-
-
- Creates a new SqlTiming to profile 'command'.
-
-
-
-
- Obsolete - used for serialization.
-
-
-
-
- Returns a snippet of the sql command and the duration.
-
-
-
-
- Returns true if Ids match.
-
-
-
-
- Returns hashcode of Id.
-
-
-
-
- Called when command execution is finished to determine this SqlTiming's duration.
-
-
-
-
- Called when database reader is closed, ending profiling for SqlTimings.
-
-
-
-
- To help with display, put some space around sammiched commas
-
-
-
-
- Unique identifier for this SqlTiming.
-
-
-
-
- Category of sql statement executed.
-
-
-
-
- The sql that was executed.
-
-
-
-
- The command string with special formatting applied based on MiniProfiler.Settings.SqlFormatter
-
-
-
-
- Roughly where in the calling code that this sql was executed.
-
-
-
-
- Offset from main MiniProfiler start that this sql began.
-
-
-
-
- How long this sql statement took to execute.
-
-
-
-
- When executing readers, how long it took to come back initially from the database,
- before all records are fetched and reader is closed.
-
-
-
-
- Stores any parameter names and values used by the profiled DbCommand.
-
-
-
-
- Id of the Timing this statement was executed in.
-
-
- Needed for database deserialization.
-
-
-
-
- The Timing step that this sql execution occurred in.
-
-
-
-
- True when other identical sql statements have been executed during this MiniProfiler session.
-
-
-
-
- Information about a DbParameter used in the sql statement profiled by SqlTiming.
-
-
-
-
- Returns true if this has the same parent , and as .
-
-
-
-
- Returns the XOR of certain properties.
-
-
-
-
- Which SqlTiming this Parameter was executed with.
-
-
-
-
- Parameter name, e.g. "@routeName"
-
-
-
-
- The value submitted to the database.
-
-
-
-
- System.Data.DbType, e.g. "String", "Bit"
-
-
-
-
- How large the type is, e.g. for string, size could be 4000
-
-
-
-
- Understands how to save MiniProfiler results to a MSSQL database, allowing more permanent storage and
- querying of slow results.
-
-
-
-
- Provides saving and loading s to a storage medium.
-
-
-
-
- Stores under its .
-
- The results of a profiling session.
-
- Should also ensure the profiler is stored as being unviewed by its profiling .
-
-
-
-
- Returns a from storage based on , which should map to .
-
-
- Should also update that the resulting profiler has been marked as viewed by its profiling .
-
-
-
-
- Returns a list of s that haven't been seen by .
-
- User identified by the current .
-
-
-
- Returns a new SqlServerDatabaseStorage object that will insert into the database identified by connectionString.
-
-
-
-
- Saves 'profiler' to a database under its .
-
-
-
-
- Returns the MiniProfiler identified by 'id' from the database or null when no MiniProfiler exists under that 'id'.
-
-
-
-
- Returns a list of s that haven't been seen by .
-
- User identified by the current .
-
-
-
- Returns a DbConnection for your specific provider.
-
-
-
-
- Returns a DbConnection already opened for execution.
-
-
-
-
- How we connect to the database used to save/load MiniProfiler results.
-
-
-
-
- Understands how to store a to the with absolute expiration.
-
-
-
-
- The string that prefixes all keys that MiniProfilers are saved under, e.g.
- "mini-profiler-ecfb0050-7ce8-4bf1-bf82-2cb38e90e31e".
-
-
-
-
- Returns a new HttpRuntimeCacheStorage class that will cache MiniProfilers for the specified duration.
-
-
-
-
- Saves to the HttpRuntime.Cache under a key concated with
- and the parameter's .
-
-
-
-
- Returns the saved identified by . Also marks the resulting
- profiler to true.
-
-
-
-
- Returns a list of s that haven't been seen by .
-
- User identified by the current .
-
-
-
- Syncs access to runtime cache when adding a new list of ids for a user.
-
-
-
-
- How long to cache each for (i.e. the absolute expiration parameter of
- )
-
-
-
-
- An individual profiling step that can contain child steps.
-
-
-
-
- Rebuilds all the parent timings on deserialization calls
-
-
-
-
- Offset from parent MiniProfiler's creation that this Timing was created.
-
-
-
-
- Creates a new Timing named 'name' in the 'profiler's session, with 'parent' as this Timing's immediate ancestor.
-
-
-
-
- Obsolete - used for serialization.
-
-
-
-
- Returns this Timing's Name.
-
-
-
-
- Returns true if Ids match.
-
-
-
-
- Returns hashcode of Id.
-
-
-
-
- Adds arbitrary string 'value' under 'key', allowing custom properties to be stored in this Timing step.
-
-
-
-
- Completes this Timing's duration and sets the MiniProfiler's Head up one level.
-
-
-
-
- Add the parameter 'timing' to this Timing's Children collection.
-
-
- Used outside this assembly for custom deserialization when creating an implementation.
-
-
-
-
- Adds the parameter 'sqlTiming' to this Timing's SqlTimings collection.
-
- A sql statement profiling that was executed in this Timing step.
-
- Used outside this assembly for custom deserialization when creating an implementation.
-
-
-
-
- Returns the number of sql statements of that were executed in this .
-
-
-
-
- Unique identifer for this timing; set during construction.
-
-
-
-
- Text displayed when this Timing is rendered.
-
-
-
-
- How long this Timing step took in ms; includes any Timings' durations.
-
-
-
-
- The offset from the start of profiling.
-
-
-
-
- All sub-steps that occur within this Timing step. Add new children through
-
-
-
-
- Stores arbitrary key/value strings on this Timing step. Add new tuples through .
-
-
-
-
- Any queries that occurred during this Timing step.
-
-
-
-
- Needed for database deserialization and JSON serialization.
-
-
-
-
- Which Timing this Timing is under - the duration that this step takes will be added to its parent's duration.
-
- This will be null for the root (initial) Timing.
-
-
-
- Gets the elapsed milliseconds in this step without any children's durations.
-
-
-
-
- Gets the aggregate elapsed milliseconds of all SqlTimings executed in this Timing, excluding Children Timings.
-
-
-
-
- Returns true when this is less than the configured
- , by default 2.0 ms.
-
-
-
-
- Reference to the containing profiler, allowing this Timing to affect the Head and get Stopwatch readings.
-
-
-
-
- Returns true when this Timing has inner Timing steps.
-
-
-
-
- Returns true if this Timing step collected sql execution timings.
-
-
-
-
- Returns true if any s executed in this step are detected as duplicate statements.
-
-
-
-
- Returns true when this Timing is the first one created in a MiniProfiler session.
-
-
-
-
- How far away this Timing is from the Profiler's Root.
-
-
-
-
- How many sql data readers were executed in this Timing step. Does not include queries in any child Timings.
-
-
-
-
- How many sql scalar queries were executed in this Timing step. Does not include queries in any child Timings.
-
-
-
-
- How many sql non-query statements were executed in this Timing step. Does not include queries in any child Timings.
-
-
-
-
- Understands how to route and respond to MiniProfiler UI urls.
-
-
-
-
- Returns either includes' css/javascript or results' html.
-
-
-
-
- Handles rendering static content files.
-
-
-
-
- Handles rendering a previous MiniProfiler session, identified by its "?id=GUID" on the query.
-
-
-
-
- Embedded resource contents keyed by filename.
-
-
-
-
- Helper method that sets a proper 404 response code.
-
-
-
-
- Try to keep everything static so we can easily be reused.
-
-
-
-
- HttpContext based profiler provider. This is the default provider to use in a web context.
- The current profiler is associated with a HttpContext.Current ensuring that profilers are
- specific to a individual HttpRequest.
-
-
-
-
- Public constructor. This also registers any UI routes needed to display results
-
-
-
-
- Starts a new MiniProfiler and associates it with the current .
-
-
-
-
- Ends the current profiling session, if one exists.
-
-
- When true, clears the for this HttpContext, allowing profiling to
- be prematurely stopped and discarded. Useful for when a specific route does not need to be profiled.
-
-
-
-
- Makes sure 'profiler' has a Name, pulling it from route data or url.
-
-
-
-
- Returns the current profiler
-
-
-
-
-
- Gets the currently running MiniProfiler for the current HttpContext; null if no MiniProfiler was ed.
-
-
-
-
- WebRequestProfilerProvider specific configurations
-
-
-
-
- Provides user identification for a given profiling request.
-
-
-
-
- Indicates that the request dto, which is associated with this attribute,
- can only execute, if the user has specific permissions.
-
-
-
-
- Indicates that the request dto, which is associated with this attribute,
- can only execute, if the user has specific roles.
-
-
-
-
- Check all session is in all supplied roles otherwise a 401 HttpError is thrown
-
-
-
-
-
-
- Indicates that the request dto, which is associated with this attribute,
- can only execute, if the user has specific permissions.
-
-
-
-
- Indicates that the request dto, which is associated with this attribute,
- can only execute, if the user has any of the specified roles.
-
-
-
-
- Check all session is in any supplied roles otherwise a 401 HttpError is thrown
-
-
-
-
-
-
- Base class to create response filter attributes only for specific HTTP methods (GET, POST...)
-
-
-
-
- Creates a new
-
- Defines when the filter should be executed
-
-
-
- This method is only executed if the HTTP method matches the property.
-
- The http request wrapper
- The http response wrapper
- The response DTO
-
-
-
- Create a ShallowCopy of this instance.
-
-
-
-
-
- If they don't have an ICacheClient configured use an In Memory one.
-
-
-
-
- Creates instance using straight Resolve approach.
- This will throw an exception if resolution fails
-
-
-
-
- Creates instance using the TryResolve approach if tryResolve = true.
- Otherwise uses Resolve approach, which will throw an exception if resolution fails
-
-
-
-
- Sets a persistent cookie which never expires
-
-
-
-
- Sets a session cookie which expires after the browser session closes
-
-
-
-
- Deletes a specified cookie by setting its value to empty and expiration to -1 days
-
-
-
-
- Lets you Register new Services and the optional restPaths will be registered against
- this default Request Type
-
-
-
-
- Naming convention for the ResponseStatus property name on the response DTO
-
-
-
-
- Create an instance of the service response dto type and inject it with the supplied responseStatus
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Override to provide additional/less context about the Service Exception.
- By default the request is serialized and appended to the ResponseStatus StackTrace.
-
-
-
-
- Scans the supplied Assemblies to infer REST paths and HTTP verbs.
-
- The instance.
-
- The assemblies with REST services.
-
- The same instance;
- never .
-
-
-
- Configure ServiceStack to have ISession support
-
-
-
-
- Create the active Session or Permanent Session Id cookie.
-
-
-
-
-
- Create both Permanent and Session Id cookies and return the active sessionId
-
-
-
-
-
- This class interecepts 401 requests and changes them to 402 errors. When this happens the FormAuthentication module
- will no longer hijack it and redirect back to login because it is a 402 error, not a 401.
- When the request ends, this class sets the status code back to 401 and everything works as it should.
-
- PathToSupress is the path inside your website where the above swap should happen.
-
- If you can build for .net 4.5, you do not have to do this swap. You can take advantage of a new flag (SuppressFormsAuthenticationRedirect)
- that tells the FormAuthenticationModule to not redirect, which also means you will not need the EndRequest code.
-
-
-
-
- Converts the validation result to an error result which will be serialized by ServiceStack in a clean and human-readable way.
-
- The validation result
-
-
-
-
- Converts the validation result to an error exception which will be serialized by ServiceStack in a clean and human-readable way
- if the returned exception is thrown.
-
- The validation result
-
-
-
-
- Creates a new instance of the RulesetValidatorSelector.
-
-
-
-
- Determines whether or not a rule should execute.
-
- The rule
- Property path (eg Customer.Address.Line1)
- Contextual information
- Whether or not the validator can execute.
-
-
-
- Activate the validation mechanism, so every request DTO with an existing validator
- will be validated.
-
- The app host
-
-
-
- Override to provide additional/less context about the Service Exception.
- By default the request is serialized and appended to the ResponseStatus StackTrace.
-
-
-
-
- Auto-scans the provided assemblies for a
- and registers it in the provided IoC container.
-
- The IoC container
- The assemblies to scan for a validator
-
-
-
- In Memory repository for files. Useful for testing.
-
-
-
-
- Context to capture IService action
-
-
-
-
- Get an IAppHost container.
- Note: Registering dependencies should only be done during setup/configuration
- stage and remain immutable there after for thread-safety.
-
-
-
-
-
-
- Ensure the same instance is used for subclasses
-
-
-
-
- Called before page is executed
-
-
-
-
- Called after page is executed but before it's merged with the
- website template if any.
-
-
-
-
- Don't HTML encode safe output
-
-
-
-
-
-
- Return the output of a different view with the specified name
- using the supplied model
-
-
-
-
-
-
-
- Resolve registered Assemblies
-
-
-
-
-
- Reference to MarkdownViewEngine
-
-
-
-
- The AppHost so you can access configuration and resolve dependencies, etc.
-
-
-
-
- This precompiled Markdown page with Metadata
-
-
-
-
- ASP.NET MVC's HtmlHelper
-
-
-
-
- All variables passed to and created by your page.
- The Response DTO is stored and accessible via the 'Model' variable.
-
- All variables and outputs created are stored in ScopeArgs which is what's available
- to your website template. The Generated page is stored in the 'Body' variable.
-
-
-
-
- Whether HTML or Markdown output is requested
-
-
-
-
- The Response DTO
-
-
-
-
- A strongly-typed resource class, for looking up localized strings, etc.
-
-
-
-
- Returns the cached ResourceManager instance used by this class.
-
-
-
-
- Overrides the current thread's CurrentUICulture property for all
- resource lookups using this strongly typed resource class.
-
-
-
-
- Looks up a localized string similar to Container service is built-in and read-only..
-
-
-
-
- Looks up a localized string similar to Service type {0} does not inherit or implement {1}..
-
-
-
-
- Looks up a localized string similar to Required dependency of type {0} named '{1}' could not be resolved..
-
-
-
-
- Looks up a localized string similar to Required dependency of type {0} could not be resolved..
-
-
-
-
- Looks up a localized string similar to Unknown scope..
-
-
-
-
- Gets string value from Items[name] then Cookies[name] if exists.
- Useful when *first* setting the users response cookie in the request filter.
- To access the value for this initial request you need to set it in Items[].
-
- string value or null if it doesn't exist
-
-
-
- Gets request paramater string value by looking in the following order:
- - QueryString[name]
- - FormData[name]
- - Cookies[name]
- - Items[name]
-
- string value or null if it doesn't exist
-
-
- *
- Input: http://localhost:96/Cambia3/Temp/Test.aspx/path/info?q=item#fragment
-
- Some HttpRequest path and URL properties:
- Request.ApplicationPath: /Cambia3
- Request.CurrentExecutionFilePath: /Cambia3/Temp/Test.aspx
- Request.FilePath: /Cambia3/Temp/Test.aspx
- Request.Path: /Cambia3/Temp/Test.aspx/path/info
- Request.PathInfo: /path/info
- Request.PhysicalApplicationPath: D:\Inetpub\wwwroot\CambiaWeb\Cambia3\
- Request.QueryString: /Cambia3/Temp/Test.aspx/path/info?query=arg
- Request.Url.AbsolutePath: /Cambia3/Temp/Test.aspx/path/info
- Request.Url.AbsoluteUri: http://localhost:96/Cambia3/Temp/Test.aspx/path/info?query=arg
- Request.Url.Fragment:
- Request.Url.Host: localhost
- Request.Url.LocalPath: /Cambia3/Temp/Test.aspx/path/info
- Request.Url.PathAndQuery: /Cambia3/Temp/Test.aspx/path/info?query=arg
- Request.Url.Port: 96
- Request.Url.Query: ?query=arg
- Request.Url.Scheme: http
- Request.Url.Segments: /
- Cambia3/
- Temp/
- Test.aspx/
- path/
- info
- *
-
-
-
- Use this to treat Request.Items[] as a cache by returning pre-computed items to save
- calculating them multiple times.
-
-
-
-
- Sets a persistent cookie which never expires
-
-
-
-
- Sets a session cookie which expires after the browser session closes
-
-
-
-
- Sets a persistent cookie which expires after the given time
-
-
-
-
- Sets a persistent cookie with an expiresAt date
-
-
-
-
- Deletes a specified cookie by setting its value to empty and expiration to -1 days
-
-
-
-
- Returns the optimized result for the IRequestContext.
- Does not use or store results in any cache.
-
-
-
-
-
-
-
- Overload for the method returning the most
- optimized result based on the MimeType and CompressionType from the IRequestContext.
-
-
-
-
- Overload for the method returning the most
- optimized result based on the MimeType and CompressionType from the IRequestContext.
- How long to cache for, null is no expiration
-
-
-
-
- Clears all the serialized and compressed caches set
- by the 'Resolve' method for the cacheKey provided
-
-
-
-
-
-
-
- Store an entry in the IHttpRequest.Items Dictionary
-
-
-
-
- Get an entry from the IHttpRequest.Items Dictionary
-
-
-
-
- For performance withPathInfoParts should already be a lower case string
- to minimize redundant matching operations.
-
-
-
-
-
-
-
- For performance withPathInfoParts should already be a lower case string
- to minimize redundant matching operations.
-
-
-
-
-
-
-
-
- The number of segments separated by '/' determinable by path.Split('/').Length
- e.g. /path/to/here.ext == 3
-
-
-
-
- The total number of segments after subparts have been exploded ('.')
- e.g. /path/to/here.ext == 4
-
-
-
-
- Provide for quick lookups based on hashes that can be determined from a request url
-
-
-
-
- Execute MQ
-
-
-
-
- Execute MQ with requestContext
-
-
-
-
- Execute using empty RequestContext
-
-
-
-
- Execute HTTP
-
-
-
-
- Gets the name of the base most type in the heirachy tree with the same.
-
- We get an exception when trying to create a schema with multiple types of the same name
- like when inheriting from a DataContract with the same name.
-
- The type.
-
-
-
-
- Inherit from this class if you want to host your web services inside an
- ASP.NET application.
-
-
-
-
- Exécute les tâches définies par l'application associées à la libération ou à la redéfinition des ressources non managées.
-
- 2
-
-
-
- Load Embedded Resource Templates in ServiceStack.
- To get ServiceStack to use your own instead just add a copy of one or more of the following to your Web Root:
- ~/Templates/IndexOperations.html
- ~/Templates/OperationControl.html
- ~/Templates/HtmlFormat.html
-
-
-
-
- when true, (most) bare plain URLs are auto-hyperlinked
- WARNING: this is a significant deviation from the markdown spec
-
-
-
-
- when true, RETURN becomes a literal newline
- WARNING: this is a significant deviation from the markdown spec
-
-
-
-
- use ">" for HTML output, or " />" for XHTML output
-
-
-
-
- when true, problematic URL characters like [, ], (, and so forth will be encoded
- WARNING: this is a significant deviation from the markdown spec
-
-
-
-
- when false, email addresses will never be auto-linked
- WARNING: this is a significant deviation from the markdown spec
-
-
-
-
- when true, bold and italic require non-word characters on either side
- WARNING: this is a significant deviation from the markdown spec
-
-
-
-
- Markdown is a text-to-HTML conversion tool for web writers.
- Markdown allows you to write using an easy-to-read, easy-to-write plain text format,
- then convert it to structurally valid XHTML (or HTML).
-
-
-
-
- Tabs are automatically converted to spaces as part of the transform
- this constant determines how "wide" those tabs become in spaces
-
-
-
-
- Create a new Markdown instance using default options
-
-
-
-
- Create a new Markdown instance and optionally load options from a configuration
- file. There they should be stored in the appSettings section, available options are:
-
- Markdown.StrictBoldItalic (true/false)
- Markdown.EmptyElementSuffix (">" or " />" without the quotes)
- Markdown.LinkEmails (true/false)
- Markdown.AutoNewLines (true/false)
- Markdown.AutoHyperlink (true/false)
- Markdown.EncodeProblemUrlCharacters (true/false)
-
-
-
-
-
- Create a new Markdown instance and set the options from the MarkdownOptions object.
-
-
-
-
- maximum nested depth of [] and () supported by the transform; implementation detail
-
-
-
-
- In the static constuctor we'll initialize what stays the same across all transforms.
-
-
-
-
- Transforms the provided Markdown-formatted text to HTML;
- see http://en.wikipedia.org/wiki/Markdown
-
-
- The order in which other subs are called here is
- essential. Link and image substitutions need to happen before
- EscapeSpecialChars(), so that any *'s or _'s in the a
- and img tags get encoded.
-
-
-
-
- Perform transformations that form block-level tags like paragraphs, headers, and list items.
-
-
-
-
- Perform transformations that occur *within* block-level tags like paragraphs, headers, and list items.
-
-
-
-
- splits on two or more newlines, to form "paragraphs";
- each paragraph is then unhashed (if it is a hash and unhashing isn't turned off) or wrapped in HTML p tag
-
-
-
-
- Reusable pattern to match balanced [brackets]. See Friedl's
- "Mastering Regular Expressions", 2nd Ed., pp. 328-331.
-
-
-
-
- Reusable pattern to match balanced (parens). See Friedl's
- "Mastering Regular Expressions", 2nd Ed., pp. 328-331.
-
-
-
-
- Strips link definitions from text, stores the URLs and titles in hash references.
-
-
- ^[id]: url "optional title"
-
-
-
-
- derived pretty much verbatim from PHP Markdown
-
-
-
-
- replaces any block-level HTML blocks with hash entries
-
-
-
-
- returns an array of HTML tokens comprising the input string. Each token is
- either a tag (possibly with nested, tags contained therein, such
- as <a href="<MTFoo>">, or a run of text between tags. Each element of the
- array is a two-element array; the first is either 'tag' or 'text'; the second is
- the actual value.
-
-
-
-
- Turn Markdown link shortcuts into HTML anchor tags
-
-
- [link text](url "title")
- [link text][id]
- [id]
-
-
-
-
- Turn Markdown image shortcuts into HTML img tags.
-
-
- ![alt text][id]
- 
-
-
-
-
- Turn Markdown headers into HTML header tags
-
-
- Header 1
- ========
-
- Header 2
- --------
-
- # Header 1
- ## Header 2
- ## Header 2 with closing hashes ##
- ...
- ###### Header 6
-
-
-
-
- Turn Markdown horizontal rules into HTML hr tags
-
-
- ***
- * * *
- ---
- - - -
-
-
-
-
- Turn Markdown lists into HTML ul and ol and li tags
-
-
-
-
- Process the contents of a single ordered or unordered list, splitting it
- into individual list items.
-
-
-
-
- /// Turn Markdown 4-space indented code into HTML pre code blocks
-
-
-
-
- Turn Markdown `code spans` into HTML code tags
-
-
-
-
- Turn Markdown *italics* and **bold** into HTML strong and em tags
-
-
-
-
- Turn markdown line breaks (two space at end of line) into HTML break tags
-
-
-
-
- Turn Markdown > quoted blocks into HTML blockquote blocks
-
-
-
-
- Turn angle-delimited URLs into HTML anchor tags
-
-
- <http://www.example.com>
-
-
-
-
- Remove one level of line-leading spaces
-
-
-
-
- encodes email address randomly
- roughly 10% raw, 45% hex, 45% dec
- note that @ is always encoded and : never is
-
-
-
-
- Encode/escape certain Markdown characters inside code blocks and spans where they are literals
-
-
-
-
- Encode any ampersands (that aren't part of an HTML entity) and left or right angle brackets
-
-
-
-
- Encodes any escaped characters such as \`, \*, \[ etc
-
-
-
-
- swap back in all the special characters we've hidden
-
-
-
-
- escapes Bold [ * ] and Italic [ _ ] characters
-
-
-
-
- hex-encodes some unusual "problem" chars in URLs to avoid URL detection problems
-
-
-
-
- Within tags -- meaning between < and > -- encode [\ ` * _] so they
- don't conflict with their use in Markdown for code, italics and strong.
- We're replacing each such character with its corresponding hash
- value; this is likely overkill, but it should prevent us from colliding
- with the escape values by accident.
-
-
-
-
- convert all tabs to _tabWidth spaces;
- standardizes line endings from DOS (CR LF) or Mac (CR) to UNIX (LF);
- makes sure text ends with a couple of newlines;
- removes any blank lines (only spaces) in the text
-
-
-
-
- this is to emulate what's evailable in PHP
-
-
-
-
- use ">" for HTML output, or " />" for XHTML output
-
-
-
-
- when false, email addresses will never be auto-linked
- WARNING: this is a significant deviation from the markdown spec
-
-
-
-
- when true, bold and italic require non-word characters on either side
- WARNING: this is a significant deviation from the markdown spec
-
-
-
-
- when true, RETURN becomes a literal newline
- WARNING: this is a significant deviation from the markdown spec
-
-
-
-
- when true, (most) bare plain URLs are auto-hyperlinked
- WARNING: this is a significant deviation from the markdown spec
-
-
-
-
- when true, problematic URL characters like [, ], (, and so forth will be encoded
- WARNING: this is a significant deviation from the markdown spec
-
-
-
-
- current version of MarkdownSharp;
- see http://code.google.com/p/markdownsharp/ for the latest code or to contribute
-
-
-
-
- Render Markdown for text/markdown and text/plain ContentTypes
-
-
-
-
- Used in Unit tests
-
-
-
-
-
- Non ASP.NET requests
-
-
-
-
-
-
-
- ASP.NET requests
-
-
-
-
-
- Writes to response.
- Response headers are customizable by implementing IHasOptions an returning Dictionary of Http headers.
-
- The response.
- Whether or not it was implicity handled by ServiceStack's built-in handlers.
- The default action.
- The serialization context.
- Add prefix to response body if any
- Add suffix to response body if any
-
-
-
-
- Highly optimized code to find if GZIP is supported from:
- - http://dotnetperls.com/gzip-request
-
- Other resources for GZip, deflate resources:
- - http://www.west-wind.com/Weblog/posts/10564.aspx
- - http://www.west-wind.com/WebLog/posts/102969.aspx
- - ICSharpCode
-
-
-
-
- Changes the links for the servicestack/metadata page
-
-
-
-
- Non ASP.NET requests
-
-
-
-
- ASP.NET requests
-
-
-
-
- Keep default file contents in-memory
-
-
-
-
-
- Call to signal the completion of a ServiceStack-handled Request
-
-
-
-
- Resolves and auto-wires a ServiceStack Service from a ASP.NET HttpContext.
-
-
-
-
- Resolves and auto-wires a ServiceStack Service from a HttpListenerContext.
-
-
-
-
- Resolves and auto-wires a ServiceStack Service.
-
-
-
-
diff --git a/lib/tests/ServiceStack.dll b/lib/tests/ServiceStack.dll
deleted file mode 100644
index 3a0855cb..00000000
Binary files a/lib/tests/ServiceStack.dll and /dev/null differ
diff --git a/src/.nuget/NuGet.config b/src/.nuget/NuGet.config
deleted file mode 100644
index 67f8ea04..00000000
--- a/src/.nuget/NuGet.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/.nuget/NuGet.exe b/src/.nuget/NuGet.exe
deleted file mode 100644
index ed2b0a22..00000000
Binary files a/src/.nuget/NuGet.exe and /dev/null differ
diff --git a/src/.nuget/NuGet.targets b/src/.nuget/NuGet.targets
deleted file mode 100644
index 38f6d8c2..00000000
--- a/src/.nuget/NuGet.targets
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
- $(MSBuildProjectDirectory)\..\
-
-
-
-
- $([System.IO.Path]::Combine($(SolutionDir), ".nuget"))
- $([System.IO.Path]::Combine($(ProjectDir), "packages.config"))
- $([System.IO.Path]::Combine($(SolutionDir), "packages"))
-
-
-
-
- $(SolutionDir).nuget
- packages.config
- $(SolutionDir)packages
-
-
-
-
- $(NuGetToolsPath)\NuGet.exe
- "$(NuGetExePath)"
- mono --runtime=v4.0.30319 $(NuGetExePath)
-
- $(TargetDir.Trim('\\'))
-
-
- ""
-
-
- false
-
-
- false
-
-
- $(NuGetCommand) install "$(PackagesConfig)" -source $(PackageSources) -o "$(PackagesDir)"
- $(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols
-
-
-
- RestorePackages;
- $(BuildDependsOn);
-
-
-
-
- $(BuildDependsOn);
- BuildPackage;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
new file mode 100644
index 00000000..2a6ba4e0
--- /dev/null
+++ b/src/Directory.Build.props
@@ -0,0 +1,54 @@
+
+
+
+ 6.0.3
+ ServiceStack
+ ServiceStack, Inc.
+ © 2008-2018 ServiceStack, Inc
+ true
+ https://github.com/ServiceStack/ServiceStack.Redis
+ https://servicestack.net/terms
+ https://servicestack.net/img/logo-64.png
+ https://docs.servicestack.net/release-notes-history
+ git
+ https://github.com/ServiceStack/ServiceStack.Redis.git
+ embedded
+ latest
+ true
+ true
+ false
+
+
+
+ true
+ true
+
+
+
+ $(DefineConstants);NETFX;NET45;NET472
+ True
+ False
+ ../servicestack.snk
+
+
+
+ $(DefineConstants);NETSTANDARD;NETSTANDARD2_0
+
+
+
+ $(DefineConstants);NET6_0;NET6_0_OR_GREATER
+
+
+
+ $(DefineConstants);NETCORE;NETCORE_SUPPORT
+
+
+
+
+
+
+
+ DEBUG
+
+
+
diff --git a/src/ServiceStack.Redis.sln b/src/ServiceStack.Redis.sln
index c58ded06..c2ea43b7 100644
--- a/src/ServiceStack.Redis.sln
+++ b/src/ServiceStack.Redis.sln
@@ -1,70 +1,103 @@

Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29721.120
+MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{38F69F8F-9303-4BAF-B081-D28339163E07}"
ProjectSection(SolutionItems) = preProject
- ..\build\appsettings.license.txt = ..\build\appsettings.license.txt
- ..\build\build-sn.proj = ..\build\build-sn.proj
+ ..\build\build-core.proj = ..\build\build-core.proj
..\build\build.bat = ..\build\build.bat
..\build\build.proj = ..\build\build.proj
..\build\build.tasks = ..\build\build.tasks
- ..\build\copy.bat = ..\build\copy.bat
+ Directory.Build.props = Directory.Build.props
+ ..\tests\Directory.Build.props = ..\tests\Directory.Build.props
..\README.md = ..\README.md
- ..\NuGet\ServiceStack.Redis\servicestack.redis.nuspec = ..\NuGet\ServiceStack.Redis\servicestack.redis.nuspec
- ..\NuGet.Signed\ServiceStack.Redis.Signed\servicestack.redis.signed.nuspec = ..\NuGet.Signed\ServiceStack.Redis.Signed\servicestack.redis.signed.nuspec
+ ServiceStack.Redis\ServiceStack.Redis.Core.csproj = ServiceStack.Redis\ServiceStack.Redis.Core.csproj
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceStack.Redis", "ServiceStack.Redis\ServiceStack.Redis.csproj", "{AF99F19B-4C04-4F58-81EF-B092F1FCC540}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceStack.Redis", "ServiceStack.Redis\ServiceStack.Redis.csproj", "{AF99F19B-4C04-4F58-81EF-B092F1FCC540}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceStack.Redis.Tests", "..\tests\ServiceStack.Redis.Tests\ServiceStack.Redis.Tests.csproj", "{951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceStack.Redis.Tests", "..\tests\ServiceStack.Redis.Tests\ServiceStack.Redis.Tests.csproj", "{951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Console.Tests", "..\tests\Console.Tests\Console.Tests.csproj", "{8368C965-B4F6-4263-9ABB-731A175B2E77}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceStack.Redis.Tests.Sentinel", "..\tests\ServiceStack.Redis.Tests.Sentinel\ServiceStack.Redis.Tests.Sentinel.csproj", "{91C55091-A946-49B5-9517-8794EBCC5784}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceStack.Redis.Benchmark", "..\tests\ServiceStack.Redis.Benchmark\ServiceStack.Redis.Benchmark.csproj", "{959CA5FE-6525-4EEF-86CA-F4978BEFF14F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Console.Tests", "..\tests\Console.Tests\Console.Tests.csproj", "{56DEDC64-B349-4150-BE9C-5805D831678D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
Release|x86 = Release|x86
- Signed|Any CPU = Signed|Any CPU
- Signed|x86 = Signed|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Debug|x86.ActiveCfg = Debug|x86
- {AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Debug|x86.Build.0 = Debug|x86
+ {AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Debug|x64.Build.0 = Debug|Any CPU
+ {AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Debug|x86.Build.0 = Debug|Any CPU
{AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Release|Any CPU.Build.0 = Release|Any CPU
- {AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Release|x86.ActiveCfg = Release|x86
- {AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Release|x86.Build.0 = Release|x86
- {AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Signed|Any CPU.ActiveCfg = Signed|Any CPU
- {AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Signed|Any CPU.Build.0 = Signed|Any CPU
- {AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Signed|x86.ActiveCfg = Signed|x86
- {AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Signed|x86.Build.0 = Signed|x86
+ {AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Release|x64.ActiveCfg = Release|Any CPU
+ {AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Release|x64.Build.0 = Release|Any CPU
+ {AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Release|x86.ActiveCfg = Release|Any CPU
+ {AF99F19B-4C04-4F58-81EF-B092F1FCC540}.Release|x86.Build.0 = Release|Any CPU
{951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Debug|x86.ActiveCfg = Debug|x86
- {951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Debug|x86.Build.0 = Debug|x86
+ {951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Debug|x64.Build.0 = Debug|Any CPU
+ {951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Debug|x86.Build.0 = Debug|Any CPU
{951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Release|Any CPU.Build.0 = Release|Any CPU
- {951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Release|x86.ActiveCfg = Release|x86
- {951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Release|x86.Build.0 = Release|x86
- {951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Signed|Any CPU.ActiveCfg = Signed|Any CPU
- {951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Signed|Any CPU.Build.0 = Signed|Any CPU
- {951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Signed|x86.ActiveCfg = Signed|x86
- {951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Signed|x86.Build.0 = Signed|x86
- {8368C965-B4F6-4263-9ABB-731A175B2E77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {8368C965-B4F6-4263-9ABB-731A175B2E77}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8368C965-B4F6-4263-9ABB-731A175B2E77}.Debug|x86.ActiveCfg = Debug|Any CPU
- {8368C965-B4F6-4263-9ABB-731A175B2E77}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8368C965-B4F6-4263-9ABB-731A175B2E77}.Release|Any CPU.Build.0 = Release|Any CPU
- {8368C965-B4F6-4263-9ABB-731A175B2E77}.Release|x86.ActiveCfg = Release|Any CPU
- {8368C965-B4F6-4263-9ABB-731A175B2E77}.Signed|Any CPU.ActiveCfg = Release|Any CPU
- {8368C965-B4F6-4263-9ABB-731A175B2E77}.Signed|Any CPU.Build.0 = Release|Any CPU
- {8368C965-B4F6-4263-9ABB-731A175B2E77}.Signed|x86.ActiveCfg = Release|Any CPU
+ {951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Release|x64.ActiveCfg = Release|Any CPU
+ {951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Release|x64.Build.0 = Release|Any CPU
+ {951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Release|x86.ActiveCfg = Release|Any CPU
+ {951D28EE-5D22-4C62-AC0F-1661A8CEEC5A}.Release|x86.Build.0 = Release|Any CPU
+ {91C55091-A946-49B5-9517-8794EBCC5784}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {91C55091-A946-49B5-9517-8794EBCC5784}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {91C55091-A946-49B5-9517-8794EBCC5784}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {91C55091-A946-49B5-9517-8794EBCC5784}.Debug|x64.Build.0 = Debug|Any CPU
+ {91C55091-A946-49B5-9517-8794EBCC5784}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {91C55091-A946-49B5-9517-8794EBCC5784}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {91C55091-A946-49B5-9517-8794EBCC5784}.Release|Any CPU.Build.0 = Release|Any CPU
+ {91C55091-A946-49B5-9517-8794EBCC5784}.Release|x64.ActiveCfg = Release|Any CPU
+ {91C55091-A946-49B5-9517-8794EBCC5784}.Release|x64.Build.0 = Release|Any CPU
+ {91C55091-A946-49B5-9517-8794EBCC5784}.Release|x86.ActiveCfg = Release|Any CPU
+ {959CA5FE-6525-4EEF-86CA-F4978BEFF14F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {959CA5FE-6525-4EEF-86CA-F4978BEFF14F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {959CA5FE-6525-4EEF-86CA-F4978BEFF14F}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {959CA5FE-6525-4EEF-86CA-F4978BEFF14F}.Debug|x64.Build.0 = Debug|Any CPU
+ {959CA5FE-6525-4EEF-86CA-F4978BEFF14F}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {959CA5FE-6525-4EEF-86CA-F4978BEFF14F}.Debug|x86.Build.0 = Debug|Any CPU
+ {959CA5FE-6525-4EEF-86CA-F4978BEFF14F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {959CA5FE-6525-4EEF-86CA-F4978BEFF14F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {959CA5FE-6525-4EEF-86CA-F4978BEFF14F}.Release|x64.ActiveCfg = Release|Any CPU
+ {959CA5FE-6525-4EEF-86CA-F4978BEFF14F}.Release|x64.Build.0 = Release|Any CPU
+ {959CA5FE-6525-4EEF-86CA-F4978BEFF14F}.Release|x86.ActiveCfg = Release|Any CPU
+ {959CA5FE-6525-4EEF-86CA-F4978BEFF14F}.Release|x86.Build.0 = Release|Any CPU
+ {56DEDC64-B349-4150-BE9C-5805D831678D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {56DEDC64-B349-4150-BE9C-5805D831678D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {56DEDC64-B349-4150-BE9C-5805D831678D}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {56DEDC64-B349-4150-BE9C-5805D831678D}.Debug|x64.Build.0 = Debug|Any CPU
+ {56DEDC64-B349-4150-BE9C-5805D831678D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {56DEDC64-B349-4150-BE9C-5805D831678D}.Debug|x86.Build.0 = Debug|Any CPU
+ {56DEDC64-B349-4150-BE9C-5805D831678D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {56DEDC64-B349-4150-BE9C-5805D831678D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {56DEDC64-B349-4150-BE9C-5805D831678D}.Release|x64.ActiveCfg = Release|Any CPU
+ {56DEDC64-B349-4150-BE9C-5805D831678D}.Release|x64.Build.0 = Release|Any CPU
+ {56DEDC64-B349-4150-BE9C-5805D831678D}.Release|x86.ActiveCfg = Release|Any CPU
+ {56DEDC64-B349-4150-BE9C-5805D831678D}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {EDB2082E-E2C1-4E9D-9A60-F937634254A6}
+ EndGlobalSection
EndGlobal
diff --git a/src/ServiceStack.Redis.sln.DotSettings b/src/ServiceStack.Redis.sln.DotSettings
index 11f2c267..28747c5c 100644
--- a/src/ServiceStack.Redis.sln.DotSettings
+++ b/src/ServiceStack.Redis.sln.DotSettings
@@ -1,3 +1,4 @@

+ True
<data><IncludeFilters /><ExcludeFilters /></data>
<data />
\ No newline at end of file
diff --git a/src/ServiceStack.Redis/BasicRedisClientManager.Async.cs b/src/ServiceStack.Redis/BasicRedisClientManager.Async.cs
new file mode 100644
index 00000000..1b2bd382
--- /dev/null
+++ b/src/ServiceStack.Redis/BasicRedisClientManager.Async.cs
@@ -0,0 +1,180 @@
+//
+// https://github.com/ServiceStack/ServiceStack.Redis
+// ServiceStack.Redis: ECMA CLI Binding to the Redis key-value storage system
+//
+// Authors:
+// Demis Bellot (demis.bellot@gmail.com)
+//
+// Copyright 2013 ServiceStack, Inc. All Rights Reserved.
+//
+// Licensed under the same terms of ServiceStack.
+//
+
+using ServiceStack.Caching;
+using ServiceStack.Redis.Internal;
+using System;
+using System.Collections.Generic;
+using System.Runtime.CompilerServices;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace ServiceStack.Redis
+{
+ ///
+ /// Provides thread-safe retrieval of redis clients since each client is a new one.
+ /// Allows the configuration of different ReadWrite and ReadOnly hosts
+ ///
+ public partial class BasicRedisClientManager
+ : IRedisClientsManagerAsync, ICacheClientAsync
+ {
+ private ValueTask GetCacheClientAsync(in CancellationToken _)
+ => new RedisClientManagerCacheClient(this).AsValueTaskResult();
+
+ private ValueTask GetReadOnlyCacheClientAsync(in CancellationToken _)
+ => ConfigureRedisClientAsync(this.GetReadOnlyClientImpl()).AsValueTaskResult();
+
+ private IRedisClientAsync ConfigureRedisClientAsync(IRedisClientAsync client)
+ => client;
+
+ ValueTask IRedisClientsManagerAsync.GetCacheClientAsync(CancellationToken token)
+ => GetCacheClientAsync(token);
+
+ ValueTask IRedisClientsManagerAsync.GetClientAsync(CancellationToken token)
+ => GetClientImpl().AsValueTaskResult();
+
+ ValueTask IRedisClientsManagerAsync.GetReadOnlyCacheClientAsync(CancellationToken token)
+ => GetReadOnlyCacheClientAsync(token);
+
+ ValueTask IRedisClientsManagerAsync.GetReadOnlyClientAsync(CancellationToken token)
+ => GetReadOnlyClientImpl().AsValueTaskResult();
+
+ ValueTask IAsyncDisposable.DisposeAsync()
+ {
+ Dispose();
+ return default;
+ }
+
+ async Task ICacheClientAsync.GetAsync(string key, CancellationToken token)
+ {
+ await using var client = await GetReadOnlyCacheClientAsync(token).ConfigureAwait(false);
+ return await client.GetAsync(key, token).ConfigureAwait(false);
+ }
+
+ async Task ICacheClientAsync.SetAsync(string key, T value, CancellationToken token)
+ {
+ await using var client = await GetCacheClientAsync(token).ConfigureAwait(false);
+ return await client.SetAsync(key, value, token).ConfigureAwait(false);
+ }
+
+ async Task ICacheClientAsync.SetAsync(string key, T value, DateTime expiresAt, CancellationToken token)
+ {
+ await using var client = await GetCacheClientAsync(token).ConfigureAwait(false);
+ return await client.SetAsync(key, value, expiresAt, token).ConfigureAwait(false);
+ }
+
+ async Task ICacheClientAsync.SetAsync(string key, T value, TimeSpan expiresIn, CancellationToken token)
+ {
+ await using var client = await GetCacheClientAsync(token).ConfigureAwait(false);
+ return await client.SetAsync(key, value, expiresIn, token).ConfigureAwait(false);
+ }
+
+ async Task ICacheClientAsync.FlushAllAsync(CancellationToken token)
+ {
+ await using var client = await GetCacheClientAsync(token).ConfigureAwait(false);
+ await client.FlushAllAsync(token).ConfigureAwait(false);
+ }
+
+ async Task> ICacheClientAsync.GetAllAsync(IEnumerable keys, CancellationToken token)
+ {
+ await using var client = await GetReadOnlyCacheClientAsync(token).ConfigureAwait(false);
+ return await client.GetAllAsync(keys, token).ConfigureAwait(false);
+ }
+
+ async Task ICacheClientAsync.SetAllAsync(IDictionary values, CancellationToken token)
+ {
+ await using var client = await GetCacheClientAsync(token).ConfigureAwait(false);
+ await client.SetAllAsync(values, token).ConfigureAwait(false);
+ }
+
+ async Task ICacheClientAsync.RemoveAsync(string key, CancellationToken token)
+ {
+ await using var client = await GetCacheClientAsync(token).ConfigureAwait(false);
+ return await client.RemoveAsync(key, token).ConfigureAwait(false);
+ }
+
+ async Task ICacheClientAsync.RemoveAllAsync(IEnumerable keys, CancellationToken token)
+ {
+ await using var client = await GetCacheClientAsync(token).ConfigureAwait(false);
+ await client.RemoveAllAsync(keys, token).ConfigureAwait(false);
+ }
+
+ async Task ICacheClientAsync.IncrementAsync(string key, uint amount, CancellationToken token)
+ {
+ await using var client = await GetCacheClientAsync(token).ConfigureAwait(false);
+ return await client.IncrementAsync(key, amount, token).ConfigureAwait(false);
+ }
+
+ async Task ICacheClientAsync.DecrementAsync(string key, uint amount, CancellationToken token)
+ {
+ await using var client = await GetCacheClientAsync(token).ConfigureAwait(false);
+ return await client.DecrementAsync(key, amount, token).ConfigureAwait(false);
+ }
+
+ async Task ICacheClientAsync.AddAsync(string key, T value, CancellationToken token)
+ {
+ await using var client = await GetCacheClientAsync(token).ConfigureAwait(false);
+ return await client.AddAsync(key, value, token).ConfigureAwait(false);
+ }
+
+ async Task ICacheClientAsync.ReplaceAsync(string key, T value, CancellationToken token)
+ {
+ await using var client = await GetCacheClientAsync(token).ConfigureAwait(false);
+ return await client.ReplaceAsync(key, value, token).ConfigureAwait(false);
+ }
+
+ async Task ICacheClientAsync.AddAsync(string key, T value, DateTime expiresAt, CancellationToken token)
+ {
+ await using var client = await GetCacheClientAsync(token).ConfigureAwait(false);
+ return await client.AddAsync(key, value, expiresAt, token).ConfigureAwait(false);
+ }
+
+ async Task ICacheClientAsync.ReplaceAsync(string key, T value, DateTime expiresAt, CancellationToken token)
+ {
+ await using var client = await GetCacheClientAsync(token).ConfigureAwait(false);
+ return await client.ReplaceAsync(key, value, expiresAt, token).ConfigureAwait(false);
+ }
+
+ async Task ICacheClientAsync.AddAsync(string key, T value, TimeSpan expiresIn, CancellationToken token)
+ {
+ await using var client = await GetCacheClientAsync(token).ConfigureAwait(false);
+ return await client.AddAsync(key, value, expiresIn, token).ConfigureAwait(false);
+ }
+
+ async Task ICacheClientAsync.ReplaceAsync(string key, T value, TimeSpan expiresIn, CancellationToken token)
+ {
+ await using var client = await GetCacheClientAsync(token).ConfigureAwait(false);
+ return await client.ReplaceAsync(key, value, expiresIn, token).ConfigureAwait(false);
+ }
+
+ async Task ICacheClientAsync.GetTimeToLiveAsync(string key, CancellationToken token)
+ {
+ await using var client = await GetReadOnlyCacheClientAsync(token).ConfigureAwait(false);
+ return await client.GetTimeToLiveAsync(key, token).ConfigureAwait(false);
+ }
+
+ async IAsyncEnumerable ICacheClientAsync.GetKeysByPatternAsync(string pattern, [EnumeratorCancellation] CancellationToken token)
+ {
+ await using var client = await GetReadOnlyCacheClientAsync(token).ConfigureAwait(false);
+ await foreach (var key in client.GetKeysByPatternAsync(pattern, token).ConfigureAwait(false).WithCancellation(token))
+ {
+ yield return key;
+ }
+ }
+
+ async Task ICacheClientAsync.RemoveExpiredEntriesAsync(CancellationToken token)
+ {
+ await using var client = await GetCacheClientAsync(token).ConfigureAwait(false);
+ await client.RemoveExpiredEntriesAsync(token).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ServiceStack.Redis/BasicRedisClientManager.ICacheClient.cs b/src/ServiceStack.Redis/BasicRedisClientManager.ICacheClient.cs
index 19a81a0a..aedf60eb 100644
--- a/src/ServiceStack.Redis/BasicRedisClientManager.ICacheClient.cs
+++ b/src/ServiceStack.Redis/BasicRedisClientManager.ICacheClient.cs
@@ -5,7 +5,7 @@
// Authors:
// Demis Bellot (demis.bellot@gmail.com)
//
-// Copyright 2013 Service Stack LLC. All Rights Reserved.
+// Copyright 2013 ServiceStack, Inc. All Rights Reserved.
//
// Licensed under the same terms of ServiceStack.
//
@@ -19,163 +19,120 @@ namespace ServiceStack.Redis
///
/// BasicRedisClientManager for ICacheClient
///
- /// For more interoperabilty I'm also implementing the ICacheClient on
+ /// For more interoperability I'm also implementing the ICacheClient on
/// this cache client manager which has the affect of calling
/// GetCacheClient() for all write operations and GetReadOnlyCacheClient()
/// for the read ones.
///
- /// This works well for master-slave replication scenarios where you have
- /// 1 master that replicates to multiple read slaves.
+ /// This works well for master-replica replication scenarios where you have
+ /// 1 master that replicates to multiple read replicas.
///
public partial class BasicRedisClientManager
: ICacheClient
{
- public ICacheClient GetCacheClient()
- {
- return new RedisClientManagerCacheClient(this);
- }
+ public ICacheClient GetCacheClient() =>
+ new RedisClientManagerCacheClient(this);
- public ICacheClient GetReadOnlyCacheClient()
- {
- return ConfigureRedisClient(this.GetReadOnlyClient());
- }
+ public ICacheClient GetReadOnlyCacheClient() =>
+ ConfigureRedisClient(this.GetReadOnlyClientImpl());
- private ICacheClient ConfigureRedisClient(IRedisClient client)
- {
- return client;
- }
-
- #region Implementation of ICacheClient
+ private ICacheClient ConfigureRedisClient(IRedisClient client) => client;
public bool Remove(string key)
{
- using (var client = GetReadOnlyCacheClient())
- {
- return client.Remove(key);
- }
+ using var client = GetReadOnlyCacheClient();
+ return client.Remove(key);
}
public void RemoveAll(IEnumerable keys)
{
- using (var client = GetCacheClient())
- {
- client.RemoveAll(keys);
- }
+ using var client = GetCacheClient();
+ client.RemoveAll(keys);
}
public T Get(string key)
{
- using (var client = GetReadOnlyCacheClient())
- {
- return client.Get(key);
- }
+ using var client = GetReadOnlyCacheClient();
+ return client.Get(key);
}
public long Increment(string key, uint amount)
{
- using (var client = GetCacheClient())
- {
- return client.Increment(key, amount);
- }
+ using var client = GetCacheClient();
+ return client.Increment(key, amount);
}
public long Decrement(string key, uint amount)
{
- using (var client = GetCacheClient())
- {
- return client.Decrement(key, amount);
- }
+ using var client = GetCacheClient();
+ return client.Decrement(key, amount);
}
public bool Add(string key, T value)
{
- using (var client = GetCacheClient())
- {
- return client.Add(key, value);
- }
+ using var client = GetCacheClient();
+ return client.Add(key, value);
}
public bool Set(string key, T value)
{
- using (var client = GetCacheClient())
- {
- return client.Set(key, value);
- }
+ using var client = GetCacheClient();
+ return client.Set(key, value);
}
public bool Replace(string key, T value)
{
- using (var client = GetCacheClient())
- {
- return client.Replace(key, value);
- }
+ using var client = GetCacheClient();
+ return client.Replace(key, value);
}
public bool Add(string key, T value, DateTime expiresAt)
{
- using (var client = GetCacheClient())
- {
- return client.Add(key, value, expiresAt);
- }
+ using var client = GetCacheClient();
+ return client.Add(key, value, expiresAt);
}
public bool Set(string key, T value, DateTime expiresAt)
{
- using (var client = GetCacheClient())
- {
- return client.Set(key, value, expiresAt);
- }
+ using var client = GetCacheClient();
+ return client.Set(key, value, expiresAt);
}
public bool Replace(string key, T value, DateTime expiresAt)
{
- using (var client = GetCacheClient())
- {
- return client.Replace(key, value, expiresAt);
- }
+ using var client = GetCacheClient();
+ return client.Replace(key, value, expiresAt);
}
public bool Add(string key, T value, TimeSpan expiresIn)
{
- using (var client = GetCacheClient())
- {
- return client.Add(key, value, expiresIn);
- }
+ using var client = GetCacheClient();
+ return client.Add(key, value, expiresIn);
}
public bool Set(string key, T value, TimeSpan expiresIn)
{
- using (var client = GetCacheClient())
- {
- return client.Set(key, value, expiresIn);
- }
+ using var client = GetCacheClient();
+ return client.Set(key, value, expiresIn);
}
public bool Replace(string key, T value, TimeSpan expiresIn)
{
- using (var client = GetCacheClient())
- {
- return client.Replace(key, value, expiresIn);
- }
+ using var client = GetCacheClient();
+ return client.Replace(key, value, expiresIn);
}
public void FlushAll()
{
- using (var client = GetCacheClient())
- {
- client.FlushAll();
- }
+ using var client = GetCacheClient();
+ client.FlushAll();
}
public IDictionary GetAll(IEnumerable keys)
{
- using (var client = GetReadOnlyCacheClient())
- {
- return client.GetAll(keys);
- }
+ using var client = GetReadOnlyCacheClient();
+ return client.GetAll(keys);
}
-
- #endregion
}
diff --git a/src/ServiceStack.Redis/BasicRedisClientManager.cs b/src/ServiceStack.Redis/BasicRedisClientManager.cs
index 7e354836..d42c4f51 100644
--- a/src/ServiceStack.Redis/BasicRedisClientManager.cs
+++ b/src/ServiceStack.Redis/BasicRedisClientManager.cs
@@ -5,26 +5,29 @@
// Authors:
// Demis Bellot (demis.bellot@gmail.com)
//
-// Copyright 2013 Service Stack LLC. All Rights Reserved.
+// Copyright 2013 ServiceStack, Inc. All Rights Reserved.
//
// Licensed under the same terms of ServiceStack.
//
using System;
using System.Collections.Generic;
+using System.Linq;
using System.Threading;
+using ServiceStack.Logging;
+using ServiceStack.Text;
namespace ServiceStack.Redis
{
///
- /// Provides thread-safe retrievel of redis clients since each client is a new one.
+ /// Provides thread-safe retrieval of redis clients since each client is a new one.
/// Allows the configuration of different ReadWrite and ReadOnly hosts
///
public partial class BasicRedisClientManager
- : IRedisClientsManager, IRedisFailover
+ : IRedisClientsManager, IRedisFailover, IHasRedisResolver
{
- private List ReadWriteHosts { get; set; }
- private List ReadOnlyHosts { get; set; }
+ public static ILog Log = LogManager.GetLogger(typeof(BasicRedisClientManager));
+
public int? ConnectTimeout { get; set; }
public int? SocketSendTimeout { get; set; }
public int? SocketReceiveTimeout { get; set; }
@@ -39,15 +42,17 @@ public partial class BasicRedisClientManager
protected int RedisClientCounter = 0;
- public IRedisClientFactory RedisClientFactory { get; set; }
+ public Func ClientFactory { get; set; }
- public long Db { get; private set; }
+ public long? Db { get; private set; }
public Action ConnectionFilter { get; set; }
public List> OnFailover { get; private set; }
- public BasicRedisClientManager() : this(RedisNativeClient.DefaultHost) { }
+ public IRedisResolver RedisResolver { get; set; }
+
+ public BasicRedisClientManager() : this(RedisConfig.DefaultHost) { }
public BasicRedisClientManager(params string[] readWriteHosts)
: this(readWriteHosts, readWriteHosts) { }
@@ -62,25 +67,25 @@ public BasicRedisClientManager(int initialDb, params string[] readWriteHosts)
///
/// The write hosts.
/// The read hosts.
+ ///
public BasicRedisClientManager(
IEnumerable readWriteHosts,
- IEnumerable readOnlyHosts)
- : this(readWriteHosts, readOnlyHosts, RedisNativeClient.DefaultDb)
- {
- }
+ IEnumerable readOnlyHosts,
+ long? initalDb = null)
+ : this(readWriteHosts.ToRedisEndPoints(), readOnlyHosts.ToRedisEndPoints(), initalDb) {}
public BasicRedisClientManager(
- IEnumerable readWriteHosts,
- IEnumerable readOnlyHosts,
- long initalDb)
+ IEnumerable readWriteHosts,
+ IEnumerable readOnlyHosts,
+ long? initalDb = null)
{
this.Db = initalDb;
- ReadWriteHosts = readWriteHosts.ToRedisEndPoints();
- ReadOnlyHosts = readOnlyHosts.ToRedisEndPoints();
+ RedisResolver = new RedisResolver(readWriteHosts, readOnlyHosts);
this.OnFailover = new List>();
- this.RedisClientFactory = Redis.RedisClientFactory.Instance;
+
+ JsConfig.InitStatics();
this.OnStart();
}
@@ -94,10 +99,10 @@ protected virtual void OnStart()
/// Returns a Read/Write client (The default) using the hosts defined in ReadWriteHosts
///
///
- public IRedisClient GetClient()
+ public IRedisClient GetClient() => GetClientImpl();
+ private RedisClient GetClientImpl()
{
- var nextHost = ReadWriteHosts[readWriteHostsIndex++ % ReadWriteHosts.Count];
- var client = InitNewClient(nextHost);
+ var client = InitNewClient(RedisResolver.CreateMasterClient(readWriteHostsIndex++));
return client;
}
@@ -105,16 +110,15 @@ public IRedisClient GetClient()
/// Returns a ReadOnly client using the hosts defined in ReadOnlyHosts.
///
///
- public virtual IRedisClient GetReadOnlyClient()
+ public virtual IRedisClient GetReadOnlyClient() => GetReadOnlyClientImpl();
+ private RedisClient GetReadOnlyClientImpl()
{
- var nextHost = ReadOnlyHosts[readOnlyHostsIndex++ % ReadOnlyHosts.Count];
- var client = InitNewClient(nextHost);
+ var client = InitNewClient(RedisResolver.CreateSlaveClient(readOnlyHostsIndex++));
return client;
}
- private RedisClient InitNewClient(RedisEndpoint nextHost)
+ private RedisClient InitNewClient(RedisClient client)
{
- var client = RedisClientFactory.CreateRedisClient(nextHost);
client.Id = Interlocked.Increment(ref RedisClientCounter);
client.ConnectionFilter = ConnectionFilter;
if (this.ConnectTimeout != null)
@@ -127,8 +131,8 @@ private RedisClient InitNewClient(RedisEndpoint nextHost)
client.IdleTimeOutSecs = this.IdleTimeOutSecs.Value;
if (this.NamespacePrefix != null)
client.NamespacePrefix = NamespacePrefix;
- if (client.Db != Db) //Reset database to default if changed
- client.ChangeDb(Db);
+ if (Db != null && client.Db != Db) //Reset database to default if changed
+ client.ChangeDb(Db.Value);
return client;
}
@@ -154,8 +158,18 @@ public void FailoverTo(params string[] readWriteHosts)
public void FailoverTo(IEnumerable readWriteHosts, IEnumerable readOnlyHosts)
{
- ReadWriteHosts = readWriteHosts.ToRedisEndPoints();
- ReadOnlyHosts = readOnlyHosts.ToRedisEndPoints();
+ Interlocked.Increment(ref RedisState.TotalFailovers);
+
+ var masters = readWriteHosts.ToList();
+ var replicas = readOnlyHosts.ToList();
+
+ Log.Info($"FailoverTo: {string.Join(",", masters)} : {string.Join(",", replicas)} Total: {RedisState.TotalFailovers}");
+
+ lock (this)
+ {
+ RedisResolver.ResetMasters(masters);
+ RedisResolver.ResetSlaves(replicas);
+ }
Start();
}
diff --git a/src/ServiceStack.Redis/BasicRedisResolver.cs b/src/ServiceStack.Redis/BasicRedisResolver.cs
new file mode 100644
index 00000000..31986996
--- /dev/null
+++ b/src/ServiceStack.Redis/BasicRedisResolver.cs
@@ -0,0 +1,88 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using ServiceStack.Logging;
+
+namespace ServiceStack.Redis
+{
+ public class BasicRedisResolver : IRedisResolver, IRedisResolverExtended
+ {
+ static ILog log = LogManager.GetLogger(typeof(BasicRedisResolver));
+
+ public Func ClientFactory { get; set; }
+
+ public int ReadWriteHostsCount { get; private set; }
+ public int ReadOnlyHostsCount { get; private set; }
+
+ private RedisEndpoint[] masters;
+ private RedisEndpoint[] replicas;
+
+ public RedisEndpoint[] Masters => masters;
+ public RedisEndpoint[] Replicas => replicas;
+
+ public BasicRedisResolver(IEnumerable masters, IEnumerable replicas)
+ {
+ ResetMasters(masters.ToList());
+ ResetSlaves(replicas.ToList());
+ ClientFactory = RedisConfig.ClientFactory;
+ }
+
+ public virtual void ResetMasters(IEnumerable hosts)
+ {
+ ResetMasters(hosts.ToRedisEndPoints());
+ }
+
+ public virtual void ResetMasters(List newMasters)
+ {
+ if (newMasters == null || newMasters.Count == 0)
+ throw new Exception("Must provide at least 1 master");
+
+ masters = newMasters.ToArray();
+ ReadWriteHostsCount = masters.Length;
+
+ if (log.IsDebugEnabled)
+ log.Debug("New Redis Masters: " + string.Join(", ", masters.Map(x => x.GetHostString())));
+ }
+
+ public virtual void ResetSlaves(IEnumerable hosts)
+ {
+ ResetSlaves(hosts.ToRedisEndPoints());
+ }
+
+ public virtual void ResetSlaves(List newReplicas)
+ {
+ replicas = (newReplicas ?? TypeConstants.EmptyList).ToArray();
+ ReadOnlyHostsCount = replicas.Length;
+
+ if (log.IsDebugEnabled)
+ log.Debug("New Redis Replicas: " + string.Join(", ", replicas.Map(x => x.GetHostString())));
+ }
+
+ public RedisClient CreateRedisClient(RedisEndpoint config, bool master)
+ {
+ return ClientFactory(config);
+ }
+
+ public RedisEndpoint GetReadWriteHost(int desiredIndex)
+ {
+ return masters[desiredIndex % masters.Length];
+ }
+
+ public RedisEndpoint GetReadOnlyHost(int desiredIndex)
+ {
+ return ReadOnlyHostsCount > 0
+ ? replicas[desiredIndex % replicas.Length]
+ : GetReadWriteHost(desiredIndex);
+ }
+
+ public RedisClient CreateMasterClient(int desiredIndex)
+ {
+ return CreateRedisClient(GetReadWriteHost(desiredIndex), master: true);
+ }
+
+ public RedisClient CreateSlaveClient(int desiredIndex)
+ {
+ return CreateRedisClient(GetReadOnlyHost(desiredIndex), master: false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ServiceStack.Redis/BufferPool.cs b/src/ServiceStack.Redis/BufferPool.cs
deleted file mode 100644
index 9e66a764..00000000
--- a/src/ServiceStack.Redis/BufferPool.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-using System;
-using System.Diagnostics;
-using System.Threading;
-
-namespace ServiceStack.Redis
-{
- ///
- /// Courtesy of @marcgravell
- /// http://code.google.com/p/protobuf-net/source/browse/trunk/protobuf-net/BufferPool.cs
- ///
- internal class BufferPool
- {
- internal static void Flush()
- {
- for (int i = 0; i < pool.Length; i++)
- {
- Interlocked.Exchange(ref pool[i], null); // and drop the old value on the floor
- }
- }
-
- private BufferPool() { }
- const int PoolSize = 1000; //1.45MB
- internal const int BufferLength = 1450; //MTU size - some headers
- private static readonly object[] pool = new object[PoolSize];
-
- internal static byte[] GetBuffer()
- {
- object tmp;
- for (int i = 0; i < pool.Length; i++)
- {
- if ((tmp = Interlocked.Exchange(ref pool[i], null)) != null)
- return (byte[])tmp;
- }
- return new byte[BufferLength];
- }
-
- internal static void ResizeAndFlushLeft(ref byte[] buffer, int toFitAtLeastBytes, int copyFromIndex, int copyBytes)
- {
- Debug.Assert(buffer != null);
- Debug.Assert(toFitAtLeastBytes > buffer.Length);
- Debug.Assert(copyFromIndex >= 0);
- Debug.Assert(copyBytes >= 0);
-
- // try doubling, else match
- int newLength = buffer.Length * 2;
- if (newLength < toFitAtLeastBytes) newLength = toFitAtLeastBytes;
-
- var newBuffer = new byte[newLength];
- if (copyBytes > 0)
- {
- Buffer.BlockCopy(buffer, copyFromIndex, newBuffer, 0, copyBytes);
- }
- if (buffer.Length == BufferLength)
- {
- ReleaseBufferToPool(ref buffer);
- }
- buffer = newBuffer;
- }
-
- internal static void ReleaseBufferToPool(ref byte[] buffer)
- {
- if (buffer == null) return;
- if (buffer.Length == BufferLength)
- {
- for (int i = 0; i < pool.Length; i++)
- {
- if (Interlocked.CompareExchange(ref pool[i], buffer, null) == null)
- {
- break; // found a null; swapped it in
- }
- }
- }
- // if no space, just drop it on the floor
- buffer = null;
- }
-
- }
-}
\ No newline at end of file
diff --git a/src/ServiceStack.Redis/BufferedReader.Async.cs b/src/ServiceStack.Redis/BufferedReader.Async.cs
new file mode 100644
index 00000000..39ad9d7e
--- /dev/null
+++ b/src/ServiceStack.Redis/BufferedReader.Async.cs
@@ -0,0 +1,93 @@
+using ServiceStack.Redis.Internal;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace ServiceStack.Redis
+{
+ internal sealed partial class BufferedReader
+ {
+ internal ValueTask ReadByteAsync(in CancellationToken token = default)
+ => _available > 0 ? ReadByteFromBuffer().AsValueTaskResult() : ReadByteSlowAsync(token);
+
+ private ValueTask ReadByteSlowAsync(in CancellationToken token)
+ {
+ token.ThrowIfCancellationRequested();
+ _offset = 0;
+#if ASYNC_MEMORY
+ var pending = _source.ReadAsync(new Memory(_buffer), token);
+ if (!pending.IsCompletedSuccessfully)
+ return Awaited(this, pending);
+#else
+ var pending = _source.ReadAsync(_buffer, 0, _buffer.Length, token);
+ if (pending.Status != TaskStatus.RanToCompletion)
+ return Awaited(this, pending);
+#endif
+
+ _available = pending.Result;
+ return (_available > 0 ? ReadByteFromBuffer() : -1).AsValueTaskResult();
+
+#if ASYNC_MEMORY
+ static async ValueTask Awaited(BufferedReader @this, ValueTask pending)
+ {
+ @this._available = await pending.ConfigureAwait(false);
+ return @this._available > 0 ? @this.ReadByteFromBuffer() : -1;
+ }
+#else
+ static async ValueTask Awaited(BufferedReader @this, Task pending)
+ {
+ @this._available = await pending.ConfigureAwait(false);
+ return @this._available > 0 ? @this.ReadByteFromBuffer() : -1;
+ }
+#endif
+ }
+
+ internal ValueTask ReadAsync(byte[] buffer, int offset, int count, in CancellationToken token = default)
+ => _available > 0
+ ? ReadFromBuffer(buffer, offset, count).AsValueTaskResult()
+ : ReadSlowAsync(buffer, offset, count, token);
+
+ private ValueTask ReadSlowAsync(byte[] buffer, int offset, int count, in CancellationToken token)
+ {
+ // if they're asking for more than we deal in, just step out of the way
+ if (count >= buffer.Length)
+ {
+#if ASYNC_MEMORY
+ return _source.ReadAsync(new Memory(buffer, offset, count), token);
+#else
+ return new ValueTask(_source.ReadAsync(buffer, offset, count, token));
+#endif
+ }
+
+ // they're asking for less, so we could still have some left
+ _offset = 0;
+#if ASYNC_MEMORY
+ var pending = _source.ReadAsync(new Memory(_buffer), token);
+ if (!pending.IsCompletedSuccessfully)
+ return Awaited(this, pending, buffer, offset, count);
+
+ _available = pending.Result; // already checked status, this is fine
+ return (_available > 0 ? ReadFromBuffer(buffer, offset, count) : 0).AsValueTaskResult();
+
+ static async ValueTask Awaited(BufferedReader @this, ValueTask pending, byte[] buffer, int offset, int count)
+ {
+ @this._available = await pending.ConfigureAwait(false);
+ return @this._available > 0 ? @this.ReadFromBuffer(buffer, offset, count) : 0;
+ }
+#else
+ var pending = _source.ReadAsync(_buffer, 0, _buffer.Length, token);
+ if (pending.Status != TaskStatus.RanToCompletion)
+ return Awaited(this, pending, buffer, offset, count);
+
+ _available = pending.Result; // already checked status, this is fine
+ return (_available > 0 ? ReadFromBuffer(buffer, offset, count) : 0).AsValueTaskResult();
+
+ static async ValueTask Awaited(BufferedReader @this, Task pending, byte[] buffer, int offset, int count)
+ {
+ @this._available = await pending.ConfigureAwait(false);
+ return @this._available > 0 ? @this.ReadFromBuffer(buffer, offset, count) : 0;
+ }
+#endif
+ }
+ }
+}
diff --git a/src/ServiceStack.Redis/BufferedReader.cs b/src/ServiceStack.Redis/BufferedReader.cs
new file mode 100644
index 00000000..b5aa67df
--- /dev/null
+++ b/src/ServiceStack.Redis/BufferedReader.cs
@@ -0,0 +1,81 @@
+using System;
+using System.IO;
+
+namespace ServiceStack.Redis
+{
+ ///
+ /// BufferedReader is a minimal buffer implementation that provides
+ /// efficient sync and async access for byte-by-byte consumption;
+ /// like BufferedStream, but with the async part
+ ///
+ internal sealed partial class BufferedReader : IDisposable
+ {
+ private readonly Stream _source;
+ readonly byte[] _buffer;
+ private int _offset, _available;
+ public void Dispose()
+ {
+ _available = 0;
+ _source.Dispose();
+ }
+ internal void Close()
+ {
+ _available = 0;
+ _source.Close();
+ }
+
+ internal BufferedReader(Stream source, int bufferSize)
+ {
+ _source = source;
+ _buffer = new byte[bufferSize];
+ Reset();
+ }
+
+ internal void Reset()
+ {
+ _offset = _available = 0;
+ }
+
+ internal int ReadByte()
+ => _available > 0 ? ReadByteFromBuffer() : ReadByteSlow();
+
+ private int ReadByteFromBuffer()
+ {
+ --_available;
+ return _buffer[_offset++];
+ }
+
+ private int ReadByteSlow()
+ {
+ _available = _source.Read(_buffer, _offset = 0, _buffer.Length);
+ return _available > 0 ? ReadByteFromBuffer() : -1;
+ }
+
+
+ private int ReadFromBuffer(byte[] buffer, int offset, int count)
+ {
+ // we have data in the buffer; hand it back
+ if (_available < count) count = _available;
+ Buffer.BlockCopy(_buffer, _offset, buffer, offset, count);
+ _available -= count;
+ _offset += count;
+ return count;
+ }
+
+ internal int Read(byte[] buffer, int offset, int count)
+ => _available > 0
+ ? ReadFromBuffer(buffer, offset, count)
+ : ReadSlow(buffer, offset, count);
+
+ private int ReadSlow(byte[] buffer, int offset, int count)
+ {
+ // if they're asking for more than we deal in, just step out of the way
+ if (count >= buffer.Length)
+ return _source.Read(buffer, offset, count);
+
+ // they're asking for less, so we could still have some left
+ _available = _source.Read(_buffer, _offset = 0, _buffer.Length);
+ return _available > 0 ? ReadFromBuffer(buffer, offset, count) : 0;
+ }
+ }
+}
diff --git a/src/ServiceStack.Redis/BufferedStream.cs b/src/ServiceStack.Redis/BufferedStream.cs
new file mode 100644
index 00000000..2d745c5f
--- /dev/null
+++ b/src/ServiceStack.Redis/BufferedStream.cs
@@ -0,0 +1,49 @@
+#if NETCORE
+using System;
+using System.IO;
+using System.Net.Sockets;
+
+namespace ServiceStack.Redis
+{
+ // recommendation: mark this obsolete as it is incomplete, and no longer used;
+ // I've marked it obsolete in DEBUG to be sure
+#if DEBUG
+ [Obsolete("Prefer System.IO.BufferedStream")]
+#endif
+ public sealed class BufferedStream : Stream
+ {
+ Stream networkStream;
+
+ public BufferedStream(Stream stream)
+ : this(stream, 0) {}
+
+ public BufferedStream(Stream stream, int bufferSize)
+ {
+ networkStream = stream;
+ }
+ public override bool CanRead => networkStream.CanRead;
+
+ public override bool CanSeek => networkStream.CanSeek;
+
+ public override bool CanWrite => networkStream.CanWrite;
+
+ public override long Position
+ {
+ get { return networkStream.Position; }
+ set { networkStream.Position = value; }
+ }
+
+ public override long Length => networkStream.Length;
+
+ public override int Read(byte[] buffer, int offset, int length) => networkStream.Read(buffer, offset, length);
+
+ public override void Write(byte[] buffer, int offset, int length) => networkStream.Write(buffer, offset, length);
+
+ public override void Flush() => networkStream.Flush();
+
+ public override void SetLength(long length) => networkStream.SetLength(length);
+
+ public override long Seek(long position, SeekOrigin origin) => networkStream.Seek(position, origin);
+ }
+}
+#endif
\ No newline at end of file
diff --git a/src/ServiceStack.Redis/Commands.cs b/src/ServiceStack.Redis/Commands.cs
index 49dbc1ec..bf4c7e62 100644
--- a/src/ServiceStack.Redis/Commands.cs
+++ b/src/ServiceStack.Redis/Commands.cs
@@ -1,3 +1,4 @@
+using System;
using ServiceStack.Text;
namespace ServiceStack.Redis
@@ -30,6 +31,7 @@ public static class Commands
public readonly static byte[] BgSave = "BGSAVE".ToUtf8Bytes();
public readonly static byte[] LastSave = "LASTSAVE".ToUtf8Bytes();
public readonly static byte[] Shutdown = "SHUTDOWN".ToUtf8Bytes();
+ public readonly static byte[] NoSave = "NOSAVE".ToUtf8Bytes();
public readonly static byte[] BgRewriteAof = "BGREWRITEAOF".ToUtf8Bytes();
public readonly static byte[] Info = "INFO".ToUtf8Bytes();
@@ -40,6 +42,7 @@ public static class Commands
public readonly static byte[] Rewrite = "REWRITE".ToUtf8Bytes();
public readonly static byte[] Time = "TIME".ToUtf8Bytes();
public readonly static byte[] Segfault = "SEGFAULT".ToUtf8Bytes();
+ public readonly static byte[] Sleep = "SLEEP".ToUtf8Bytes();
public readonly static byte[] Dump = "DUMP".ToUtf8Bytes();
public readonly static byte[] Restore = "RESTORE".ToUtf8Bytes();
public readonly static byte[] Migrate = "MIGRATE".ToUtf8Bytes();
@@ -203,5 +206,48 @@ public static class Commands
// Sentinel commands
public readonly static byte[] Sentinel = "SENTINEL".ToUtf8Bytes();
+ public readonly static byte[] Masters = "masters".ToUtf8Bytes();
+ public readonly static byte[] Sentinels = "sentinels".ToUtf8Bytes();
+ public readonly static byte[] Master = "master".ToUtf8Bytes();
+ public readonly static byte[] Slaves = "slaves".ToUtf8Bytes();
+ public readonly static byte[] Failover = "failover".ToUtf8Bytes();
+ public readonly static byte[] GetMasterAddrByName = "get-master-addr-by-name".ToUtf8Bytes();
+
+ //Geo commands
+ public readonly static byte[] GeoAdd = "GEOADD".ToUtf8Bytes();
+ public readonly static byte[] GeoDist = "GEODIST".ToUtf8Bytes();
+ public readonly static byte[] GeoHash = "GEOHASH".ToUtf8Bytes();
+ public readonly static byte[] GeoPos = "GEOPOS".ToUtf8Bytes();
+ public readonly static byte[] GeoRadius = "GEORADIUS".ToUtf8Bytes();
+ public readonly static byte[] GeoRadiusByMember = "GEORADIUSBYMEMBER".ToUtf8Bytes();
+
+ public readonly static byte[] WithCoord = "WITHCOORD".ToUtf8Bytes();
+ public readonly static byte[] WithDist = "WITHDIST".ToUtf8Bytes();
+ public readonly static byte[] WithHash = "WITHHASH".ToUtf8Bytes();
+
+ public readonly static byte[] Meters = RedisGeoUnit.Meters.ToUtf8Bytes();
+ public readonly static byte[] Kilometers = RedisGeoUnit.Kilometers.ToUtf8Bytes();
+ public readonly static byte[] Miles = RedisGeoUnit.Miles.ToUtf8Bytes();
+ public readonly static byte[] Feet = RedisGeoUnit.Feet.ToUtf8Bytes();
+
+ public static byte[] GetUnit(string unit)
+ {
+ if (unit == null)
+ throw new ArgumentNullException("unit");
+
+ switch (unit)
+ {
+ case RedisGeoUnit.Meters:
+ return Meters;
+ case RedisGeoUnit.Kilometers:
+ return Kilometers;
+ case RedisGeoUnit.Miles:
+ return Miles;
+ case RedisGeoUnit.Feet:
+ return Feet;
+ default:
+ throw new NotSupportedException("Unit '{0}' is not a valid unit".Fmt(unit));
+ }
+ }
}
}
\ No newline at end of file
diff --git a/src/ServiceStack.Redis/ConnectionUtils.cs b/src/ServiceStack.Redis/ConnectionUtils.cs
deleted file mode 100644
index f1731b3e..00000000
--- a/src/ServiceStack.Redis/ConnectionUtils.cs
+++ /dev/null
@@ -1,449 +0,0 @@
-//using System;
-//using System.Collections.Generic;
-//using System.Collections.Specialized;
-//using System.IO;
-//using System.Linq;
-//using System.Text;
-
-//namespace ServiceStack.Redis
-//{
-// ///
-// /// Provides utility methods for managing connections to multiple (master/slave) redis servers (with the same
-// /// information - not sharding).
-// ///
-// public static class ConnectionUtils
-// {
-// ///
-// /// Inspect the provided configration, and connect to the available servers to report which server is the preferred/active node.
-// ///
-// public static string SelectConfiguration(string configuration, out string[] availableEndpoints, TextWriter log = null)
-// {
-// string selected;
-// using (SelectAndCreateConnection(configuration, log, out selected, out availableEndpoints, false)) { }
-// return selected;
-// }
-// ///
-// /// Inspect the provided configration, and connect to the preferred/active node after checking what nodes are available.
-// ///
-// public static RedisConnection Connect(string configuration, TextWriter log = null)
-// {
-// string selectedConfiguration;
-// string[] availableEndpoints;
-// return SelectAndCreateConnection(configuration, log, out selectedConfiguration, out availableEndpoints, true);
-// }
-
-// ///
-// /// Subscribe to perform some operation when a change to the preferred/active node is broadcast.
-// ///
-// public static void SubscribeToMasterSwitch(RedisSubscriberConnection connection, Action handler)
-// {
-// if (connection == null) throw new ArgumentNullException("connection");
-// if (handler == null) throw new ArgumentNullException("handler");
-
-// connection.Subscribe(RedisMasterChangedChannel, (channel, message) => handler(Encoding.UTF8.GetString(message)));
-// }
-// ///
-// /// Using the configuration available, and after checking which nodes are available, switch the master node and broadcast this change.
-// ///
-// public static void SwitchMaster(string configuration, string newMaster, TextWriter log = null)
-// {
-// string newConfig;
-// string[] availableEndpoints;
-
-// SelectAndCreateConnection(configuration, log, out newConfig, out availableEndpoints, false, newMaster);
-// }
-
-// const string RedisMasterChangedChannel = "__Booksleeve_MasterChanged", TieBreakerKey = "__Booksleeve_TieBreak";
-
-// ///
-// /// Prompt all clients to reconnect.
-// ///
-// public static void BroadcastReconnectMessage(RedisConnection connection)
-// {
-// if (connection == null) throw new ArgumentNullException("connection");
-
-// connection.Wait(connection.Publish(RedisMasterChangedChannel, "*"));
-// }
-// private static RedisConnection SelectWithTieBreak(TextWriter log, List nodes, Dictionary tiebreakers)
-// {
-// if (nodes.Count == 0) return null;
-// if (nodes.Count == 1) return nodes[0];
-// Func valueOrDefault = key =>
-// {
-// int tmp;
-// if (!tiebreakers.TryGetValue(key, out tmp)) tmp = 0;
-// return tmp;
-// };
-// var tuples = (from node in nodes
-// let key = node.Host + ":" + node.Port
-// let count = valueOrDefault(key)
-// select new { Node = node, Key = key, Count = count }).ToList();
-
-// // check for uncontested scenario
-// int contenderCount = tuples.Count(x => x.Count > 0);
-// switch (contenderCount)
-// {
-// case 0:
-// log.WriteLine("No tie-break contenders; selecting arbitrary node");
-// return tuples[0].Node;
-// case 1:
-// log.WriteLine("Unaminous tie-break winner");
-// return tuples.Single(x => x.Count > 0).Node;
-// }
-
-// // contested
-// int maxCount = tuples.Max(x => x.Count);
-// var competing = tuples.Where(x => x.Count == maxCount).ToList();
-
-// switch (competing.Count)
-// {
-// case 0:
-// return null; // impossible, but never rely on the impossible not happening ;p
-// case 1:
-// log.WriteLine("Contested, but clear, tie-break winner");
-// break;
-// default:
-// log.WriteLine("Contested and ambiguous tie-break; selecting arbitrary node");
-// break;
-// }
-// return competing[0].Node;
-// }
-
-// private static string[] GetConfigurationOptions(string configuration, out int syncTimeout, out bool allowAdmin)
-// {
-// syncTimeout = 1000;
-// allowAdmin = false;
-
-// // break it down by commas
-// var arr = configuration.Split(',');
-// var options = new List();
-// foreach (var option in arr)
-// {
-// var trimmed = option.Trim();
-
-// if (trimmed.IsNullOrWhiteSpace() || options.Contains(trimmed)) continue;
-
-// // check for special tokens
-// int idx = trimmed.IndexOf('=');
-// if (idx > 0)
-// {
-// if (option.StartsWith(SyncTimeoutPrefix))
-// {
-// int tmp;
-// if (int.TryParse(option.Substring(idx + 1), out tmp)) syncTimeout = tmp;
-// continue;
-// }
-// if (option.StartsWith(AllowAdminPrefix))
-// {
-// bool tmp;
-// if (bool.TryParse(option.Substring(idx + 1), out tmp)) allowAdmin = tmp;
-// continue;
-// }
-// }
-
-// options.Add(trimmed);
-// }
-// return options.ToArray();
-// }
-
-// internal const string AllowAdminPrefix = "allowAdmin=", SyncTimeoutPrefix = "syncTimeout=";
-// private static RedisConnection SelectAndCreateConnection(string configuration, TextWriter log, out string selectedConfiguration, out string[] availableEndpoints, bool autoMaster, string newMaster = null)
-// {
-// int syncTimeout;
-// bool allowAdmin;
-// if (log == null) log = new StringWriter();
-// var arr = GetConfigurationOptions(configuration, out syncTimeout, out allowAdmin);
-// if (!newMaster.IsNullOrWhiteSpace()) allowAdmin = true; // need this to diddle the slave/master config
-
-// log.WriteLine("{0} unique nodes specified", arr.Length);
-// log.WriteLine("sync timeout: {0}ms, admin commands: {1}", syncTimeout,
-// allowAdmin ? "enabled" : "disabled");
-// if (arr.Length == 0)
-// {
-// log.WriteLine("No nodes to consider");
-// selectedConfiguration = null;
-// availableEndpoints = new string[0];
-// return null;
-// }
-// var connections = new List(arr.Length);
-// RedisConnection preferred = null;
-
-// try
-// {
-// var infos = new List>(arr.Length);
-// var tiebreakers = new List>(arr.Length);
-// foreach (var option in arr)
-// {
-// if (option.IsNullOrWhiteSpace()) continue;
-
-// RedisConnection conn = null;
-// try
-// {
-
-// var parts = option.Split(':');
-// if (parts.Length == 0) continue;
-
-// string host = parts[0].Trim();
-// int port = 6379, tmp;
-// if (parts.Length > 1 && int.TryParse(parts[1].Trim(), out tmp)) port = tmp;
-// conn = new RedisConnection(host, port, syncTimeout: syncTimeout, allowAdmin: allowAdmin);
-
-// log.WriteLine("Opening connection to {0}:{1}...", host, port);
-// conn.Open();
-// var info = conn.GetInfo();
-// var tiebreak = conn.Strings.GetString(0, TieBreakerKey);
-// connections.Add(conn);
-// infos.Add(info);
-// tiebreakers.Add(tiebreak);
-// }
-// catch (Exception ex)
-// {
-// if (conn == null)
-// {
-// log.WriteLine("Error parsing option \"{0}\": {1}", option, ex.Message);
-// }
-// else
-// {
-// log.WriteLine("Error connecting: {0}", ex.Message);
-// }
-// }
-// }
-// List masters = new List(), slaves = new List();
-// var breakerScores = new Dictionary();
-// foreach (var tiebreak in tiebreakers)
-// {
-// try
-// {
-// if (tiebreak.Wait(syncTimeout))
-// {
-// string key = tiebreak.Result;
-// if (key.IsNullOrWhiteSpace()) continue;
-// int score;
-// if (breakerScores.TryGetValue(key, out score)) breakerScores[key] = score + 1;
-// else breakerScores.Add(key, 1);
-// }
-// }
-// catch { /* if a node is down, that's fine too */ }
-// }
-// // check for tie-breakers (i.e. when we store which is the master)
-// switch (breakerScores.Count)
-// {
-// case 0:
-// log.WriteLine("No tie-breakers found");
-// break;
-// case 1:
-// log.WriteLine("Tie-breaker is unanimous: {0}", breakerScores.Keys.Single());
-// break;
-// default:
-// log.WriteLine("Ambiguous tie-breakers:");
-// foreach (var kvp in breakerScores.OrderByDescending(x => x.Value))
-// {
-// log.WriteLine("\t{0}: {1}", kvp.Key, kvp.Value);
-// }
-// break;
-// }
-
-// for (int i = 0; i < connections.Count; i++)
-// {
-// log.WriteLine("Reading configuration from {0}:{1}...", connections[i].Host, connections[i].Port);
-// try
-// {
-// if (!infos[i].Wait(syncTimeout))
-// {
-// log.WriteLine("\tTimeout fetching INFO");
-// continue;
-// }
-// var infoPairs = new StringDictionary();
-// using (var sr = new StringReader(infos[i].Result))
-// {
-// string line;
-// while ((line = sr.ReadLine()) != null)
-// {
-// int idx = line.IndexOf(':');
-// if (idx < 0) continue;
-// string key = line.Substring(0, idx).Trim(),
-// value = line.Substring(idx + 1, line.Length - (idx + 1)).Trim();
-// infoPairs[key] = value;
-// }
-// }
-// string role = infoPairs["role"];
-// switch (role)
-// {
-// case "slave":
-// log.WriteLine("\tServer is SLAVE of {0}:{1}",
-// infoPairs["master_host"], infoPairs["master_port"]);
-// log.Write("\tLink is {0}, seen {1} seconds ago",
-// infoPairs["master_link_status"], infoPairs["master_last_io_seconds_ago"]);
-// if (infoPairs["master_sync_in_progress"] == "1") log.Write(" (sync is in progress)");
-// log.WriteLine();
-// slaves.Add(connections[i]);
-// break;
-// case "master":
-// log.WriteLine("\tServer is MASTER, with {0} slaves", infoPairs["connected_slaves"]);
-// masters.Add(connections[i]);
-// break;
-// default:
-// log.WriteLine("\tUnknown role: {0}", role);
-// break;
-// }
-// string tmp = infoPairs["connected_clients"];
-// int clientCount, channelCount, patternCount;
-// if (tmp.IsNullOrWhiteSpace() || !int.TryParse(tmp, out clientCount)) clientCount = -1;
-// tmp = infoPairs["pubsub_channels"];
-// if (tmp.IsNullOrWhiteSpace(tmp) || !int.TryParse(tmp, out channelCount)) channelCount = -1;
-// tmp = infoPairs["pubsub_patterns"];
-// if (tmp.IsNullOrWhiteSpace(tmp) || !int.TryParse(tmp, out patternCount)) patternCount = -1;
-// log.WriteLine("\tClients: {0}; channels: {1}; patterns: {2}", clientCount, channelCount, patternCount);
-// }
-// catch (Exception ex)
-// {
-// log.WriteLine("\tError reading INFO results: {0}", ex.Message);
-// }
-// }
-
-// if (newMaster == null)
-// {
-// switch (masters.Count)
-// {
-// case 0:
-// switch (slaves.Count)
-// {
-// case 0:
-// log.WriteLine("No masters or slaves found");
-// break;
-// case 1:
-// log.WriteLine("No masters found; selecting single slave");
-// preferred = slaves[0];
-// break;
-// default:
-// log.WriteLine("No masters found; considering {0} slaves...", slaves.Count);
-// preferred = SelectWithTieBreak(log, slaves, breakerScores);
-// break;
-// }
-// if (preferred != null)
-// {
-// if (autoMaster)
-// {
-// //LogException("Promoting redis SLAVE to MASTER");
-// log.WriteLine("Promoting slave to master...");
-// if (allowAdmin)
-// { // can do on this connection
-// preferred.Wait(preferred.Server.MakeMaster());
-// }
-// else
-// { // need an admin connection for this
-// using (var adminPreferred = new RedisConnection(preferred.Host, preferred.Port, allowAdmin: true, syncTimeout: syncTimeout))
-// {
-// adminPreferred.Open();
-// adminPreferred.Wait(adminPreferred.Server.MakeMaster());
-// }
-// }
-// }
-// else
-// {
-// log.WriteLine("Slave should be promoted to master (but not done yet)...");
-// }
-// }
-// break;
-// case 1:
-// log.WriteLine("One master found; selecting");
-// preferred = masters[0];
-// break;
-// default:
-// log.WriteLine("Considering {0} masters...", masters.Count);
-// preferred = SelectWithTieBreak(log, masters, breakerScores);
-// break;
-// }
-
-
-// }
-// else
-// { // we have been instructed to change master server
-// preferred = masters.Concat(slaves).FirstOrDefault(conn => (conn.Host + ":" + conn.Port) == newMaster);
-// if (preferred == null)
-// {
-// log.WriteLine("Selected new master not available: {0}", newMaster);
-// }
-// else
-// {
-// int errorCount = 0;
-// try
-// {
-// log.WriteLine("Promoting to master: {0}:{1}...", preferred.Host, preferred.Port);
-// preferred.Wait(preferred.Server.MakeMaster());
-// preferred.Strings.Set(0, TieBreakerKey, newMaster);
-// preferred.Wait(preferred.Publish(RedisMasterChangedChannel, newMaster));
-// }
-// catch (Exception ex)
-// {
-// log.WriteLine("\t{0}", ex.Message);
-// errorCount++;
-// }
-
-// if (errorCount == 0) // only make slaves if the master was happy
-// {
-// foreach (var conn in masters.Concat(slaves))
-// {
-// if (conn == preferred) continue; // can't make self a slave!
-
-// try
-// {
-// log.WriteLine("Enslaving: {0}:{1}...", conn.Host, conn.Port);
-// // set the tie-breaker **first** in case of problems
-// conn.Strings.Set(0, TieBreakerKey, newMaster);
-// // and broadcast to anyone who thinks this is the master
-// conn.Publish(RedisMasterChangedChannel, newMaster);
-// // now make it a slave
-// conn.Wait(conn.Server.MakeSlave(preferred.Host, preferred.Port));
-// }
-// catch (Exception ex)
-// {
-// log.WriteLine("\t{0}", ex.Message);
-// errorCount++;
-// }
-// }
-// }
-// if (errorCount != 0)
-// {
-// log.WriteLine("Things didn't go smoothly; CHECK WHAT HAPPENED!");
-// }
-
-// // want the connection disposed etc
-// preferred = null;
-// }
-// }
-
-// if (preferred == null)
-// {
-// selectedConfiguration = null;
-// }
-// else
-// {
-// selectedConfiguration = preferred.Host + ":" + preferred.Port;
-// log.WriteLine("Selected server {0}", selectedConfiguration);
-// }
-
-// availableEndpoints = (from conn in masters.Concat(slaves)
-// select conn.Host + ":" + conn.Port).ToArray();
-// return preferred;
-// }
-// finally
-// {
-// foreach (var conn in connections)
-// {
-// if (conn != null && conn != preferred) try { conn.Dispose(); }
-// catch { }
-// }
-// }
-// }
-
-// }
-
-// public static class ConnectionUtilsExtensions
-// {
-// public static bool IsNullOrWhiteSpace(this string str)
-// {
-// return str == null || str.Trim().Length == 0;
-// }
-// }
-//}
\ No newline at end of file
diff --git a/src/ServiceStack.Redis/Generic/QueuedRedisTypedCommand.Async.cs b/src/ServiceStack.Redis/Generic/QueuedRedisTypedCommand.Async.cs
new file mode 100644
index 00000000..0c75d760
--- /dev/null
+++ b/src/ServiceStack.Redis/Generic/QueuedRedisTypedCommand.Async.cs
@@ -0,0 +1,110 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using ServiceStack.Redis.Generic;
+using ServiceStack.Redis.Internal;
+using ServiceStack.Redis.Pipeline;
+
+namespace ServiceStack.Redis.Generic
+{
+ ///
+ /// A complete redis command, with method to send command, receive response, and run callback on success or failure
+ ///
+ internal partial class QueuedRedisTypedCommand : QueuedRedisOperation
+ {
+ private Delegate _asyncReturnCommand;
+ partial void OnExecuteThrowIfAsync()
+ {
+ if (_asyncReturnCommand is object)
+ {
+ throw new InvalidOperationException("An async return command was present, but the queued operation is being processed synchronously");
+ }
+ }
+ private QueuedRedisTypedCommand SetAsyncReturnCommand(Delegate value)
+ {
+ if (_asyncReturnCommand is object && _asyncReturnCommand != value)
+ throw new InvalidOperationException("Only a single async return command can be assigned");
+ _asyncReturnCommand = value;
+ return this;
+ }
+
+ internal QueuedRedisTypedCommand WithAsyncReturnCommand(Func, ValueTask> VoidReturnCommandAsync)
+ => SetAsyncReturnCommand(VoidReturnCommandAsync);
+ internal QueuedRedisTypedCommand WithAsyncReturnCommand(Func, ValueTask> IntReturnCommandAsync)
+ => SetAsyncReturnCommand(IntReturnCommandAsync);
+ internal QueuedRedisTypedCommand WithAsyncReturnCommand(Func, ValueTask> LongReturnCommandAsync)
+ => SetAsyncReturnCommand(LongReturnCommandAsync);
+ internal QueuedRedisTypedCommand WithAsyncReturnCommand(Func, ValueTask> BoolReturnCommandAsync)
+ => SetAsyncReturnCommand(BoolReturnCommandAsync);
+ internal QueuedRedisTypedCommand WithAsyncReturnCommand(Func, ValueTask> BytesReturnCommandAsync)
+ => SetAsyncReturnCommand(BytesReturnCommandAsync);
+ internal QueuedRedisTypedCommand WithAsyncReturnCommand(Func, ValueTask> MultiBytesReturnCommandAsync)
+ => SetAsyncReturnCommand(MultiBytesReturnCommandAsync);
+ internal QueuedRedisTypedCommand WithAsyncReturnCommand(Func, ValueTask> StringReturnCommandAsync)
+ => SetAsyncReturnCommand(StringReturnCommandAsync);
+ internal QueuedRedisTypedCommand WithAsyncReturnCommand(Func, ValueTask>> MultiStringReturnCommandAsync)
+ => SetAsyncReturnCommand(MultiStringReturnCommandAsync);
+ internal QueuedRedisTypedCommand WithAsyncReturnCommand(Func, ValueTask> DoubleReturnCommandAsync)
+ => SetAsyncReturnCommand(DoubleReturnCommandAsync);
+ internal QueuedRedisTypedCommand WithAsyncReturnCommand(Func, ValueTask>> MultiObjectReturnCommandAsync)
+ => SetAsyncReturnCommand(MultiObjectReturnCommandAsync);
+ internal QueuedRedisTypedCommand WithAsyncReturnCommand(Func, ValueTask> ObjectReturnCommandAsync)
+ => SetAsyncReturnCommand(ObjectReturnCommandAsync);
+
+ public ValueTask ExecuteAsync(IRedisTypedClientAsync client)
+ {
+ try
+ {
+ switch (_asyncReturnCommand)
+ {
+ case null:
+ ExecuteThrowIfSync();
+ return default;
+ case Func, ValueTask> VoidReturnCommandAsync:
+ return VoidReturnCommandAsync(client);
+ case Func, ValueTask> IntReturnCommandAsync:
+ return IntReturnCommandAsync(client).Await();
+ case Func, ValueTask> LongReturnCommandAsync:
+ return LongReturnCommandAsync(client).Await();
+ case Func, ValueTask> DoubleReturnCommandAsync:
+ return DoubleReturnCommandAsync(client).Await();
+ case Func, ValueTask> BytesReturnCommandAsync:
+ return BytesReturnCommandAsync(client).Await();
+ case Func, ValueTask> StringReturnCommandAsync:
+ return StringReturnCommandAsync(client).Await();
+ case Func, ValueTask> MultiBytesReturnCommandAsync:
+ return MultiBytesReturnCommandAsync(client).Await();
+ case Func, ValueTask>> MultiStringReturnCommandAsync:
+ return MultiStringReturnCommandAsync(client).Await();
+ case object obj:
+ ExecuteThrowIfSync();
+ return default;
+ }
+ }
+ catch (Exception ex)
+ {
+ Log.Error(ex);
+ return default; // non-async version swallows
+ }
+ }
+
+ protected void ExecuteThrowIfSync()
+ {
+ if (VoidReturnCommand is object
+ || IntReturnCommand is object
+ || LongReturnCommand is object
+ || BoolReturnCommand is object
+ || BytesReturnCommand is object
+ || MultiBytesReturnCommand is object
+ || StringReturnCommand is object
+ || MultiStringReturnCommand is object
+ || DoubleReturnCommand is object
+ || MultiObjectReturnCommand is object
+ || ObjectReturnCommand is object)
+ {
+ throw new InvalidOperationException("A sync return command was present, but the queued operation is being processed asynchronously");
+ }
+ }
+
+ }
+}
diff --git a/src/ServiceStack.Redis/Generic/QueuedRedisTypedCommand.cs b/src/ServiceStack.Redis/Generic/QueuedRedisTypedCommand.cs
index ca8b2870..fe9c8b0b 100644
--- a/src/ServiceStack.Redis/Generic/QueuedRedisTypedCommand.cs
+++ b/src/ServiceStack.Redis/Generic/QueuedRedisTypedCommand.cs
@@ -1,14 +1,14 @@
-using System;
+using ServiceStack.Redis.Pipeline;
+using System;
using System.Collections.Generic;
-using ServiceStack.Redis.Generic;
-using ServiceStack.Redis.Pipeline;
+using System.Threading.Tasks;
namespace ServiceStack.Redis.Generic
{
///
/// A complete redis command, with method to send command, receive response, and run callback on success or failure
///
- internal class QueuedRedisTypedCommand : QueuedRedisOperation
+ internal partial class QueuedRedisTypedCommand : QueuedRedisOperation
{
public Action> VoidReturnCommand { get; set; }
@@ -74,5 +74,7 @@ public void Execute(IRedisTypedClient client)
}
}
+ private void ExecuteThrowIfAsync() => OnExecuteThrowIfAsync();
+ partial void OnExecuteThrowIfAsync();
}
}
diff --git a/src/ServiceStack.Redis/Generic/RedisClientHash.Generic.Async.cs b/src/ServiceStack.Redis/Generic/RedisClientHash.Generic.Async.cs
new file mode 100644
index 00000000..86de9a27
--- /dev/null
+++ b/src/ServiceStack.Redis/Generic/RedisClientHash.Generic.Async.cs
@@ -0,0 +1,55 @@
+//
+// https://github.com/ServiceStack/ServiceStack.Redis
+// ServiceStack.Redis: ECMA CLI Binding to the Redis key-value storage system
+//
+// Authors:
+// Demis Bellot (demis.bellot@gmail.com)
+//
+// Copyright 2013 ServiceStack, Inc. All Rights Reserved.
+//
+// Licensed under the same terms of ServiceStack.
+//
+
+using ServiceStack.Redis.Internal;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace ServiceStack.Redis.Generic
+{
+ internal partial class RedisClientHash
+ : IRedisHashAsync
+ {
+ IRedisTypedClientAsync AsyncClient => client;
+
+ ValueTask IRedisHashAsync.AddAsync(KeyValuePair item, CancellationToken token)
+ => AsyncClient.SetEntryInHashAsync(this, item.Key, item.Value, token).Await();
+
+ ValueTask IRedisHashAsync.AddAsync(TKey key, T value, CancellationToken token)
+ => AsyncClient.SetEntryInHashAsync(this, key, value, token).Await();
+
+ ValueTask IRedisHashAsync.ClearAsync(CancellationToken token)
+ => AsyncClient.RemoveEntryAsync(new[] { this }, token).Await();
+
+ ValueTask IRedisHashAsync.ContainsKeyAsync(TKey key, CancellationToken token)
+ => AsyncClient.HashContainsEntryAsync(this, key, token);
+
+ ValueTask IRedisHashAsync.CountAsync(CancellationToken token)
+ => AsyncClient.GetHashCountAsync(this, token).AsInt32();
+
+ ValueTask> IRedisHashAsync.GetAllAsync(CancellationToken token)
+ => AsyncClient.GetAllEntriesFromHashAsync(this, token);
+
+ async IAsyncEnumerator> IAsyncEnumerable>.GetAsyncEnumerator(CancellationToken token)
+ {
+ var all = await AsyncClient.GetAllEntriesFromHashAsync(this, token).ConfigureAwait(false);
+ foreach (var pair in all)
+ {
+ yield return pair;
+ }
+ }
+
+ ValueTask IRedisHashAsync.RemoveAsync(TKey key, CancellationToken token)
+ => AsyncClient.RemoveEntryFromHashAsync(this, key, token);
+ }
+}
\ No newline at end of file
diff --git a/src/ServiceStack.Redis/Generic/RedisClientHash.Generic.cs b/src/ServiceStack.Redis/Generic/RedisClientHash.Generic.cs
index f128c895..20fd91bc 100644
--- a/src/ServiceStack.Redis/Generic/RedisClientHash.Generic.cs
+++ b/src/ServiceStack.Redis/Generic/RedisClientHash.Generic.cs
@@ -5,7 +5,7 @@
// Authors:
// Demis Bellot (demis.bellot@gmail.com)
//
-// Copyright 2013 Service Stack LLC. All Rights Reserved.
+// Copyright 2013 ServiceStack, Inc. All Rights Reserved.
//
// Licensed under the same terms of ServiceStack.
//
@@ -19,7 +19,7 @@ namespace ServiceStack.Redis.Generic
///
/// Wrap the common redis set operations under a ICollection[string] interface.
///
- internal class RedisClientHash
+ internal partial class RedisClientHash
: IRedisHash
{
private readonly RedisTypedClient client;
diff --git a/src/ServiceStack.Redis/Generic/RedisClientList.Generic.Async.cs b/src/ServiceStack.Redis/Generic/RedisClientList.Generic.Async.cs
new file mode 100644
index 00000000..66b3e596
--- /dev/null
+++ b/src/ServiceStack.Redis/Generic/RedisClientList.Generic.Async.cs
@@ -0,0 +1,184 @@
+//
+// https://github.com/ServiceStack/ServiceStack.Redis
+// ServiceStack.Redis: ECMA CLI Binding to the Redis key-value storage system
+//
+// Authors:
+// Demis Bellot (demis.bellot@gmail.com)
+//
+// Copyright 2013 ServiceStack, Inc. All Rights Reserved.
+//
+// Licensed under the same terms of ServiceStack.
+//
+
+using ServiceStack.Redis.Internal;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace ServiceStack.Redis.Generic
+{
+ internal partial class RedisClientList
+ : IRedisListAsync
+ {
+ IRedisTypedClientAsync AsyncClient => client;
+ IRedisListAsync AsAsync() => this;
+
+ async ValueTask IRedisListAsync.AddRangeAsync(IEnumerable values, CancellationToken token)
+ {
+ //TODO: replace it with a pipeline implementation ala AddRangeToSet
+ foreach (var value in values)
+ {
+ await AsyncClient.AddItemToListAsync(this, value, token).ConfigureAwait(false);
+ }
+ }
+
+ ValueTask IRedisListAsync.AppendAsync(T value, CancellationToken token)
+ => AsyncClient.AddItemToListAsync(this, value, token);
+
+ ValueTask IRedisListAsync.BlockingDequeueAsync(TimeSpan? timeOut, CancellationToken token)
+ => AsyncClient.BlockingDequeueItemFromListAsync(this, timeOut, token);
+
+ ValueTask IRedisListAsync.BlockingPopAsync(TimeSpan? timeOut, CancellationToken token)
+ => AsyncClient.BlockingPopItemFromListAsync(this, timeOut, token);
+
+ ValueTask IRedisListAsync.BlockingRemoveStartAsync(TimeSpan? timeOut, CancellationToken token)
+ => AsyncClient.BlockingRemoveStartFromListAsync(this, timeOut, token);
+
+ ValueTask IRedisListAsync