Re: [Mono-dev] Error trying to compile mono on CentOs 5

2015-06-11 Thread Timotheus Pokorra
Supplementary question - I am trying to load a time zone using: TimeZoneInfo.FindSystemTimeZoneById(GMT Standard Time) Try to use TimeZoneInfo.FindSystemTimeZoneById(GMT) instead. The timezone must exist as a file in /usr/share/zoneinfo see for details:

Re: [Mono-dev] Error trying to compile mono on CentOs 5

2015-06-11 Thread Nikki Locke
What a star you are, Timotheus! Supplementary question - I am trying to load a time zone using: TimeZoneInfo.FindSystemTimeZoneById(GMT Standard Time) and I get: Exception of type 'System.TimeZoneNotFoundException' was thrown. at System.TimeZoneInfo.FindSystemTimeZoneByFileName

Re: [Mono-dev] Error trying to compile mono on CentOs 5

2015-06-11 Thread Nikki Locke
Thanks again, Timotheus - I am now using GB time zone on Linux (not GMT, as I want BST in summer) - of course, that doesn't work on Windows, so I have put in conditional code. Timotheus Pokorra wrote: Supplementary question - I am trying to load a time zone using:

Re: [Mono-dev] Mono/Windows Services

2015-06-11 Thread Slide
Mono has mono-service2 that you can use to wrap a Windows service on *nix to become a daemon that you can issue start and stop commands to like most daemons. On Thu, Jun 11, 2015 at 1:50 PM Paul McEwan paul.mce...@atlium.com wrote: I have a Windows Service that I converted to Mono. What's the

[Mono-dev] Mono/Windows Services

2015-06-11 Thread Paul McEwan
I have a Windows Service that I converted to Mono. What's the recommended way to keep it running in the background like a Windows Service -- i.e. you start it and it keeps running until you stop it? Should you just put a loop in the main thread that sleeps and wakes up every second and performs

Re: [Mono-dev] Mono/Windows Services

2015-06-11 Thread Oskar Berggren
You can use the mono-service tool to start the application through the ServiceBase class, as in Windows. But ServiceBase or not, typically you would enter some sort of mainloop. Most services will _wait_ for something to happen and not wake up until it does. High-frequency timer-based polling

Re: [Mono-dev] Mono/Windows Services

2015-06-11 Thread Bryan Crotaz
Turn an exe into a daemon: http://serverfault.com/questions/135859/is-there-a-standard-way-to-make-daemon-in-debian To keep it idle, I'd suggest using Task objects, with a lambda for each task with the work in it. They'll run on the thread pool. Then your main thread should just sleep until a