public TbNickEntity(string nick) { this.Nick = nick.Trim(); this.IsMainAccount = TbNickHelper.IsMainAccount(this.Nick); this.MainPart = TbNickHelper.GetMainPart(this.Nick); this.SubPart = TbNickHelper.GetSubPart(this.Nick); }
public static HashSet <string> GetMainAccounts(IEnumerable <string> nicks) { var mainAccounts = new HashSet <string>(); foreach (var nick in nicks) { string mainPart = TbNickHelper.GetMainPart(nick); mainAccounts.Add(mainPart); } return(mainAccounts); }
public static string ConvertNickToShopDbAccount(string nick) { return("shop_" + TbNickHelper.GetMainPart(nick)); }
public static string ConvertNickToPubDbAccount(string nick) { return("pub_" + TbNickHelper.GetMainPart(nick)); }
public static bool IsSameShopAccount(string speaker, string talker) { return(speaker == talker || TbNickHelper.GetMainPart(speaker) == TbNickHelper.GetMainPart(talker)); }