Open sandboxFocus

Method Translate

Translate<T>(T?, IGenericContext?)

Translates a compilation element to the current compilation context, optionally applying a generic context for type parameter substitution.

Declaration
T? Translate<T>(T? compilationElement, IGenericContext? genericContext = null) where T : class, ICompilationElement
Parameters
Type Name Description
T compilationElement

The compilation element to translate.

IGenericContext genericContext

Optional generic context for type parameter substitution.

Returns
Type Description
T

The translated compilation element, or null if the input is null or cannot be translated.

Type Parameters
Name Description
T

The type of compilation element to translate.