I am building a T4 script that I want to use to build from existing dll wrappes classes. The dll classes can contain the NotNullAttribute which is used in Visual studio with Resharper. Now I want to give the attributes to the wrapper class. For this reason I want to find out if the NotNull or CanByNull is set.
You can open the dll with any decompiler ( DotPeek or any other) and check if it contains NotNull/CanBeNull attributes for the methods. If there is no attributes in decompiled code then it is impossible to get them via reflection
Yes, as any other attribute
Sorry but it has a Condition.
In this case it is impossible to find "NotNull" attribute by reflection if the assembly was compiled without "JETBRAINS_ANNOTATIONS" flag
I am building a T4 script that I want to use to build from existing dll wrappes classes. The dll classes can contain the NotNullAttribute which is used in Visual studio with Resharper. Now I want to give the attributes to the wrapper class. For this reason I want to find out if the NotNull or CanByNull is set.
You can open the dll with any decompiler ( DotPeek or any other) and check if it contains NotNull/CanBeNull attributes for the methods. If there is no attributes in decompiled code then it is impossible to get them via reflection
I'm not sure if this is possible via T4 script.