IVsaCodeItem.RemoveEventSource Method
Removes the specified event source from the code item.
public: void RemoveEventSource(
String EventSourceName
);
public void RemoveEventSource(
string EventSourceName,
);
MustOverride Public Sub RemoveEventSource( _
ByVal EventSourceName As String _
)
Parameters
- eventSourceName
The programmatic name of the event source to be removed.
Remarks
Removing an event source does not remove the underlying event handler from source text. Rather, events no longer raise notifications to the event handler. Therefore, you will get a compiler error if you delete an event source but leave the underlying function in the source code.
The following table shows the exceptions that the RemoveEventSource method can throw.
Exception Type |
Condition |
---|---|
EngineClosed |
The IVsaEngine.Close method has been called and the engine is closed. |
EngineBusy |
The engine is currently executing code for another thread. |
EngineRunning |
The engine is running. |
EventSourceNotFound |
The named event source is not currently in use by the item. |