コード例 #1
0
 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);
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public static string ConvertNickToShopDbAccount(string nick)
 {
     return("shop_" + TbNickHelper.GetMainPart(nick));
 }
コード例 #4
0
 public static string ConvertNickToPubDbAccount(string nick)
 {
     return("pub_" + TbNickHelper.GetMainPart(nick));
 }
コード例 #5
0
 public static bool IsSameShopAccount(string speaker, string talker)
 {
     return(speaker == talker || TbNickHelper.GetMainPart(speaker) == TbNickHelper.GetMainPart(talker));
 }