}
private bool RunningOnWindows {
- get { return ((int) Environment.OSVersion.Platform == 128); }
+ get {
+ // check for non-Unix platforms - see FAQ for more details
+ // http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F
+ int platform = (int) Environment.OSVersion.Platform;
+ return ((platform != 4) && (platform != 128));
+ }
}
// Partial Trust Tests - i.e. call "normal" unit with reduced privileges