What is the functionality of IncrementalValuesProvider.WithTrackingName(string name)?

Viewed 20

In the context of a .net6 incremental source generator, what does the IncrementalValuesProvider.WithTrackingName(string name) method do?

In addition how/when is it intended to be used?

[Generator]
public class MyGenerator : IIncrementalGenerator
{
        var incremntalValueProvider = context.SyntaxProvider
            .CreateSyntaxProvider(predicate: (n, c) => { ... }, transform: (s, c) => { ... });

        incremntalValueProvider = incremntalValueProvider.WithTrackingName("Some tracking name");
}

With most things when it comes to source generators, I have been able to google and use a bit of trial and error, to figure out how things work. However with this particular method, those aproaches has not been helpful. In addition it seems like Micrsofts documentation is pretty much out of date since https://github.com/dotnet/roslyn/blob/main/docs/features/incremental-generators.md does not even mention the method.

0 Answers
Related