Microsoft.CodeAnalysis Namespace

Classes

AdditionalText

Represents a non source code file.

AdhocWorkspace

A workspace that allows full manipulation of projects and documents, but does not persist changes.

AnnotationExtensions
AssemblyIdentity

Represents an identity of an assembly as defined by CLI metadata specification.

AssemblyIdentityComparer

Compares assembly identities. Derived types may implement platform specific unification and portability policies.

AssemblyMetadata

Represents an immutable snapshot of assembly CLI metadata.

AttributeData
CaseInsensitiveComparison

Case-insensitive operations (mostly comparison) on unicode strings.

CommandLineArguments

The base class for representing command line arguments to a Microsoft.CodeAnalysis.CommonCompiler.

CommandLineParser
CommandLineProject
Compilation

The compilation object is an immutable representation of a single invocation of the compiler. Although immutable, a compilation is also on-demand, and will realize and cache data as necessary. A compilation can produce a new compilation from existing compilation with the application of small deltas. In many cases, it is more efficient than creating a new compilation from scratch, as the new compilation can reuse information from the old compilation.

CompilationOptions

Represents compilation options common to C# and VB.

CompilationReference

Reference to another C# or VB compilation.

ControlFlowAnalysis

Provides information about statements which transfer control in and out of a region. This information is returned from a call to Microsoft.CodeAnalysis.SemanticModel.AnalyzeControlFlow(Microsoft.CodeAnalysis.SyntaxNode).

CSharpExtensions
CustomModifier
DataFlowAnalysis

Provides information about how data flows into and out of a region. This information is returned from a call to Microsoft.CodeAnalysis.SemanticModel.AnalyzeDataFlow(Microsoft.CodeAnalysis.SyntaxNode,Microsoft.CodeAnalysis.SyntaxNode), or one of its language-specific overloads, where you pass the first and last statements of the region as parameters. "Inside" means those statements or ones between them. "Outside" are any other statements of the same method.

DesktopAssemblyIdentityComparer
DesktopStrongNameProvider

Provides strong name and signs source assemblies.

Diagnostic

Represents a diagnostic, such as a compiler error or a warning, along with the location where it occurred.

DiagnosticDescriptor

Provides a description about a Diagnostic

DiagnosticFormatter

Formats Diagnostic messages.

DllImportData

Information that describes how a method from the underlying Platform is to be invoked.

Document

Represents a source code document that is part of a project. It provides access to the source text, parsed syntax tree and the corresponding semantic model.

DocumentActiveContextChangedEventArgs
DocumentationCommentId

APIs for constructing documentation comment id's, and finding symbols that match ids.

DocumentationProvider

A class used to provide XML documentation to the compiler for members from metadata. A custom implementation of this class should be returned from a DocumentationResolver to provide XML documentation comments from custom caches or locations.

DocumentDiagnostic
DocumentEventArgs
DocumentId

An identifier that can be used to retrieve the same Document across versions of the workspace.

DocumentInfo

A class that represents all the arguments necessary to create a new document instance.

EmbeddedText

Represents text to be embedded in a PDB.

ExtensionOrderAttribute
FileSystemExtensions
FileTextLoader
ISymbolExtensions
LanguageNames

A class that provides constants for common language names.

LocalizableResourceString

A localizable resource string that may possibly be formatted differently depending on culture.

LocalizableString

A string that may possibly be formatted differently depending on culture. NOTE: Types implementing LocalizableString must be serializable.

Location

A program location in source code.

Metadata

Represents immutable assembly or module CLI metadata.

MetadataId

An Id that can be used to identify a metadata instance. If two metadata instances have the same id then they are guaranteed to have the same content. If two metadata instances have different ids, then the contents may or may not be the same. As such, the id is useful as a key in a cache when a client wants to share data for a metadata reference as long as it has not changed.

MetadataReference

Represents metadata image reference.

MetadataReferenceResolver

