public InteropObject Process(InteropObject request) { try { return(new InteropObject { Data = request.Data }); } finally { Processing(); } }
public static InteropObject ProcessPipe(PipeStream pipe, InteropObject request) { try { if (!pipe.IsConnected) { throw new InvalidOperationException("Missing pipe client"); } Serializer.SerializeWithLengthPrefix(pipe, request, PrefixStyle.Base128); pipe.WaitForPipeDrain(); return(Serializer.DeserializeWithLengthPrefix <InteropObject>(pipe, PrefixStyle.Base128)); } finally { Processing(); } }