Search Results for

    Show / Hide Table of Contents

    Struct CompilationAnalysisContext

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.GetType()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    Namespace: Microsoft.CodeAnalysis.Diagnostics
    Assembly: Microsoft.CodeAnalysis.dll
    Syntax
    public readonly struct CompilationAnalysisContext

    Constructors

    CompilationAnalysisContext(Compilation, AnalyzerOptions, Action<Diagnostic>, Func<Diagnostic, bool>, CancellationToken)

    Declaration
    [Obsolete("Use CompilationWithAnalyzers instead. See https://github.com/dotnet/roslyn/issues/63440 for more details.")]
    public CompilationAnalysisContext(Compilation compilation, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    Compilation compilation
    AnalyzerOptions options
    Action<Diagnostic> reportDiagnostic
    Func<Diagnostic, bool> isSupportedDiagnostic
    CancellationToken cancellationToken

    Properties

    CancellationToken

    Declaration
    public CancellationToken CancellationToken { get; }
    Property Value
    Type Description
    CancellationToken

    Compilation

    Declaration
    public Compilation Compilation { get; }
    Property Value
    Type Description
    Compilation

    Options

    Declaration
    public AnalyzerOptions Options { get; }
    Property Value
    Type Description
    AnalyzerOptions

    Methods

    ReportDiagnostic(Diagnostic)

    Declaration
    public void ReportDiagnostic(Diagnostic diagnostic)
    Parameters
    Type Name Description
    Diagnostic diagnostic

    TryGetValue<TValue>(AdditionalText, AdditionalTextValueProvider<TValue>, out TValue)

    Declaration
    public bool TryGetValue<TValue>(AdditionalText text, AdditionalTextValueProvider<TValue> valueProvider, out TValue value)
    Parameters
    Type Name Description
    AdditionalText text
    AdditionalTextValueProvider<TValue> valueProvider
    TValue value
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    TValue

    TryGetValue<TValue>(SyntaxTree, SyntaxTreeValueProvider<TValue>, out TValue)

    Declaration
    public bool TryGetValue<TValue>(SyntaxTree tree, SyntaxTreeValueProvider<TValue> valueProvider, out TValue value)
    Parameters
    Type Name Description
    SyntaxTree tree
    SyntaxTreeValueProvider<TValue> valueProvider
    TValue value
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    TValue

    TryGetValue<TValue>(SourceText, SourceTextValueProvider<TValue>, out TValue)

    Declaration
    public bool TryGetValue<TValue>(SourceText text, SourceTextValueProvider<TValue> valueProvider, out TValue value)
    Parameters
    Type Name Description
    SourceText text
    SourceTextValueProvider<TValue> valueProvider
    TValue value
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    TValue
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0