private bool IsDeclaredInside(IType candidate)
{
IInternalEntity entity = candidate as IInternalEntity;
if (null == entity) return false;
TypeDefinition type = _scope.DeclaringType;
while (type != null)
{
if (type == entity.Node) return true;
type = type.DeclaringType;
}
return false;
}