public SocketResult(string str) { ReceivedString = str; XmlDocument doc = new XmlDocument(); doc.LoadXml(str); XmlNode node = doc.SelectSingleNode(STATUS_CODE); if (node != null && node.InnerText.Trim().ToUpper() == "SUCCESS") { Type = SocketResultType.Success; } else { Type = SocketResultType.ReceiveFailed; } }
public SocketResult(SocketResultType t) { Type = t; }
public SocketResult(Exception err) { Type = SocketResultType.Exception; Exception = err; }
public SocketResult(SocketResultType t, string str) { Type = t; ReceivedString = str; }