GetSymbol(ICompilationElement, bool)
Gets the Roslyn ISymbol for a Metalama declaration.
Declaration
public static ISymbol? GetSymbol(this ICompilationElement declaration, bool returnNullIfMappingRequired = true)Parameters
| Type | Name | Description |
|---|---|---|
| ICompilationElement | declaration | The Metalama declaration. |
| bool | returnNullIfMappingRequired | If |
Returns
| Type | Description |
|---|---|
| ISymbol | The Roslyn symbol, or |
GetSymbol(IRef, Compilation, bool)
Declaration
public static ISymbol? GetSymbol(this IRef declaration, Compilation compilation, bool ignoreAssemblyKey = false)Parameters
| Type | Name | Description |
|---|---|---|
| IRef | declaration | |
| Compilation | compilation | |
| bool | ignoreAssemblyKey |
Returns
| Type | Description |
|---|---|
| ISymbol |
GetSymbol(IType, bool)
Gets the Roslyn ITypeSymbol for a Metalama IType.
Declaration
public static ITypeSymbol? GetSymbol(this IType type, bool returnNullIfMappingRequired = true)Parameters
| Type | Name | Description |
|---|---|---|
| IType | type | The Metalama type. |
| bool | returnNullIfMappingRequired | If |
Returns
| Type | Description |
|---|---|
| ITypeSymbol | The Roslyn type symbol, or |
GetSymbol(INamedType, bool)
Gets the Roslyn INamedTypeSymbol for a Metalama INamedType.
Declaration
public static INamedTypeSymbol? GetSymbol(this INamedType namedType, bool returnNullIfMappingRequired = true)Parameters
| Type | Name | Description |
|---|---|---|
| INamedType | namedType | The Metalama named type. |
| bool | returnNullIfMappingRequired | If |
Returns
| Type | Description |
|---|---|
| INamedTypeSymbol | The Roslyn named type symbol, or |
GetSymbol(ITypeParameter, bool)
Gets the Roslyn ITypeParameterSymbol for a Metalama ITypeParameter.
Declaration
public static ITypeParameterSymbol? GetSymbol(this ITypeParameter typeParameter, bool returnNullIfMappingRequired = true)Parameters
| Type | Name | Description |
|---|---|---|
| ITypeParameter | typeParameter | The Metalama type parameter. |
| bool | returnNullIfMappingRequired | If |
Returns
| Type | Description |
|---|---|
| ITypeParameterSymbol | The Roslyn type parameter symbol, or |
GetSymbol(IMethodBase, bool)
Gets the Roslyn IMethodSymbol for a Metalama IMethodBase (method or constructor).
Declaration
public static IMethodSymbol? GetSymbol(this IMethodBase method, bool returnNullIfMappingRequired = true)Parameters
| Type | Name | Description |
|---|---|---|
| IMethodBase | method | The Metalama method or constructor. |
| bool | returnNullIfMappingRequired | If |
Returns
| Type | Description |
|---|---|
| IMethodSymbol | The Roslyn method symbol, or |
GetSymbol(IProperty, bool)
Gets the Roslyn IPropertySymbol for a Metalama IProperty.
Declaration
public static IPropertySymbol? GetSymbol(this IProperty property, bool returnNullIfMappingRequired = true)Parameters
| Type | Name | Description |
|---|---|---|
| IProperty | property | The Metalama property. |
| bool | returnNullIfMappingRequired | If |
Returns
| Type | Description |
|---|---|
| IPropertySymbol | The Roslyn property symbol, or |
GetSymbol(IEvent, bool)
Gets the Roslyn IEventSymbol for a Metalama IEvent.
Declaration
public static IEventSymbol? GetSymbol(this IEvent @event, bool returnNullIfMappingRequired = true)Parameters
| Type | Name | Description |
|---|---|---|
| IEvent | event | The Metalama event. |
| bool | returnNullIfMappingRequired | If |
Returns
| Type | Description |
|---|---|
| IEventSymbol | The Roslyn event symbol, or |
GetSymbol(IField, bool)
Gets the Roslyn IFieldSymbol for a Metalama IField.
Declaration
public static IFieldSymbol? GetSymbol(this IField field, bool returnNullIfMappingRequired = true)Parameters
| Type | Name | Description |
|---|---|---|
| IField | field | The Metalama field. |
| bool | returnNullIfMappingRequired | If |
Returns
| Type | Description |
|---|---|
| IFieldSymbol | The Roslyn field symbol, or |
GetSymbol(IParameter, bool)
Gets the Roslyn IParameterSymbol for a Metalama IParameter.
Declaration
public static IParameterSymbol? GetSymbol(this IParameter parameter, bool returnNullIfMappingRequired = true)Parameters
| Type | Name | Description |
|---|---|---|
| IParameter | parameter | The Metalama parameter. |
| bool | returnNullIfMappingRequired | If |
Returns
| Type | Description |
|---|---|
| IParameterSymbol | The Roslyn parameter symbol, or |
GetSymbol(IAssembly, bool)
Gets the Roslyn IAssemblySymbol for a Metalama IAssembly.
Declaration
public static IAssemblySymbol GetSymbol(this IAssembly assembly, bool returnNullIfMappingRequired = true)Parameters
| Type | Name | Description |
|---|---|---|
| IAssembly | assembly | The Metalama assembly. |
| bool | returnNullIfMappingRequired | If |
Returns
| Type | Description |
|---|---|
| IAssemblySymbol | The Roslyn assembly symbol. |