示例#1
0
        private ExternalMessage UnpackResponse(string response)
        {
            var deserializedObject = _dataProvider.Deserialize(response);

            return(!(deserializedObject is BaseTransportMessage message)
                ? null
                : new ExternalMessage(message.SessionId, message));
        }
示例#2
0
        protected override void OnMessage(MessageEventArgs e)
        {
            var msg = !(DataProvider.Deserialize(e.Data) is BaseTransportMessage baseMsg)
                ? null
                : new ExternalMessage(SessionId, baseMsg);

            M.Send(msg);
        }
示例#3
0
 private ExternalMessage UnpackResponse(string response, ObjectId clientId)
 {
     return(!(_dataProvider.Deserialize(response) is BaseTransportMessage message)
         ? null
         : new ExternalMessage(clientId, message));
 }