public object InPlaceAdd(object func) { ComEventSink comEventSink = ComEventSink.FromRuntimeCallableWrapper(_rcw, _sourceIid, true); comEventSink.AddHandler(_dispid, func); return(this); }
public object InPlaceSubtract(object func) { ComEventSink comEventSink = ComEventSink.FromRuntimeCallableWrapper(_rcw, _sourceIid, false); if (comEventSink == null) { throw Error.RemovingUnregisteredEvent(); } comEventSink.RemoveHandler(_dispid, func); return(this); }