From a8f42853e116391019cf28b36df2041ec2454307 Mon Sep 17 00:00:00 2001 From: staneee Date: Tue, 1 Jun 2021 13:55:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/LiteIM.CSRedisCore/CsRedisCoreImClient.cs | 4 ++-- src/LiteIM.CSRedisCore/CsRedisCoreImClientOptions.cs | 2 +- .../ICsRedisCoreImClientOptions.cs | 12 ++++++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 src/LiteIM.CSRedisCore/ICsRedisCoreImClientOptions.cs diff --git a/src/LiteIM.CSRedisCore/CsRedisCoreImClient.cs b/src/LiteIM.CSRedisCore/CsRedisCoreImClient.cs index a054abf..8e6a30c 100644 --- a/src/LiteIM.CSRedisCore/CsRedisCoreImClient.cs +++ b/src/LiteIM.CSRedisCore/CsRedisCoreImClient.cs @@ -14,9 +14,9 @@ public class CsRedisCoreImClient : IImClient protected readonly string _prefix; protected readonly CSRedisClient _redis; - protected readonly CsRedisCoreImClientOptions _options; + protected readonly ICsRedisCoreImClientOptions _options; - public CsRedisCoreImClient(CsRedisCoreImClientOptions options) + public CsRedisCoreImClient(ICsRedisCoreImClientOptions options) { _options = options; diff --git a/src/LiteIM.CSRedisCore/CsRedisCoreImClientOptions.cs b/src/LiteIM.CSRedisCore/CsRedisCoreImClientOptions.cs index dbbc07e..9425222 100644 --- a/src/LiteIM.CSRedisCore/CsRedisCoreImClientOptions.cs +++ b/src/LiteIM.CSRedisCore/CsRedisCoreImClientOptions.cs @@ -2,7 +2,7 @@ namespace LiteIM { - public class CsRedisCoreImClientOptions : ImClientOptions + public class CsRedisCoreImClientOptions : ImClientOptions, ICsRedisCoreImClientOptions { public CSRedisClient Redis { get; set; } } diff --git a/src/LiteIM.CSRedisCore/ICsRedisCoreImClientOptions.cs b/src/LiteIM.CSRedisCore/ICsRedisCoreImClientOptions.cs new file mode 100644 index 0000000..e2ef815 --- /dev/null +++ b/src/LiteIM.CSRedisCore/ICsRedisCoreImClientOptions.cs @@ -0,0 +1,12 @@ +using CSRedis; + +namespace LiteIM +{ + public interface ICsRedisCoreImClientOptions : IImClientOptions + { + /// + /// Redis实例 + /// + CSRedisClient Redis { get; set; } + } +}