yuqian %!s(int64=8) %!d(string=před) roky
revize
31c401ea84

+ 13 - 0
.gitignore

@@ -0,0 +1,13 @@
1
+################################################################################
2
+# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
3
+################################################################################
4
+
5
+/DemoRedis/DemoRedis01/obj
6
+/DemoRedis/DemoRedis01/bin/Debug/netcoreapp2.0
7
+/DemoRedis/DemoRedis01
8
+/DemoRedis/DemoRedis00/obj
9
+/DemoRedis/DemoRedis00/bin/Debug/netcoreapp2.0
10
+/DemoRedis/DemoRedis00
11
+/DemoRedis/.vs
12
+/DemoRedis
13
+/.vs

+ 31 - 0
DemoRedis/DemoRedis.sln

@@ -0,0 +1,31 @@
1
+
2
+Microsoft Visual Studio Solution File, Format Version 12.00
3
+# Visual Studio 15
4
+VisualStudioVersion = 15.0.27130.2024
5
+MinimumVisualStudioVersion = 10.0.40219.1
6
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DemoRedis01", "DemoRedis01\DemoRedis01.csproj", "{FB4BAB46-35BD-443B-BB08-FFDD3D69D982}"
7
+EndProject
8
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoRedis00", "DemoRedis00\DemoRedis00.csproj", "{9039E667-C9E2-4F8B-8E17-2751404062E3}"
9
+EndProject
10
+Global
11
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
12
+		Debug|Any CPU = Debug|Any CPU
13
+		Release|Any CPU = Release|Any CPU
14
+	EndGlobalSection
15
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
16
+		{FB4BAB46-35BD-443B-BB08-FFDD3D69D982}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17
+		{FB4BAB46-35BD-443B-BB08-FFDD3D69D982}.Debug|Any CPU.Build.0 = Debug|Any CPU
18
+		{FB4BAB46-35BD-443B-BB08-FFDD3D69D982}.Release|Any CPU.ActiveCfg = Release|Any CPU
19
+		{FB4BAB46-35BD-443B-BB08-FFDD3D69D982}.Release|Any CPU.Build.0 = Release|Any CPU
20
+		{9039E667-C9E2-4F8B-8E17-2751404062E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21
+		{9039E667-C9E2-4F8B-8E17-2751404062E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
22
+		{9039E667-C9E2-4F8B-8E17-2751404062E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
23
+		{9039E667-C9E2-4F8B-8E17-2751404062E3}.Release|Any CPU.Build.0 = Release|Any CPU
24
+	EndGlobalSection
25
+	GlobalSection(SolutionProperties) = preSolution
26
+		HideSolutionNode = FALSE
27
+	EndGlobalSection
28
+	GlobalSection(ExtensibilityGlobals) = postSolution
29
+		SolutionGuid = {46487A81-74EA-43A0-A229-76943410C93D}
30
+	EndGlobalSection
31
+EndGlobal

+ 19 - 0
DemoRedis/DemoRedis00/DemoRedis00.csproj

@@ -0,0 +1,19 @@
1
+<Project Sdk="Microsoft.NET.Sdk">
2
+
3
+  <PropertyGroup>
4
+    <OutputType>Exe</OutputType>
5
+    <TargetFramework>netcoreapp2.0</TargetFramework>
6
+  </PropertyGroup>
7
+
8
+  <ItemGroup>
9
+    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
10
+    <PackageReference Include="StackExchange.Redis.StrongName" Version="1.2.6" />
11
+  </ItemGroup>
12
+
13
+  <ItemGroup>
14
+    <Reference Include="Microsoft.Extensions.Configuration.Abstractions">
15
+      <HintPath>C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.configuration.abstractions\2.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
16
+    </Reference>
17
+  </ItemGroup>
18
+
19
+</Project>

+ 32 - 0
DemoRedis/DemoRedis00/Program.cs

@@ -0,0 +1,32 @@
1
+using System;
2
+using System.IO;
3
+using Microsoft.Extensions.Configuration;
4
+
5
+namespace DemoRedis00
6
+{
7
+    class Program
8
+    {
9
+        static void Main(string[] args)
10
+        {
11
+            var builder = new ConfigurationBuilder()
12
+             .SetBasePath(Directory.GetCurrentDirectory())
13
+             .AddJsonFile("appsettings.json");
14
+            IConfiguration configuration = builder.Build();
15
+
16
+            var redisClient = RedisClientSingleton.GetInstance(configuration);
17
+            var redisDatabase = redisClient.GetDatabase("Redis_Default");
18
+
19
+            //redisDatabase.StringSet("TestStrKey", "TestStrValue");
20
+
21
+            Console.WriteLine($"写入值redisDatabase.StringSet()  {redisDatabase.StringSet("TestStrKey", "TestStrValue")}");
22
+            Console.WriteLine($"写入值异步redisDatabase.StringSetAsync()  {redisDatabase.StringSetAsync("TestStrKey", "TestStrValue").Result}");
23
+            Console.WriteLine($"获取值 redisDatabase.StringGet()  {redisDatabase.StringGet("TestStrKey")}");
24
+            Console.WriteLine($"获取值异步 redisDatabase.StringGetAsync()  {redisDatabase.StringGetAsync("TestStrKey").Result}");
25
+
26
+
27
+
28
+
29
+            Console.ReadKey();
30
+        }
31
+    }
32
+}

+ 107 - 0
DemoRedis/DemoRedis00/RedisClient.cs

@@ -0,0 +1,107 @@
1
+
2
+using Microsoft.Extensions.Configuration;
3
+using StackExchange.Redis;
4
+using System;
5
+using System.Collections.Concurrent;
6
+using System.Collections.Generic;
7
+using System.Linq;
8
+using System.Threading.Tasks;
9
+
10
+namespace DemoRedis00
11
+{
12
+    public class RedisClient : IDisposable
13
+    {
14
+        private IConfiguration _config;
15
+        private ConcurrentDictionary<string, ConnectionMultiplexer> _connections;
16
+        public RedisClient(IConfiguration config)
17
+        {
18
+            _config = config;
19
+            _connections = new ConcurrentDictionary<string, ConnectionMultiplexer>();
20
+        }
21
+        /// <summary>
22
+        /// 获取ConnectionMultiplexer
23
+        /// </summary>
24
+        /// <param name="redisConfig">RedisConfig配置文件</param>
25
+        /// <returns></returns>
26
+        private ConnectionMultiplexer GetConnect(IConfigurationSection redisConfig)
27
+        {
28
+            var redisInstanceName = redisConfig["InstanceName"];
29
+            var connStr = redisConfig["Connection"];
30
+            return _connections.GetOrAdd(redisInstanceName, p => ConnectionMultiplexer.Connect(connStr));
31
+        }
32
+        /// <summary>
33
+        /// 检查入参数
34
+        /// </summary>
35
+        /// <param name="configName">RedisConfig配置文件中的 Redis_Default/Redis_6 名称</param>
36
+        /// <returns></returns>
37
+        private IConfigurationSection CheckeConfig(string configName)
38
+        {
39
+            IConfigurationSection redisConfig = _config.GetSection("RedisConfig").GetSection(configName);
40
+            if (redisConfig == null)
41
+            {
42
+                throw new ArgumentNullException($"{configName}找不到对应的RedisConfig配置!");
43
+            }
44
+            var redisInstanceName = redisConfig["InstanceName"];
45
+            var connStr = redisConfig["Connection"];
46
+            if (string.IsNullOrEmpty(redisInstanceName))
47
+            {
48
+                throw new ArgumentNullException($"{configName}找不到对应的InstanceName");
49
+            }
50
+            if (string.IsNullOrEmpty(connStr))
51
+            {
52
+                throw new ArgumentNullException($"{configName}找不到对应的Connection");
53
+            }
54
+            return redisConfig;
55
+        }
56
+        /// <summary>
57
+        /// 获取数据库
58
+        /// </summary>
59
+        /// <param name="configName"></param>
60
+        /// <param name="db">默认为0:优先代码的db配置,其次config中的配置</param>
61
+        /// <returns></returns>
62
+        public IDatabase GetDatabase(string configName = null, int? db = null)
63
+        {
64
+            int defaultDb = 0;
65
+            IConfigurationSection redisConfig = CheckeConfig(configName);
66
+            if (db.HasValue)
67
+            {
68
+                defaultDb = db.Value;
69
+            }
70
+            else
71
+            {
72
+                var strDefalutDatabase = redisConfig["DefaultDatabase"];
73
+                if (!string.IsNullOrEmpty(strDefalutDatabase) && Int32.TryParse(strDefalutDatabase, out var intDefaultDatabase))
74
+                {
75
+                    defaultDb = intDefaultDatabase;
76
+                }
77
+            }
78
+            return GetConnect(redisConfig).GetDatabase(defaultDb);
79
+        }
80
+
81
+        public IServer GetServer(string configName = null, int endPointsIndex = 0)
82
+        {
83
+            IConfigurationSection redisConfig = CheckeConfig(configName);
84
+            var connStr = redisConfig["Connection"];
85
+
86
+            var confOption = ConfigurationOptions.Parse((string)connStr);
87
+            return GetConnect(redisConfig).GetServer(confOption.EndPoints[endPointsIndex]);
88
+        }
89
+
90
+        public ISubscriber GetSubscriber(string configName = null)
91
+        {
92
+            IConfigurationSection redisConfig = CheckeConfig(configName);
93
+            return GetConnect(redisConfig).GetSubscriber();
94
+        }
95
+
96
+        public void Dispose()
97
+        {
98
+            if (_connections != null && _connections.Count > 0)
99
+            {
100
+                foreach (var item in _connections.Values)
101
+                {
102
+                    item.Close();
103
+                }
104
+            }
105
+        }
106
+    }
107
+}

+ 30 - 0
DemoRedis/DemoRedis00/RedisClientSingleton.cs

@@ -0,0 +1,30 @@
1
+using Microsoft.Extensions.Configuration;
2
+using System;
3
+using System.Collections.Generic;
4
+using System.Linq;
5
+using System.Threading.Tasks;
6
+
7
+namespace DemoRedis00
8
+{
9
+    public class RedisClientSingleton
10
+    {
11
+        private static RedisClient _redisClinet;
12
+        private RedisClientSingleton() { }
13
+
14
+        private static object _lockObj = new object();
15
+        public static RedisClient GetInstance(IConfiguration config)
16
+        {
17
+            if (_redisClinet == null)
18
+            {
19
+                lock (_lockObj)
20
+                {
21
+                    if (_redisClinet == null)
22
+                    {
23
+                        _redisClinet = new RedisClient(config);
24
+                    }
25
+                }
26
+            }
27
+            return _redisClinet;
28
+        }
29
+    }
30
+}

+ 13 - 0
DemoRedis/DemoRedis00/appsettings.json

@@ -0,0 +1,13 @@
1
+{
2
+  "RedisConfig": {
3
+    "Redis_Default": {
4
+      "Connection": "127.0.0.1:6379",
5
+      "InstanceName": "Redis1:"
6
+    },
7
+    "Redis_6": {
8
+      "Connection": "127.0.0.1:6379",
9
+      "DefaultDatabase": 6,
10
+      "InstanceName": "Redis2:"
11
+    }
12
+  }
13
+}

+ 46 - 0
DemoRedis/DemoRedis01/Controllers/ValuesController.cs

@@ -0,0 +1,46 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Threading.Tasks;
5
+using Microsoft.AspNetCore.Mvc;
6
+using Microsoft.Extensions.Configuration;
7
+using StackExchange.Redis;
8
+
9
+namespace DemoRedis01.Controllers
10
+{
11
+    [Route("[controller]/[action]")]
12
+    public class ValuesController : Controller
13
+    {
14
+        private IConfiguration _configuration;
15
+        private IDatabase _redisDatabase;
16
+        public ValuesController(IConfiguration configuration)
17
+        {
18
+            _configuration = configuration;
19
+            var redisClient = RedisClientSingleton.GetInstance(_configuration);
20
+            _redisDatabase = redisClient.GetDatabase("Redis_Default");
21
+        }
22
+        public string Set(string key, string value)
23
+        {
24
+            var flag = _redisDatabase.StringSet(key, value);
25
+            return $"写入值 {flag.ToString()} ";
26
+        }
27
+
28
+        public string Get(string key)
29
+        {
30
+            var value = _redisDatabase.StringGet(key);
31
+            return $"获取值 {value}";
32
+        }
33
+
34
+        public async Task<string> SetAsync(string key, string value)
35
+        {
36
+            var flag = await _redisDatabase.StringSetAsync(key, value);
37
+            return $"写入值 {flag.ToString()}";
38
+        }
39
+
40
+        public async Task<string> GetAsync(string key)
41
+        {
42
+            var value = await _redisDatabase.StringGetAsync(key);
43
+            return $"获取值 {value}";
44
+        }
45
+    }
46
+}

+ 20 - 0
DemoRedis/DemoRedis01/DemoRedis01.csproj

@@ -0,0 +1,20 @@
1
+<Project Sdk="Microsoft.NET.Sdk.Web">
2
+
3
+  <PropertyGroup>
4
+    <TargetFramework>netcoreapp2.0</TargetFramework>
5
+  </PropertyGroup>
6
+
7
+  <ItemGroup>
8
+    <Folder Include="wwwroot\" />
9
+  </ItemGroup>
10
+
11
+  <ItemGroup>
12
+    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
13
+    <PackageReference Include="StackExchange.Redis.StrongName" Version="1.2.6" />
14
+  </ItemGroup>
15
+
16
+  <ItemGroup>
17
+    <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.2" />
18
+  </ItemGroup>
19
+
20
+</Project>

+ 9 - 0
DemoRedis/DemoRedis01/DemoRedis01.csproj.user

@@ -0,0 +1,9 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
4
+    <DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
5
+  </PropertyGroup>
6
+  <PropertyGroup>
7
+    <ActiveDebugProfile>DemoRedis01</ActiveDebugProfile>
8
+  </PropertyGroup>
9
+</Project>

+ 25 - 0
DemoRedis/DemoRedis01/Program.cs

@@ -0,0 +1,25 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.IO;
4
+using System.Linq;
5
+using System.Threading.Tasks;
6
+using Microsoft.AspNetCore;
7
+using Microsoft.AspNetCore.Hosting;
8
+using Microsoft.Extensions.Configuration;
9
+using Microsoft.Extensions.Logging;
10
+
11
+namespace DemoRedis01
12
+{
13
+    public class Program
14
+    {
15
+        public static void Main(string[] args)
16
+        {
17
+            BuildWebHost(args).Run();
18
+        }
19
+
20
+        public static IWebHost BuildWebHost(string[] args) =>
21
+            WebHost.CreateDefaultBuilder(args)
22
+                .UseStartup<Startup>()
23
+                .Build();
24
+    }
25
+}

+ 29 - 0
DemoRedis/DemoRedis01/Properties/launchSettings.json

@@ -0,0 +1,29 @@
1
+{
2
+  "iisSettings": {
3
+    "windowsAuthentication": false,
4
+    "anonymousAuthentication": true,
5
+    "iisExpress": {
6
+      "applicationUrl": "http://localhost:24617/",
7
+      "sslPort": 0
8
+    }
9
+  },
10
+  "profiles": {
11
+    "IIS Express": {
12
+      "commandName": "IISExpress",
13
+      "launchBrowser": true,
14
+      "launchUrl": "api/values",
15
+      "environmentVariables": {
16
+        "ASPNETCORE_ENVIRONMENT": "Development"
17
+      }
18
+    },
19
+    "DemoRedis01": {
20
+      "commandName": "Project",
21
+      "launchBrowser": true,
22
+      "launchUrl": "api/values",
23
+      "environmentVariables": {
24
+        "ASPNETCORE_ENVIRONMENT": "Development"
25
+      },
26
+      "applicationUrl": "http://localhost:24618/"
27
+    }
28
+  }
29
+}

+ 107 - 0
DemoRedis/DemoRedis01/RedisClient.cs

@@ -0,0 +1,107 @@
1
+
2
+using Microsoft.Extensions.Configuration;
3
+using StackExchange.Redis;
4
+using System;
5
+using System.Collections.Concurrent;
6
+using System.Collections.Generic;
7
+using System.Linq;
8
+using System.Threading.Tasks;
9
+
10
+namespace DemoRedis01
11
+{
12
+    public class RedisClient : IDisposable
13
+    {
14
+        private IConfiguration _config;
15
+        private ConcurrentDictionary<string, ConnectionMultiplexer> _connections;
16
+        public RedisClient(IConfiguration config)
17
+        {
18
+            _config = config;
19
+            _connections = new ConcurrentDictionary<string, ConnectionMultiplexer>();
20
+        }
21
+        /// <summary>
22
+        /// 获取ConnectionMultiplexer
23
+        /// </summary>
24
+        /// <param name="redisConfig">RedisConfig配置文件</param>
25
+        /// <returns></returns>
26
+        private ConnectionMultiplexer GetConnect(IConfigurationSection redisConfig)
27
+        {
28
+            var redisInstanceName = redisConfig["InstanceName"];
29
+            var connStr = redisConfig["Connection"];
30
+            return _connections.GetOrAdd(redisInstanceName, p => ConnectionMultiplexer.Connect(connStr));
31
+        }
32
+        /// <summary>
33
+        /// 检查入参数
34
+        /// </summary>
35
+        /// <param name="configName">RedisConfig配置文件中的 Redis_Default/Redis_6 名称</param>
36
+        /// <returns></returns>
37
+        private IConfigurationSection CheckeConfig(string configName)
38
+        {
39
+            IConfigurationSection redisConfig = _config.GetSection("RedisConfig").GetSection(configName);
40
+            if (redisConfig == null)
41
+            {
42
+                throw new ArgumentNullException($"{configName}找不到对应的RedisConfig配置!");
43
+            }
44
+            var redisInstanceName = redisConfig["InstanceName"];
45
+            var connStr = redisConfig["Connection"];
46
+            if (string.IsNullOrEmpty(redisInstanceName))
47
+            {
48
+                throw new ArgumentNullException($"{configName}找不到对应的InstanceName");
49
+            }
50
+            if (string.IsNullOrEmpty(connStr))
51
+            {
52
+                throw new ArgumentNullException($"{configName}找不到对应的Connection");
53
+            }
54
+            return redisConfig;
55
+        }
56
+        /// <summary>
57
+        /// 获取数据库
58
+        /// </summary>
59
+        /// <param name="configName"></param>
60
+        /// <param name="db">默认为0:优先代码的db配置,其次config中的配置</param>
61
+        /// <returns></returns>
62
+        public IDatabase GetDatabase(string configName = null, int? db = null)
63
+        {
64
+            int defaultDb = 0;
65
+            IConfigurationSection redisConfig = CheckeConfig(configName);
66
+            if (db.HasValue)
67
+            {
68
+                defaultDb = db.Value;
69
+            }
70
+            else
71
+            {
72
+                var strDefalutDatabase = redisConfig["DefaultDatabase"];
73
+                if (!string.IsNullOrEmpty(strDefalutDatabase) && Int32.TryParse(strDefalutDatabase, out var intDefaultDatabase))
74
+                {
75
+                    defaultDb = intDefaultDatabase;
76
+                }
77
+            }
78
+            return GetConnect(redisConfig).GetDatabase(defaultDb);
79
+        }
80
+
81
+        public IServer GetServer(string configName = null, int endPointsIndex = 0)
82
+        {
83
+            IConfigurationSection redisConfig = CheckeConfig(configName);
84
+            var connStr = redisConfig["Connection"];
85
+
86
+            var confOption = ConfigurationOptions.Parse((string)connStr);
87
+            return GetConnect(redisConfig).GetServer(confOption.EndPoints[endPointsIndex]);
88
+        }
89
+
90
+        public ISubscriber GetSubscriber(string configName = null)
91
+        {
92
+            IConfigurationSection redisConfig = CheckeConfig(configName);
93
+            return GetConnect(redisConfig).GetSubscriber();
94
+        }
95
+
96
+        public void Dispose()
97
+        {
98
+            if (_connections != null && _connections.Count > 0)
99
+            {
100
+                foreach (var item in _connections.Values)
101
+                {
102
+                    item.Close();
103
+                }
104
+            }
105
+        }
106
+    }
107
+}

+ 30 - 0
DemoRedis/DemoRedis01/RedisClientSingleton.cs

@@ -0,0 +1,30 @@
1
+using Microsoft.Extensions.Configuration;
2
+using System;
3
+using System.Collections.Generic;
4
+using System.Linq;
5
+using System.Threading.Tasks;
6
+
7
+namespace DemoRedis01
8
+{
9
+    public class RedisClientSingleton
10
+    {
11
+        private static RedisClient _redisClinet;
12
+        private RedisClientSingleton() { }
13
+
14
+        private static object _lockObj = new object();
15
+        public static RedisClient GetInstance(IConfiguration config)
16
+        {
17
+            if (_redisClinet == null)
18
+            {
19
+                lock (_lockObj)
20
+                {
21
+                    if (_redisClinet == null)
22
+                    {
23
+                        _redisClinet = new RedisClient(config);
24
+                    }
25
+                }
26
+            }
27
+            return _redisClinet;
28
+        }
29
+    }
30
+}

+ 46 - 0
DemoRedis/DemoRedis01/Startup.cs

@@ -0,0 +1,46 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Threading.Tasks;
5
+using Microsoft.AspNetCore.Builder;
6
+using Microsoft.AspNetCore.Hosting;
7
+using Microsoft.Extensions.Configuration;
8
+using Microsoft.Extensions.DependencyInjection;
9
+using Microsoft.Extensions.Logging;
10
+using Microsoft.Extensions.Options;
11
+
12
+namespace DemoRedis01
13
+{
14
+    public class Startup
15
+    {
16
+        public Startup(IConfiguration configuration)
17
+        {
18
+            Configuration = configuration;
19
+            //ConfigurationRoot = configurationRoot;
20
+        }
21
+
22
+        public IConfiguration Configuration { get; }
23
+        //public IConfiguration ConfigurationRoot { get; }
24
+
25
+        // This method gets called by the runtime. Use this method to add services to the container.
26
+        public void ConfigureServices(IServiceCollection services)
27
+        {
28
+            services.AddMvc();
29
+
30
+        }
31
+
32
+        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
33
+        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
34
+        {
35
+            if (env.IsDevelopment())
36
+            {
37
+                app.UseDeveloperExceptionPage();
38
+            }
39
+            
40
+            app.UseMvc();
41
+
42
+
43
+
44
+        }
45
+    }
46
+}

+ 10 - 0
DemoRedis/DemoRedis01/appsettings.Development.json

@@ -0,0 +1,10 @@
1
+{
2
+  "Logging": {
3
+    "IncludeScopes": false,
4
+    "LogLevel": {
5
+      "Default": "Debug",
6
+      "System": "Information",
7
+      "Microsoft": "Information"
8
+    }
9
+  }
10
+}

+ 23 - 0
DemoRedis/DemoRedis01/appsettings.json

@@ -0,0 +1,23 @@
1
+{
2
+
3
+  "Logging": {
4
+    "IncludeScopes": false,
5
+    "Debug": {
6
+      "LogLevel": {
7
+        "Default": "Warning"
8
+      }
9
+    },
10
+    "Console": {
11
+      "LogLevel": {
12
+        "Default": "Warning"
13
+      }
14
+    }
15
+  },
16
+  "RedisConfig": {
17
+    "Redis_Default": {
18
+      "Connection": "192.168.85.129: 9001",
19
+      "InstanceName": "Redis1: "
20
+
21
+    }
22
+  }
23
+}