chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
In the following block, the first two constructor calls (v1 and v2) are not executed. Why this is so? Whats the trick behind the scenes to suppress the execution???

using (RecorderManager.StartRecording())
{
    var v1 = new MyClass();
}

var v2 = new MyClass();
var v3 = new MyClass();

MockManager.Verify();
asked by web-accounts (640 points)

2 Answers

0 votes
Hi,

The Isolator uses the CLR profiler API to intercept methods call at runtime.
This allows us to change the behavior of methods and ignore or change the return value.
answered by ohad (35.4k points)
0 votes
Hi Ohad,

so the statement RecorderManager.StartRecording starts the Isolator logic in the background to handle the CLR stuff further more?

Thanks and regards
answered by web-accounts (640 points)
...