Open sandboxFocus

Method GetRootDefinition

GetRootDefinition(ISymbol)

Gets the root definition of a symbol (the original definition before any generic substitution).

Declaration
public static ISymbol GetRootDefinition(this ISymbol symbol)
Parameters
Type Name Description
ISymbol symbol

The Roslyn symbol.

Returns
Type Description
ISymbol

The original definition of the symbol.

GetRootDefinition(IFieldSymbol)

Gets the root definition of a field symbol, handling tuple fields specially.

Declaration
public static IFieldSymbol GetRootDefinition(this IFieldSymbol symbol)
Parameters
Type Name Description
IFieldSymbol symbol

The field symbol.

Returns
Type Description
IFieldSymbol

The original definition of the field.