Resolves references to metadata specified in the source (#r directives).

ModelExtensions
ModuleMetadata

Represents an immutable snapshot of module CLI metadata.

ParseOptions

Represents parse options common to C# and VB.

PortableExecutableReference

Reference to metadata stored in the standard ECMA-335 metadata format.

Project

Represents a project that is part of a Solution.

ProjectDependencyGraph

A ProjectDependencyGraph models the dependencies between projects in a solution.

ProjectDiagnostic
ProjectId

An identifier that can be used to refer to the same Project across versions.

ProjectInfo

A class that represents all the arguments necessary to create a new project instance.

ProjectReference
ResourceDescription

Representation of a resource whose contents are to be embedded in the output assembly.

RuleSet

Represents a set of rules as specified in a ruleset file.

RuleSetInclude

Represents a Include tag in a RuleSet file.

ScriptCompilationInfo
SemanticModel

Allows asking semantic questions about a tree of syntax nodes in a Compilation. Typically, an instance is obtained by a call to GetBinding on a Compilation or Compilation.

Solution

Represents a set of projects and their source code documents.

SolutionId

An identifier that can be used to refer to the same Solution across versions.

SolutionInfo

A class that represents all the arguments necessary to create a new solution instance.

SourceFileResolver

Resolves references to source files specified in source code.

SourceReferenceResolver

Resolves references to source documents specified in the source.

StrongNameProvider

Provides strong name and signs source assemblies.

SymbolDisplayExtensions

Exposes extension methods for displaying symbol descriptions.

SymbolDisplayFormat

Describes the formatting rules that should be used when displaying symbols.

SymbolVisitor
SymbolVisitor<TResult>
SyntaxAnnotation

A SyntaxAnnotation is used to annotate syntax elements with additional information.

Since syntax elements are immutable, annotating them requires creating new instances of them with the annotations attached.

SyntaxNode

Represents a non-terminal node in the syntax tree. This is the language agnostic equivalent of Microsoft.CodeAnalysis.CSharp.SyntaxNode and Microsoft.CodeAnalysis.VisualBasic.SyntaxNode.

SyntaxNodeExtensions
SyntaxReference

A reference to a syntax node.

SyntaxTree

The parsed representation of a source document.

SyntaxWalker

Walks the syntax tree, allowing subclasses to operate on all nodes, token and trivia. The walker will perform a depth first walk of the tree.

TextAndVersion

A class that represents both a source text and its version stamp.

TextDocument
TextLoader

A class that represents access to a source text and its version from a storage location.

UnresolvedMetadataReference

Represents a metadata reference that can't be or is not yet resolved.

VisualBasicExtensions

Addition Visual Basic syntax extension methods.

WellKnownDiagnosticTags
WellKnownMemberNames

Specifies the member names known to the compiler (such as .ctor or op_Explicit).

Workspace

A workspace provides access to a active set of source code projects and documents and their associated syntax trees, compilations and semantic models. A workspace has a current solution that is an immutable snapshot of the projects and documents. This property may change over time as the workspace is updated either from live interactions in the environment or via call to the workspace's TryApplyChanges(Solution) method.

WorkspaceChangeEventArgs

The EventArgs describing any kind of workspace change.

WorkspaceDiagnostic
WorkspaceDiagnosticEventArgs
WorkspaceKind

Known workspace kinds

WorkspaceRegistration
XmlDocumentationProvider

A class used to provide XML documentation to the compiler for members from metadata from an XML document source.

XmlFileResolver

Resolves references to XML files specified in the source.

XmlReferenceResolver

Resolves references to XML documents specified in source code.

Structs

ChildSyntaxList
ChildSyntaxList.Enumerator

Enumerates the elements of a ChildSyntaxList.

ChildSyntaxList.Reversed
ChildSyntaxList.Reversed.Enumerator
CommandLineAnalyzerReference

Describes a command line analyzer assembly specification.

CommandLineReference

Describes a command line metadata reference (assembly or netmodule) specification.

CommandLineSourceFile

Describes a source file specification stored on command line arguments.

FileLinePositionSpan

Represents a span of text in a source code file in terms of file name, line number, and offset within line. However, the file is actually whatever was passed in when asked to parse; there may not really be a file.

MetadataReferenceProperties

Information about a metadata reference.

Optional<T>

Combines a value, Value, and a flag, HasValue, indicating whether or not that value is meaningful.

PreprocessingSymbolInfo
ProjectChanges
SeparatedSyntaxList<TNode>.Enumerator
SeparatedSyntaxList<TNode>
SolutionChanges
SubsystemVersion

Represents subsystem version, see /subsystemversion command line option for details and valid values.

The following table lists common subsystem versions of Windows.

Windows version Subsystem version

  • Windows 2000 5.00
  • Windows XP 5.01
  • Windows Vista 6.00
  • Windows 7 6.01
  • Windows 8 Release Preview 6.02
SymbolDisplayPart

A single element of a symbol description. For example, a keyword, a punctuation character or a class name.

SymbolInfo
SyntaxList<TNode>.Enumerator
SyntaxList<TNode>

A list of SyntaxNode.

SyntaxNodeOrToken

A wrapper for either a syntax node (SyntaxNode) or a syntax token (SyntaxToken).

SyntaxNodeOrTokenList

A list of SyntaxNodeOrToken structures.

SyntaxNodeOrTokenList.Enumerator

Enumerator for lists of SyntaxNodeOrToken structs.

SyntaxToken

Represents a token in the syntax tree. This is the language agnostic equivalent of Microsoft.CodeAnalysis.CSharp.SyntaxToken and Microsoft.CodeAnalysis.VisualBasic.SyntaxToken.

SyntaxTokenList

Represents a read-only list of SyntaxToken.

SyntaxTokenList.Enumerator

A structure for enumerating a SyntaxTokenList

SyntaxTokenList.Reversed

Reversed enumerable.

SyntaxTokenList.Reversed.Enumerator
SyntaxTrivia

Represents a trivia in the syntax tree. This is the language agnostic equivalent of Microsoft.CodeAnalysis.CSharp.SyntaxTrivia and Microsoft.CodeAnalysis.VisualBasic.SyntaxTrivia.

SyntaxTriviaList

Represents a read-only list of SyntaxTrivia.

SyntaxTriviaList.Enumerator
SyntaxTriviaList.Reversed

Reversed enumerable.

SyntaxTriviaList.Reversed.Enumerator
TypedConstant

Represents a constant value used as an argument to a custom attribute.

TypeInfo
VersionStamp

VersionStamp should be only used to compare versions returned by same API.

Interfaces

IAliasSymbol

Represents a using alias (Imports alias in Visual Basic).

IAnalyzerAssemblyLoader

Handles loading analyzer assemblies and their dependencies.

        Before an analyzer assembly is loaded with <xref data-throw-if-not-resolved="true" uid="Microsoft.CodeAnalysis.IAnalyzerAssemblyLoader.LoadFromPath(System.String)"></xref>,
        its location and the location of all of its dependencies must first be specified
        by calls to <xref data-throw-if-not-resolved="true" uid="Microsoft.CodeAnalysis.IAnalyzerAssemblyLoader.AddDependencyLocation(System.String)"></xref>.
IArrayTypeSymbol

Represents an array.

IAssemblySymbol

Represents a .NET assembly, consisting of one or more modules.

ICompilationUnitSyntax

Interface implemented by any node that is the root 'CompilationUnit' of a SyntaxTree. i.e. any node returned by GetRoot(CancellationToken) where HasCompilationUnitRoot is true will implement this interface.

         This interface provides a common way to both easily find the root of a <xref data-throw-if-not-resolved="true" uid="Microsoft.CodeAnalysis.SyntaxTree"></xref>
         given any <xref data-throw-if-not-resolved="true" uid="Microsoft.CodeAnalysis.SyntaxNode"></xref>, as well as a common way for handling the special 

EndOfFileToken that is needed to store all final trivia in a SourceText that is not owned by any other SyntaxToken.

IDiscardSymbol

A symbol representing a discarded value, e.g. a symbol in the result of GetSymbolInfo for in M(out ) or (x, _) = e.

IDynamicTypeSymbol

Represents the 'dynamic' type in C#.

IErrorTypeSymbol

An IErrorTypeSymbol is used when the compiler cannot determine a symbol object to return because of an error. For example, if a field is declared "Goo x;", and the type "Goo" cannot be found, an IErrorTypeSymbol is returned when asking the field "x" what it's type is.

IEventSymbol

Represents an event.

IFieldSymbol

Represents a field in a class, struct or enum.

ILabelSymbol

Represents a label in method body

ILocalSymbol

Represents a local variable in method body.

IMethodSymbol

Represents a method or method-like symbol (including constructor, destructor, operator, or property/event accessor).

IModuleSymbol

Represents a module within an assembly. Every assembly contains one or more modules.

INamedTypeSymbol

Represents a type other than an array, a pointer, a type parameter.

INamespaceOrTypeSymbol

Represents either a namespace or a type.

INamespaceSymbol

Represents a namespace.

IOperation

Root type for representing the abstract semantics of C# and VB statements and expressions.

IParameterSymbol

Represents a parameter of a method or property.

IPointerTypeSymbol

Represents a pointer type such as "int *". Pointer types are used only in unsafe code.

IPreprocessingSymbol

Represents a preprocessing conditional compilation symbol.

IPropertySymbol

Represents a property or indexer.

IRangeVariableSymbol

Represents a range variable in a query expression.

ISkippedTokensTriviaSyntax

Represents structured trivia that contains skipped tokens. This is implemented by SkippedTokensTriviaSyntax and SkippedTokensTriviaSyntax.

ISourceAssemblySymbol

Represents a source assembly symbol exposed by the compiler.

IStructuredTriviaSyntax

Represents the root node of a structured trivia tree (for example, a preprocessor directive or a documentation comment). From this root node you can traverse back up to the containing trivia in the outer tree that contains it.

ISymbol

Represents a symbol (namespace, class, method, parameter, etc.) exposed by the compiler.

ITypeParameterSymbol

Represents a type parameter in a generic type or generic method.

ITypeSymbol

Represents a type.

Enums

Accessibility

Enumeration for common accessibility combinations.

ApplyChangesKind
AssemblyIdentityComparer.ComparisonResult

A set of possible outcomes of AssemblyIdentity comparison.

AssemblyIdentityParts
CandidateReason

Indicates the reasons why a candidate (or set of candidate) symbols were not considered correct in SemanticInfo. Higher values take precedence over lower values, so if, for example, there a symbol with a given name that was inaccessible, and other with the wrong arity, only the inaccessible one would be reported in the SemanticInfo.

DiagnosticSeverity

Describes how severe a diagnostic is.

DocumentationMode

Specifies the different documentation comment processing modes.

LineVisibility

The state of the visibility of a line.

LocationKind

Specifies the kind of location (source vs. metadata).

MetadataImageKind

The kind of metadata a PE file image contains.

MetadataImportOptions

Specifies what symbols to import from metadata.

MethodKind

Enumeration for possible kinds of method symbols.

NamespaceKind

Describes the kind of the namespace extent.

OperationKind

All of the kinds of operations, including statements and expressions.

OptimizationLevel

Determines the level of optimization of the generated code.

OutputKind

Specifies output assembly kinds generated by compiler.

Platform
PreservationMode

The mode in which value is preserved.

RefKind

Denotes the kind of reference.

ReportDiagnostic

Describes how to report a warning diagnostic.

SourceCodeKind

Specifies the C# or VB source code kind.

SpecialType

Specifies the Ids of special runtime types.

SpeculativeBindingOption

Describes the kind of binding to be performed in one of the SemanticModel speculative binding methods.

SymbolDisplayDelegateStyle

Specifies how to display delegates (just the name or the name with the signature).

SymbolDisplayExtensionMethodStyle

Specifies how to display extension methods.

SymbolDisplayGenericsOptions

Specifies the options for how generics are displayed in the description of a symbol.

SymbolDisplayGlobalNamespaceStyle

Specifies the options for how to display the global namespace in the description of a symbol.

SymbolDisplayKindOptions

Specifies which kind keywords should be included when displaying symbols.

SymbolDisplayLocalOptions

Specifies the options for how locals are displayed in the description of a symbol.

SymbolDisplayMemberOptions

Specifies the options for how members are displayed in the description of a symbol.

SymbolDisplayMiscellaneousOptions

Specifies miscellaneous options about the format of symbol descriptions.

SymbolDisplayParameterOptions

Specifies how parameters are displayed in the description of a (member, property/indexer, or delegate) symbol.

SymbolDisplayPartKind

Specifies the kinds of a piece of classified text (SymbolDisplayPart).

SymbolDisplayPropertyStyle

Specifies the options for how properties are displayed in symbol descriptions.

SymbolDisplayTypeQualificationStyle

Specifies how much qualification is used in symbol descriptions.

SymbolFilter

Indicate what kinds of declaration symbols will be included

SymbolKind

Specifies the possible kinds of symbols.

SyntaxRemoveOptions
SyntaxWalkerDepth

Syntax the SyntaxWalker should descent into.

TypedConstantKind

Represents the kind of a TypedConstant.

TypeKind

Enumeration for possible kinds of type symbols.

TypeParameterKind

Represents the different kinds of type parameters.

VarianceKind

An enumeration declaring the kinds of variance supported for generic type parameters.

WorkspaceChangeKind
WorkspaceDiagnosticKind