Search Results

Search found 2 results on 1 pages for 'peku'.

Page 1/1 | 1 

  • Additional parameters for FileSystemEventHandler

    - by peku
    I'm trying to write a program that could monitor multiple folders for file creations and launch the same action but with different settings for each folder. My problem is in specifying an extra parameter for the FileSystemEventHandler. I create a new FileWatcher for each directory to monitor and add the handler for the Created-action: foreach (String config in configs) { ... FileWatcher.Created += new System.IO.FileSystemEventHandler(FileSystemWatcherCreated) ... } void FileSystemWatcherCreated(object sender, System.IO.FileSystemEventArgs e, MySettings mSettings) { DoSomething(e.FullPath, mSettings); } How could I get the 'mSettings' variable passed to FileSystemWatcherCreated()?

    Read the article

  • Repairing broken XML file - removing extra less-than/greater-than signs

    - by peku
    I have a large XML file which in the middle contains the following: <ArticleName>Article 1 <START </ArticleName> Obviously libxml and other XML libraries can't read this because the less-than sign opens a new tag which is never closed. My question is, is there anything I can do to fix issues like this automatically (preferably in Ruby)? The solution should of course work for any field which has an error like this. Someone said SAX parsing could do the trick but I'm not sure how that would work.

    Read the article

1