Scanning for Extension Points
On initialization, essentially as soon as a FakeItEasy type is accessed, FakeItEasy uses reflection to look for internal and user-supplied extension points. In most cases, there is no need for users to define any extensions, but they may be used to enhance the power and usability of FakeItEasy.
There are currently three kinds of extension points defined:
Please see their individual documentation to learn how each of these is used.
The scanning process
On startup, FakeItEasy searches the following assemblies for classes that implement the various extensions points:
- its own assembly,
- assemblies already loaded in the current AppDomain, if they reference FakeItEasy,
- assemblies referenced by assemblies from the previous bullet point, if they reference FakeItEasy,
- additional assemblies identified by the Bootstrapper's
GetAssemblyFileNamesToScanForExtensions
method, if they reference FakeItEasy.
Any such classes found are added to a catalogue and used at need.