TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
chris_dorr
NA
1
0
Problems firing events in a remote object
Jan 7 2005 12:46 PM
I've created a .Net remoting singleton object and am trying to get it to raise events that the client can sunbsribe to. The object needs to be completely independent of the clients so I have used an interface rather than copying the object's assembly to each client. I have successfully manged to get the client to subscribe but unfortunately am left with the problem that the object won't raise the events. I have defined a deligate like this (outside of any classes): [Serializable] public delegate void MyHandler(); I have defined the event in both the remote object class and the interface: public event MyHandler MyEvent; Finally I have a mthod to raise the event: protected virtual void OnMyEvent() { if (MyEvent != null) { MyEvent(); } } When having troubles I added tracing. it turns out that the OnMyEvent method is called but the if statement always returns false and the event is not raised. Anyone any thoughts as to why?
Reply
Answers (
1
)
Get object in Collection by Name
change input objekt after thread ?