Skip to content

Commit

Permalink
添加接口
Browse files Browse the repository at this point in the history
  • Loading branch information
yihango committed Jun 1, 2021
1 parent 71725eb commit a8f4285
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/LiteIM.CSRedisCore/CsRedisCoreImClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/LiteIM.CSRedisCore/CsRedisCoreImClientOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace LiteIM
{
public class CsRedisCoreImClientOptions : ImClientOptions
public class CsRedisCoreImClientOptions : ImClientOptions, ICsRedisCoreImClientOptions
{
public CSRedisClient Redis { get; set; }
}
Expand Down
12 changes: 12 additions & 0 deletions src/LiteIM.CSRedisCore/ICsRedisCoreImClientOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using CSRedis;

namespace LiteIM
{
public interface ICsRedisCoreImClientOptions : IImClientOptions
{
/// <summary>
/// Redis实例
/// </summary>
CSRedisClient Redis { get; set; }
}
}

0 comments on commit a8f4285

Please sign in to comment.