public override T DeserializeFromStream <T>(Stream stream) { try { return((T)WireFormat.Deserialize(typeof(T), stream)); } catch (Exception ex) { return((T)WireFormat.HandleException(ex, typeof(T))); } }
public override void SerializeToStream(IRequest requestContext, object request, Stream stream) { if (request == null) { return; } try { WireFormat.Serialize(requestContext, request, stream); } catch (Exception ex) { WireFormat.HandleException(ex, request.GetType()); } }