void BindEventSubscription(BinaryExpression node)
{
IEntity entity = GetEntity(node.Left);
if (entity.IsAmbiguous())
{
IList found = ((Ambiguous) entity).Select(IsPublicEvent);
if (found.Count != 1)
{
Error(node);
return;
}
entity = (IEntity) found[0];
Bind(node.Left, entity);
}
IEvent eventInfo = (IEvent)entity;
IType rtype = GetExpressionType(node.Right);
if (!AssertDelegateArgument(node, eventInfo, rtype))
{
Error(node);
return;
}
BindExpressionType(node, TypeSystemServices.VoidType);
}