File/code generator using Scriban text templates populated with C# code metadata from Roslyn API.
126
stars
24
forks
source link
AttributeArgument with null value, TypedConstant ToString throws NullReferenceException #87
Closed
Xriuk closed 1 year ago
I have an attribute which receives a null argument, and when retrieving it from the model, it retrieves the
AttributeArgument
but it throws when I try to print it, because the Value inside it is null. I guess the problem is here: https://github.com/NeVeSpl/NTypewriter/blob/23a40b936caf1a2682bc97500de407bd6e30884a/NTypewriter.CodeModel.Roslyn/TypedConstant.cs#L35C78-L35C78 Because thetypedConstant
itself is not null, but itsValue
property is