public void Dispose() { batchEvents.OnBatchProgress -= new IBatchEvents_OnBatchProgressEventHandler( batchEvents_OnBatchProgress ); batchEvents.OnProcessMessages -= new IBatchEvents_OnProcessMessagesEventHandler(batchEvents_OnProcessMessages); batchEvents.OnRecognizerTip -=new IBatchEvents_OnRecognizerTipEventHandler(batchEvents_OnRecognizerTip); batchEvents = null; }
public SampleBatchEventsSink( object source ) { // Check that the source object is a IBatchEvents source (projects and batches are). // Using the helper class generated by the framework which maps events source methods to delegates batchEvents = source as IBatchEvents_Event; assert( batchEvents != null ); batchEvents.OnBatchProgress += new IBatchEvents_OnBatchProgressEventHandler( batchEvents_OnBatchProgress ); batchEvents.OnProcessMessages += new IBatchEvents_OnProcessMessagesEventHandler(batchEvents_OnProcessMessages); batchEvents.OnRecognizerTip +=new IBatchEvents_OnRecognizerTipEventHandler(batchEvents_OnRecognizerTip); }