P
pavel.gz
In my add-in I have a method that unsubcribes from delete event
handler(it was previously subscribed to) in the begining and subscribes
to it again at the end like:
public void SynchronizeTasks(...)
{
tasksItems.ItemRemove -= OnTasksDelete;
....
foreach (Outlook.TaskItem task in tasksItems)
{
task.Delete();
}
....
tasksItems.ItemRemove += new
Outlook.ItemsEvents_ItemRemoveEventHandler(OnTasksDelete);
}
However, for every task deleted in this method I catch an ItemRemove
event in OnTasksDelete. Is there any way to completely unsubscribe from
this event?
Thanks in advance.
handler(it was previously subscribed to) in the begining and subscribes
to it again at the end like:
public void SynchronizeTasks(...)
{
tasksItems.ItemRemove -= OnTasksDelete;
....
foreach (Outlook.TaskItem task in tasksItems)
{
task.Delete();
}
....
tasksItems.ItemRemove += new
Outlook.ItemsEvents_ItemRemoveEventHandler(OnTasksDelete);
}
However, for every task deleted in this method I catch an ItemRemove
event in OnTasksDelete. Is there any way to completely unsubscribe from
this event?
Thanks in advance.