4 ms·
You don't. The way it works is that it intercepts the call site when the input args are constant. If they're not then it won't be replaced and it will call the
by hahn-kev 10mo ago
You don't. The way it works is that it intercepts the call site when the input args are constant. If they're not then it won't be replaced and it will call the original method. C# source generators can't replace method definitions, however a call site can be changed to another method via source generators.