Esempio n. 1
0
 /// <summary>
 /// Tries to get a symbol at the specified location.
 /// </summary>
 /// <param name="position">The requested position.</param>
 /// <param name="symbol">The symbol that could be identified at the given position, or <c>null</c> if no symbol could be identified.</param>
 /// <returns><c>true</c> if a symbol was found, otherwise <c>false</c>.</returns>
 /// <exception cref="System.InvalidOperationException">Thrown if there was one more symbol at the specified position. This should never happen, unless there was an error.</exception>
 public bool TryGetSymbolAt(Position position, [NotNullWhen(true)] out ILocalizableSymbol?symbol)
 {
     symbol = LookupTree.Query(position).SingleOrDefault();
     return(symbol != null);
 }