MetalamaAPI documentationAspect APIMetalama.​Framework.​CodeRef­ExtensionsGet­Target­Or­Null
Open sandboxFocus

RefExtensions.GetTargetOrNull Method

GetTargetOrNull<T>(IRef<T>, ReferenceResolutionOptions)

Gets the target of the reference for the current execution context, or returns null if the reference cannot be resolved.

Declaration
public static T GetTargetOrNull<T>(this IRef<T> reference, ReferenceResolutionOptions options)
where T : class, ICompilationElement
Parameters
Type Name Description
IRef<T> reference
ReferenceResolutionOptions options
Returns
Type Description
T
Type Parameters
Name Description
T