Features for Source Generators
Using something like the MVVM Community Toolkit which has Roslyn source generators can pose certain challenges when navigating code. Taking:
[ObservableProperty] private string _companyAddress1 = "";
as an example:
1) In Visual Studio's Class Member dropdown list:

it'd be nice if there was an option to hide these (greyed out) options.
2) Doing a “Find All References” on _companyAddress1 will find references in the auto-generated source:
/// <inheritdoc cref="_companyAddress1"/>
[global::System.CodeDom.Compiler.GeneratedCode("CommunityToolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator", "8.2.0.0")]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public string CompanyAddress1
{
get => _companyAddress1;
[global::System.Diagnostics.CodeAnalysis.MemberNotNull("_companyAddress1")]
set
{
…
It'd be nice if ReSharper could pick up CompanyAddress1 usages in the class.
Please sign in to leave a comment.
Hello NeilN, thank you for your message. As for the Visual Studio's Class Member dropdown list, it's a Visual Studio option, we can't change it. Alternatively, try using ReSharper File Structore; maybe it will help you achieve exactly what you need.
Regarding “Find All References” on _companyAddress1 - this is also not a ReSharper tool. You can try using Find Usages that allows filtering the results:
Please let me know if you have any questions. Thank you!