public IEnumerable <KeyValuePair <string, object> > ReadExtraObjects(object messageObject) { var serviceMethodBody = messageObject as CMsgClientServiceMethodLegacy; if (serviceMethodBody == null) { yield break; } var name = serviceMethodBody.method_name; object innerBody; using (var ms = new MemoryStream(serviceMethodBody.serialized_method)) { innerBody = UnifiedMessagingHelpers.ReadServiceMethodBody(name, ms, x => x.GetParameters().First().ParameterType); } yield return(new KeyValuePair <string, object>("Service Method", innerBody)); }
public IEnumerable <KeyValuePair <string, object> > ReadExtraObjects(object messageObject) { var serviceMethodBody = messageObject as CMsgClientServiceMethodLegacyResponse; if (serviceMethodBody == null) { yield break; } var name = serviceMethodBody.method_name; object innerBody = null; if (serviceMethodBody.serialized_method_response != null) { using var ms = new MemoryStream(serviceMethodBody.serialized_method_response); innerBody = UnifiedMessagingHelpers.ReadServiceMethodBody(name, ms, x => x.ReturnType); } yield return(new KeyValuePair <string, object>("Service Method Response", innerBody)); }