/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Compilers/CSharp/Portable/Binder/SingleLookupResult.cs
37 строк
1 KB
Fred Silberberg
Handle potential null in extension lookup (#80621)
14 окт 2025, 02:02
Не верифицирован
14 окт 2025, 02:02
16883a5
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Microsoft.CodeAnalysis.CSharp.Symbols; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; using System.Diagnostics; namespace Microsoft.CodeAnalysis.CSharp { /// <summary> /// Represents a result of lookup operation over a 0 or 1 symbol (as opposed to a scope). The /// typical use is to represent that a particular symbol is good/bad/unavailable. /// /// For more explanation of Kind, Symbol, Error - see LookupResult. /// </summary> internal readonly struct SingleLookupResult { // the kind of result. internal readonly LookupResultKind Kind; // the symbol or null. internal readonly Symbol? Symbol; // the error of the result, if it is NonViable or Inaccessible internal readonly DiagnosticInfo? Error; internal SingleLookupResult(LookupResultKind kind, Symbol? symbol, DiagnosticInfo? error) { Debug.Assert(symbol is not null || kind == LookupResultKind.Empty); this.Kind = kind; this.Symbol = symbol; this.Error = error; } } }