]> O.S.I.I.S - jp/crow.git/commitdiff
add test if run on Mono, throw exception if not
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 21 Feb 2018 16:34:40 +0000 (17:34 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 21 Feb 2018 16:34:40 +0000 (17:34 +0100)
src/Interface.cs

index 8c3792d5ccdcf21d8fbcd7509b1c3682fa0cf861..485101e61c2b505426a3bee51ff238399865f293 100644 (file)
@@ -67,6 +67,10 @@ namespace Crow
        {
                #region CTOR
                static Interface(){
+                       if (Type.GetType ("Mono.Runtime") == null) {
+                               throw new Exception (@"C.R.O.W. run only on Mono, download latest version at: http://www.mono-project.com/download/stable/");
+                       }
+
                        CrowConfigRoot =
                                System.IO.Path.Combine(
                                        Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),