示例#1
0
        public object InPlaceAdd(object func)
        {
            ComEventSink comEventSink = ComEventSink.FromRuntimeCallableWrapper(_rcw, _sourceIid, true);

            comEventSink.AddHandler(_dispid, func);
            return(this);
        }
示例#2
0
        public object InPlaceSubtract(object func)
        {
            ComEventSink comEventSink = ComEventSink.FromRuntimeCallableWrapper(_rcw, _sourceIid, false);

            if (comEventSink == null)
            {
                throw Error.RemovingUnregisteredEvent();
            }

            comEventSink.RemoveHandler(_dispid, func);
            return(this);
        }