GetTargetInterface(ICompilation, Type?, IGenericContext?, bool)
Gets the target of the reference for a given compilation, and specify the type of the interface to be returned. Normally, the extension methods GetTarget<T>(IRef<T>, ICompilation, IGenericContext?) or GetTargetOrNull<T>(IRef<T>, ICompilation, IGenericContext?) should be used instead of this one.
Declaration
ICompilationElement? GetTargetInterface(ICompilation compilation, Type? interfaceType, IGenericContext? genericContext = null, bool throwIfMissing = false)Parameters
| Type | Name | Description |
|---|---|---|
| ICompilation | compilation | |
| Type | interfaceType | |
| IGenericContext | genericContext | |
| bool | throwIfMissing |
Returns
| Type | Description |
|---|---|
| ICompilationElement |