N
Norbert
Hello
My Problem
I have a "server Object" where I can register for Events(generic, not
..net specific)
like
AboEvent(int EventID, MyDelegate CallbackDelegate)
{
// If it is the first delegate with this ID, i have to do something
if(myDic.contains(EventID)){
MyDelegate temp = myDic[EventID];
temp+=CallbackDelegate;
myDic[EventID] = temp;
} else
{
// do something...
myDic[EventID] = CallbackDelegate;
}
}
When the Server is working he notifiys all Callbacks which registered
for an
specific EventID.
That works fine, but now I want to unregister an EventID
If only one Callback is registered for an ID -> ok
but how can I remove an Callback from the InvocationList?
I think this isn't possible but is there a workaround for this problem?
For ex. generating a new MulticasDelegate or something similiar?
Norbert
My Problem
I have a "server Object" where I can register for Events(generic, not
..net specific)
like
AboEvent(int EventID, MyDelegate CallbackDelegate)
{
// If it is the first delegate with this ID, i have to do something
if(myDic.contains(EventID)){
MyDelegate temp = myDic[EventID];
temp+=CallbackDelegate;
myDic[EventID] = temp;
} else
{
// do something...
myDic[EventID] = CallbackDelegate;
}
}
When the Server is working he notifiys all Callbacks which registered
for an
specific EventID.
That works fine, but now I want to unregister an EventID
If only one Callback is registered for an ID -> ok
but how can I remove an Callback from the InvocationList?
I think this isn't possible but is there a workaround for this problem?
For ex. generating a new MulticasDelegate or something similiar?
Norbert