GetTarget<T>(IRef<T>, ICompilation, IGenericContext?)
Gets the target of the reference for a given compilation, or throws an exception if the reference cannot be resolved. To get the reference for the current execution context, use the GetTarget<T>(IRef<T>, ICompilation, IGenericContext?) extension method.
Declaration
public static T GetTarget<T>(this IRef<T> reference, ICompilation compilation, IGenericContext? genericContext = null) where T : class, ICompilationElementParameters
| Type | Name | Description |
|---|---|---|
| IRef<T> | reference | |
| ICompilation | compilation | |
| IGenericContext | genericContext |
Returns
| Type | Description |
|---|---|
| T |
Type Parameters
| Name | Description |
|---|---|
| T |
GetTarget(IRef, ICompilation, IGenericContext?, Type?)
Declaration
public static ICompilationElement GetTarget(this IRef reference, ICompilation compilation, IGenericContext? genericContext = null, Type? interfaceType = null)Parameters
| Type | Name | Description |
|---|---|---|
| IRef | reference | |
| ICompilation | compilation | |
| IGenericContext | genericContext | |
| Type | interfaceType |
Returns
| Type | Description |
|---|---|
| ICompilationElement |
GetTarget<T>(IRef<T>)
Gets the target of the reference for the current execution context, or throws an exception if the reference cannot be resolved.
Declaration
public static T GetTarget<T>(this IRef<T> reference) where T : class, ICompilationElementParameters
| Type | Name | Description |
|---|---|---|
| IRef<T> | reference |
Returns
| Type | Description |
|---|---|
| T |
Type Parameters
| Name | Description |
|---|---|
| T |