Conditional #149
Loading…
Reference in a new issue
No description provided.
Delete branch "conditional"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds properties
ConditionalSymbolstoITypeDefinitionandIMethodandIsConditionallyRemovedtoIAttributeandInvocationResolveResultOn
ITypeDefinitionandIMethod? I don't see theConditionalSymbolshaving any use there. Worse: with partial types/methods, a single type/method can have multiple different sets of conditional symbols.Ah so it's not the conditional symbols at the position of the method, but those expected by the attribute? I don't think we need an extra interface member for those; there's few code that needs access to it and it can just look through the Attributes collection.
If they don't go there, I think the
FindConditionalSymbolsshould go somewhere where it's useful (perhaps as an extension method). Isn't it an advantage to cache them, though? For the property onInvocationResolveResult, the collection will be examined for each invocation of the method (or it would need to be stored in a cache in the resolver).Types rarely have more than a couple of attributes. Each attribute already caches its resolved type and arguments; so there's little cost in running
FindConditionalSymbolsrepeatedly.Also, you shouldn't check the assembly name against
mscorlib. The Microsoft C# compiler does no such checks; and I think the portable library reference assemblies have movedConditionalAttributetoSystem.Runtime.dll.So where do you think the method should go?
OK, rebased and created a new commit without those members.
Why don't you merge this? Is there a problem with it? The feature is quite useful (especially for attributes since that information is not available elsewhere)
Pull request closed