Creates ParameterProxy to represent parameters as a pair of method + parameter index. IParameterSymbol and ParameterDefinition don't usually include the implicit 'this' parameter, so this lets us treat the implicit 'this' parameter as the same as any other parameter. This also should help put all the HasImplicitThis() ? 1 : 0 in a limited number of places (ParameterProxy and the extensions methods that produce them).
ParameterIndex represents 'this' as the 0 index. See the code docs for more info. I found it was best to represent the 'this' as 0 and provide a property on the ParameterProxy for indexing int the Parameters collection (int MetadataIndex).
"Metadata Parameter" is what I used to name the index in the .parameters metadata section, which corresponds to the SourceParamterIndex from before.
In the process, I found an issue in the analyzer where some properties were indexers but were not being passed the index value in HandleCallAction. Since we previously only iterated over the arguments, no issues arose, but after changing to iterate over the parameters in the called method signature, the issue showed up. LocalDataflowVisitor has been updated to visit the indexer argument and pass the value to HandleCallAction.
Creates
ParameterProxy
to represent parameters as a pair of method + parameter index.IParameterSymbol
andParameterDefinition
don't usually include the implicit 'this' parameter, so this lets us treat the implicit 'this' parameter as the same as any other parameter. This also should help put all theHasImplicitThis() ? 1 : 0
in a limited number of places (ParameterProxy
and the extensions methods that produce them).ParameterIndex
represents 'this' as the 0 index. See the code docs for more info. I found it was best to represent the 'this' as 0 and provide a property on theParameterProxy
for indexing int theParameters
collection (int MetadataIndex
)."Metadata Parameter" is what I used to name the index in the
.parameters
metadata section, which corresponds to the SourceParamterIndex from before.In the process, I found an issue in the analyzer where some properties were indexers but were not being passed the index value in
HandleCallAction
. Since we previously only iterated over the arguments, no issues arose, but after changing to iterate over the parameters in the called method signature, the issue showed up. LocalDataflowVisitor has been updated to visit the indexer argument and pass the value toHandleCallAction
.