473,320 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Question on Events and Subscriber execution...

Hi,

I had a few question about Events.

1. From some test code I've written it appears that the
events notifications are sent to the subscribers in the order in which
they where subscribed.

Ex:

one.subscribe(eventobject)
ten.subscribe(eventobject)
two.subscribe(eventobject)
seven.subscribe(eventobject)

eventobject.FireEvent();

"event handler for ONE executed"
"event handler for TEN executed"
"event handler for TWO executed"
"event handler for SEVEN executed"

Is this always the case? Is this guaranteed?
2. Ok my second question is , will the eventhandlers wait
for the first one to finish before the next one is executed? So
eventhandler_TEN won't execute until eventhandler_ONE has completed.??
Again from my test code this appears to be the case.

I am asking this becuse I want to use events to notify plugins when
somthing has happened which the plugin can take action against. And
due to the way data may be manipulated by each plugin, order is
important.

Thanks ...
Nov 13 '05 #1
0 1082

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Bryan D. | last post by:
Our application makes extensive use of C#'s event handling mechanism to communicate between classes. A problem has cropped in that it becomes difficult to know for sure that all observers of an...
15
by: Rhy Mednick | last post by:
I have a class (let's call it ClassA) that I've written which has events. In another class (let's call it ClassB) I create a collection of ClassA objects. In a third class (ClassC) I create a...
1
by: Manco | last post by:
I've read that events are a C# implementation of the Observer design pattern which states that: There is a source object providing an event, subscriber objects can subscribe to the event and the...
16
by: anonymous.user0 | last post by:
The way I understand it, if I have an object Listener that has registered as a listener for some event Event that's produced by an object Emitter, as long as Emitter is still allocated Listener...
20
by: David Levine | last post by:
I ran into a problem this morning with event accessor methods that appears to be a bug in C# and I am wondering if this a known issue. public event SomeDelegateSignature fooEvent; public event...
4
by: DeveloperX | last post by:
Hi, I've just written the following code to describe the issue I have. In a nutshell if an object subscribes to an event on a long lived object and I then ditch the reference to the subscriber (set...
5
by: Daniel | last post by:
Hey guys When you hook an event (c# 2.0 syntax): myEvent += MyMethodToFire; You need to also unsubscribe it to avoid a resource leak so that the object it is in gets garbage collected like so...
11
by: MikeT | last post by:
This may sound very elementary, but can you trap when your object is set to null within the object? I have created a class that registers an event from an object passed in the constructor. When...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.