void ReaderHandlerGetPlayerName(string text, string _userId, SqlGetPlayerNameCallback callback) { GetPlayerNameCommandLog command = GetPlayerNameCommandLog.none; string[] lines = text.Split('|'); GetPlayerNameResponse getPlayerNameResponse = new GetPlayerNameResponse(); if (GetPlayerNameCommandLog.TryParse(lines[0].Substring(0, lines[0].IndexOf(':')), out command)) { getPlayerNameResponse.command = command; } if (command == GetPlayerNameCommandLog.succes) { getPlayerNameResponse.userName = lines[1].Substring(lines[1].IndexOf(':')); getPlayerNameResponse.userId = _userId; } callback(getPlayerNameResponse); }
public GetPlayerNameResponse() { command = GetPlayerNameCommandLog.none; userName = ""; userId = "-1"; }