public PacketContent Process(Serialization.SerializedInfo request) { Debug.Assert(request.Content.ContentType == ContentType.KeepAlivePacket); bool isExist = Application.Default.SessionMonitor.Exist(request.ClientInfo.Session); return(new PacketContent(request.Content.KeepAlive.Packet, isExist)); }
public PacketContent Process(Serialization.SerializedInfo request) { XElement content = request.Content.XmlContent; if (content.Name != RequestConstants.RootNodeName) { throw new InvalidOperationException("thre request is not valid"); } var methodNode = content.Descendants().Single(m => m.Name == RequestConstants.MethodNodeName); if (methodNode.Name == RequestConstants.MethodNodeName) { return(MethodRequestProcessor.Process(request, methodNode.Value)); } throw new NotSupportedException(); }