Open FelixKeck opened 1 year ago
@CyrusNajmabadi @mavasani Any reason we shouldn't do this?
Generally speaking, because it's not a good representation of things (and really should be removed). References can be bucketed into many disparate concepts. So finding the write way to represetnt that isn't clear.
I see that a ReferenceLocation might not be the correct place for this property but I'm still facing the problem to distinguish read and write accesses of a variable. Is it possible to make SymbolUsageInfo
public to retrieve the information directly from a symbol or am I forced to reimplement the functionality? I mean the information is already there but I can't find a way to access it.
My recommendation would be to use ioperation and see how the reference is being used.
Background and Motivation
I'm trying to find all references of a variable and distinguish them by read/write accesses. Therefore I use
SymbolFinder.FindReferencesAsync
. The returned reference locations have a propertyIsWrittenTo
which looks like it provides this information. Sadly this property is internal so I cannot use it. Is it possible to make this property public or are there other ways to retrieve this information? Thanks for feedback.Proposed API