示例#1
0
 /// <summary>
 /// create event binding
 /// </summary>
 /// <param name="connectPoint"></param>
 public void SetupEventBinding(IConnectionPoint connectPoint)
 {
     try
     {
         if (true == Settings.EnableEvents)
         {
             connectPoint.GetConnectionInterface(out _interfaceId);
             _connectionPoint = connectPoint;
             _connectionPoint.Advise(this, out _connectionCookie);
             _pointList.Add(this);
         }
     }
     catch (Exception throwedException)
     {
         DebugConsole.WriteException(throwedException);
         throw (throwedException);
     }
 }