Drying up a dynamicexpression in C# 4.0
<p>I have the following code, I want to refactor the duplication out of:</p>

<pre><code>    public bool HasBia
    {
        get 
        {
            if (IsC2User())
            {
                return true;
            }

            if(_hasBia == null)
            {
                _hasBia = _excludes.HasBia; 
            }

            return _hasBia.Value;
        }
    }

    public bool HasTeachAndTest
    {
        get
        {
            if (IsC2User())
            {
                return true;
            }

            if(_hasTeachAndTest == null)
            {
                _hasTeachAndTest = _excludes.HasTeachAndTest;
            }

            return _hasTeachAndTest.Value;
        }
    }
</code></pre>

<p>The bit I am having trouble with is that, _excludes.HasBia and _excludes.HasTeachAndTest are dynamic expressions or dynamic properties that are resolved by TryGetMember of a class that inherits from DynamicObject.</p>

<p>I think I want to do something like this:</p>

<pre><code>public bool HasPermission(bool? value, DynamicExpression expression)
{
    if (IsC2User())
    {
        return true;
    }

}
</code></pre>

<p>Then I can call it like this:</p>

<pre><code>return HasPermission(_hasBia, _excludes.HasTeachAndTest);
</code></pre>

<p>But I am unsure how to invoke the expression when it is passed into the HasPermission method.</p>

<p>Anybody got any ideas?</p>
