Open sandboxFocus

Method CanBeImplementedFromOutsideAssembly

CanBeImplementedFromOutsideAssembly(IDeclaration, bool)

Determines whether an IMember or INamedType can be implemented (i.e. derived from or overridden) from an outside assembly. When the declaration is an IParameter, considers the parent member. Returns false for other kinds of declarations.

Declaration
public static bool CanBeImplementedFromOutsideAssembly(this IDeclaration declaration, bool honorInternalVisibleToAttributes = true)
Parameters
Type Name Description
IDeclaration declaration

The declaration to check.

bool honorInternalVisibleToAttributes

Whether to consider InternalsVisibleTo attributes when determining accessibility.

Returns
Type Description
bool

true if the declaration can be implemented from outside the assembly; otherwise, false.