System.Runtime.InteropServices.ComEventsHelper.Combine C# (CSharp) Method

Combine() public static method

public static Combine ( object rcw, Guid iid, int dispid, Delegate d ) : void
rcw object
iid Guid
dispid int
d Delegate
return void
        public static void Combine(object rcw, Guid iid, int dispid, Delegate d)
        {
            throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
        }

Usage Example

 public override void AddEventHandler(object target, Delegate handler)
 {
     if (Marshal.IsComObject(target))
     {
         // retrieve sourceIid and dispid
         GetDataForComInvocation(_innerEventInfo, out Guid sourceIid, out int dispid);
         ComEventsHelper.Combine(target, sourceIid, dispid, handler);
     }
     else
     {
         // we are dealing with a managed object - just add the delegate through reflection
         _innerEventInfo.AddEventHandler(target, handler);
     }
 }
All Usage Examples Of System.Runtime.InteropServices.ComEventsHelper::Combine
ComEventsHelper