-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 additions
and
5 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
src/LiteIM.CSRedisCore/Extensions/CSRedisCoreImKeysExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace LiteIM.Extensions | ||
{ | ||
public static class CSRedisCoreImKeysExtensions | ||
{ | ||
public static string CSRedisCoreChan(this string prefix, string end) | ||
{ | ||
return $"n:{prefix}LiteIM,c:{string.Empty.Chan(end)}"; | ||
} | ||
|
||
public static string CSRedisCoreClient(this string prefix, string end) | ||
{ | ||
return $"n:{prefix}LiteIM,c:{string.Empty.Client(end)}"; | ||
} | ||
|
||
public static string CSRedisCoreListChan(this string prefix) | ||
{ | ||
return $"n:{prefix}LiteIM,c:{string.Empty.ListChan()}"; | ||
} | ||
|
||
public static string CSRedisCoreOnline(this string prefix) | ||
{ | ||
return $"n:{prefix}LiteIM,c:{string.Empty.Online()}"; | ||
} | ||
|
||
public static string CSRedisCoreOffline(this string prefix) | ||
{ | ||
return $"n:{prefix}LiteIM,c:{string.Empty.Offline()}"; | ||
} | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters