Grouping and joining IncrementalValuesProviders for an incremental source generator
I am experimenting with Incremental source generators and Interceptors.
This question is related to the use of IncrementalValuesProviders specified in https://github.com/dotnet/roslyn/blob/main/docs/features/incremental-generators.md
The goal is to generate argument checks based on attributes applied to the parameters of a function. For this i have 2 IncrementlValuesProviders, one contains the method declarations of all methods i am interested in. The other contains all method invocations. I want to combine these 2 so that i have a single valuesprovider that has the method declaration and an array of all of it's usages.
This is the flow i am trying to achieve
Currently i have the method declarations and the invocations, i want to group the invocations by method and combine that with the method declarations. With this information i will generate code with Interceptors to intercept all usages of a method. How can i achieve the grouping and combining?