public FoundReferenceEntry( TableDataSourceFindUsagesContext context, FoundReference reference) { _context = context; Reference = reference; }
public override Task OnReferenceFoundAsync(FoundReference reference) { var entry = new FoundReferenceEntry(this, reference); if (entry != null) { lock (Gate) { Entries = Entries.Add(entry); } NotifyChange(); } return(Task.CompletedTask); }
public override Task OnReferenceFoundAsync(FoundReference reference) { var sr = new MemberReference( new CounterfeitVariable(reference.Name), reference.FilePath, reference.Offset, reference.Length); if (antiDuplicatesSet.TryAdd(sr, null)) { sr.ReferenceUsageType = reference.Usage switch { ReferenceUsage.Declaration => ReferenceUsageType.Declaration, ReferenceUsage.Write => ReferenceUsageType.Write, ReferenceUsage.Read => ReferenceUsageType.Read, _ => ReferenceUsageType.Unknown }; } return(Task.CompletedTask); }