Description
Consider the following MEF part:
class Some
{
[Export]
public static string Member => "Hi";
}
This is interesting because the exporting member is static
. Before MEF obtains the value of this member, it instantiates the Some
class, even though that isn't necessary for a static member.
We should change MEF to not activate the class and simply obtain the static member's value directly.
We should add unit tests for this case, covering static members of all supported types: fields, properties and methods.
The test should exercise obtaining the value and verify it matches the expected value.