Ploxi
Best Practices for Instantiating Objects in C# Source Generators
Depends on the option.
The delegate sln would create a delegate in the generated source and the user could overwrite the value in the ctor.
In the attrib sln, the sourcegen would simply use new() unless a method exists in the user code that is attributed
7 replies
Threadsafety and Interlocked.CompareExchange
The static initializer initializes all known states. There are currently no unknowns. Unknowns (aka Parse adds to the map) will only happen when the caller is "newer", so i dont have to touch every program when implementing a new state
53 replies