nuke
nuke copied to clipboard
Source generator for better access of members from inherited components
Description
partial class Build : NukeBuild, IHazRepository
{
public void M()
{
// without source generator
var r1 = ((T)(object)this).Repository;
// with source generator
var r2 = IHazRepository.Repository;
}
}
Generated code
partial class Build
{
// for all interfaces deriving from INukeBuild
protected IHazRepository IHazRepository => this;
}
Usage Example
No response
Alternative
No response
Hi @matkoch , I would give this a try, if it is still relevant. Bye, Andi
Sure. Feel free to submit something.