How does the Shouldly assertion library know the expression the assertion was applied to? : <p>The <a href="http://shouldly.readthedocs.io/en/latest/">Shouldly assertion library for .NET</a> somehow knows what expression the assertion method was called on so it is able to display it into the message. I tried to find out how it works but got lost in the source code. I suspect it looks into the compiled code but I would really like to see how this happens. From the documentation</p>

<pre><code>map.IndexOfValue("boo").ShouldBe(2); // -&gt; map.IndexOfValue("boo") should be 2 but was 1
</code></pre>

<p>Somehow Shouldly knows the expression map.IndexOfValue("boo") and was able to display it in the test failure message. Does anyone know how this happens?</p>
