예제 #1
0
 public static bool TryParse(LogMessage msg, out ClanMemberJoin message)
 {
     message = null;
     try
     {
         message = Parse(msg);
         return(true);
     }
     catch
     {
         return(false);
     }
 }
예제 #2
0
 public static bool TryParse(string line, out ClanMemberJoin message)
 {
     message = null;
     try
     {
         message = Parse(line);
         return(true);
     }
     catch
     {
         return(false);
     }
 }
예제 #3
0
        public static ClanMemberJoin Parse(JoinLeaveMessage message)
        {
            ClanMemberJoin msg = new ClanMemberJoin(message);

            string content = msg.Content.ToLower();     // only used for comparison

            if (content.Contains(ClanTagPrefix))
            {
                int start = content.IndexOf(ClanTagPrefix) + ClanTagPrefix.Length;
                int end   = content.IndexOf(ClanTagPostfix);

                msg.ClanTag = msg.Content.Substring(start, end - start);
            }
            else
            {
                throw InvalidFormatException;
            }

            return(msg);
        }
예제 #4
0
        public virtual void CopyTo(ClanMemberJoin dest)
        {
            base.CopyTo(dest);

            dest.ClanTag = ClanTag;
        }