Пример #1
0
        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;
            }
        }
Пример #2
0
 public SocketResult(SocketResultType t)
 {
     Type = t;
 }
Пример #3
0
 public SocketResult(Exception err)
 {
     Type      = SocketResultType.Exception;
     Exception = err;
 }
Пример #4
0
 public SocketResult(SocketResultType t, string str)
 {
     Type           = t;
     ReceivedString = str;
 }