src/XML parser/XmlParser.cs
/// <summary>
/// This method will collect the whole message from the StreamReader and parse it into an object
/// </summary>
/// <param name="reader"></param>
/// <returns></returns>
This method will collect the whole message from the StreamReader and parse it into an object
This method will collect the whole message from the StreamReader and parse it into an object
public static message listen(StreamReader reader)
    {
        string msg = "";
        while (!msg.Contains("/message>") && !msg.Contains("thankYou\" />") && !msg.Contains("leaveGame\" />"))
        {
            var c = (char)reader.Read();
            if (c != '\n' && c != '\r')
                msg += c;
        }
        return XmlParser.Parse(msg);
    }
public static message listen ( StreamReader reader ) { string msg = " " ; while ( ! msg . Contains ( " " ) && ! msg . Contains ( " \" " ) && ! msg . Contains ( " \" " ) ) { var c = ( char ) reader . Read ( ) ; if ( c != ' \n ' && c != ' \r ' ) msg += c ; } return XmlParser . Parse ( msg ) ; }
This method will collect the whole message from the StreamReader and parse it into an object
This method will collect the whole message from the StreamReader and parse it into an object
None
reader
StreamReader
None