Limitations¶
Imposter keeps the source generator and runtime focused on common impersonation scenarios. This comes with a few intentional limitations.
Language and tooling¶
- Minimum supported C# version is 9.0.
- Only Roslyn-based C# projects are supported (no Visual Basic or F#).
Class targets¶
- Only non-sealed classes can be impersonated.
- Only virtual or abstract members can be impersonated on class imposters.
UseBaseImplementation()applies only to non-abstract, virtual class members and is not available for interfaces.
Async behavior¶
- Async methods without setup return
default, which forTaskisnull. - Sequenced async outcomes are consumed in order; when a sequence is exhausted, the last outcome is repeated (where applicable).
Generated code¶
- Generated
.g.csfiles are implementation details and should not be edited directly; customize behavior via setups or by changing generator inputs.