Open sandboxFocus

Method TryForCompilation

TryForCompilation<T>(T?, ICompilation, out T?)

Tries to get a representation of the current declaration in a different version of the compilation.

Declaration
public static bool TryForCompilation<T>(this T? compilationElement, ICompilation compilation, out T? translated) where T : class, ICompilationElement
Parameters
Type Name Description
T compilationElement

The compilation element to translate.

ICompilation compilation

The target compilation.

T translated

When this method returns true, contains the translated compilation element; otherwise, null.

Returns
Type Description
bool

true if the compilation element exists in the target compilation; otherwise, false.

Type Parameters
Name Description
T

The type of compilation element.