public static bool TryParse(LogMessage msg, out ClanMemberJoin message) { message = null; try { message = Parse(msg); return(true); } catch { return(false); } }
public static bool TryParse(string line, out ClanMemberJoin message) { message = null; try { message = Parse(line); return(true); } catch { return(false); } }
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); }
public virtual void CopyTo(ClanMemberJoin dest) { base.CopyTo(dest); dest.ClanTag = ClanTag; }