Dynamic proxy to record and replay method calls.