public SendChatMessageType(pSendChatMessageType pScm):base(pScm.Time) { this.roomName = pScm.RoomName; if (pScm.Sender != "") this.sender = pScm.Sender; this.message = pScm.Message; }
public override pSendChatMessageType pGetSendChatMessage() { string chatRoom = "Unknown Chat Room"; string sender = "", message; int time; try { pSendChatMessageType returnValue; reader.Read(); chatRoom = pGetString(); if ("Sender" == reader.Name) sender = pGetString(); time = pGetInt(); message = pGetString(); reader.ReadEndElement(); returnValue = new pSendChatMessageType(chatRoom, sender, time, message); return returnValue; } catch (SystemException e) { throw new ApplicationException("Could not read SendChatMessage for room " + chatRoom); } }