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; } + } +}