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

IRef<T>.GetTargetOrNull Method

GetTargetOrNull(ICompilation, ReferenceResolutionOptions)

Gets the target of the reference for a given compilation, or returns null if the reference cannot be resolved. To get the reference for the current execution context, use the GetTarget<T>(IRef<T>, ReferenceResolutionOptions) extension method.

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