MetalamaAPI documentationAspect APIMetalama.​Framework.​CodeIRef<T>Get­Target
Open sandboxFocus

IRef<T>.GetTarget Method

GetTarget(ICompilation, ReferenceResolutionOptions)

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 GetTargetOrNull<T>(IRef<T>, ReferenceResolutionOptions) extension method.

Declaration
T GetTarget(ICompilation compilation, ReferenceResolutionOptions options)
Parameters
Type Name Description
ICompilation compilation
ReferenceResolutionOptions options
Returns
Type Description
T