Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / June 2005

Tip: Looking for answers? Try searching our database.

Can an event state be serialized

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jabailo@texeme.com - 30 Jun 2005 16:56 GMT
Suppose I have a windows service, with a FileWatcher class.

A file appears, and an event is raised -- but then the server is
rebooted or crashes.

When the server is rebooted, I want that event state to be where it was.

So, can an event be serialized?

And can it then be 're-raised' on the program that was responding to it?
Nicholas Paldino [.NET/C# MVP] - 30 Jun 2005 17:33 GMT
   Whether or not event arguments can be serialized depends on whether or
not the designer of the event and arguments class tagged the type with the
Serializable attribute.  If they did not, then those events are not
serialized.

   Also, by default, if the server crashes or goes down, you will lose that
information.  The only way around that which I can think of would be to
store the event information in a transactional resource (such as a DB or
MSMQ) and have an external process process those entries.  This way, you can
process them in a transactional environment, and if the server is restarted
or rebooted, then you can be assured that the events will be persisted.

   Hope this helps.

Signature

              - Nicholas Paldino [.NET/C# MVP]
              - mvp@spam.guard.caspershouse.com

> Suppose I have a windows service, with a FileWatcher class.
>
[quoted text clipped - 6 lines]
>
> And can it then be 're-raised' on the program that was responding to it?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.