Show / Hide Table of Contents

Class IdentifierSyntax

Represents identifier in CIL assembler. Identifier is a name of the member or variable.

Inheritance
System.Object
SyntaxNode
IdentifierSyntax
Inherited Members
SyntaxNode._lead
SyntaxNode._trail
SyntaxNode._parent
SyntaxNode.EmptyArray
SyntaxNode.ToString()
SyntaxNode.GetChildNodes()
SyntaxNode.GetTypeDefSyntax(Type)
SyntaxNode.GetTypeDefSyntax(Type, Boolean, DisassemblerParams)
SyntaxNode.GetAdditionalInfo(String)
SyntaxNode.SetAdditionalInfo(String, Object)
SyntaxNode.LeadingWhitespace
SyntaxNode.TrailingWhitespace
SyntaxNode.Parent
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: CilTools.Syntax
Assembly: CilTools.BytecodeAnalysis.dll
Syntax
public class IdentifierSyntax : SyntaxNode
Remarks

Starting from the version 2.3, identifiers that overlap with CIL assembler keywords are escaped when converting to text. For example, if the method is called method, its name will be represented like 'method' in text output.

Properties

Content

Gets the content of this identifier as string

Declaration
public string Content { get; }
Property Value
Type Description
System.String

IsDefinition

Gets a boolean value indicating whether this node represents a code location where the identified entity is originally defined, not where is is referenced.

Declaration
public bool IsDefinition { get; }
Property Value
Type Description
System.Boolean
Remarks

For example, in .method public void Foo(), Foo is a definition, while in call void C::Foo() it is a reference. This property enables code navigation services to detect which identifier is a target location for navigation.

IsMemberName

Gets the value indicating whether this identifier represents assembly member name

Declaration
public bool IsMemberName { get; }
Property Value
Type Description
System.Boolean

Kind

Gets the kind of entity identified by this node

Declaration
public IdentifierKind Kind { get; }
Property Value
Type Description
IdentifierKind

TargetItem

Gets the item (such as assembly, member or variable) that this identifier represents

Declaration
public object TargetItem { get; }
Property Value
Type Description
System.Object

The reference to the target item, or null if the target item is unknown

TargetMember

Gets the assembly member represented by this identifier

Declaration
public MemberInfo TargetMember { get; }
Property Value
Type Description
System.Reflection.MemberInfo

The reference to the target member, or null if the target item is unknown or not a member

Methods

EnumerateChildNodes()

Enumerates child nodes of this node. For the leaf node, returns an empty collection.

Declaration
public override IEnumerable<SyntaxNode> EnumerateChildNodes()
Returns
Type Description
System.Collections.Generic.IEnumerable<SyntaxNode>

The collection of child syntax nodes

Overrides
SyntaxNode.EnumerateChildNodes()

ToText(TextWriter)

Writes text representation of this node into the specified TextWriter

Declaration
public override void ToText(TextWriter target)
Parameters
Type Name Description
System.IO.TextWriter target
Overrides
SyntaxNode.ToText(TextWriter)
Remarks

Starting from the version 2.3, identifiers that overlap with CIL assembler keywords are escaped when converting to text. For example, if the method is called method, its name will be represented like 'method' in text output.

Back to top CIL Tools (published from sources in GitHub repository).
Generated by DocFX