File: Runtime.cs

package info (click to toggle)
mysql-connector-net 6.4.3-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,160 kB
  • ctags: 8,552
  • sloc: cs: 63,689; xml: 7,505; sql: 345; makefile: 50; ansic: 40
file content (26 lines) | stat: -rw-r--r-- 521 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;

namespace MySql.Web.Security
{
    internal static class Runtime
    {
        private static bool inited;
        private static bool isMono;

        public static bool IsMono
        {
            get
            {
                if (!inited)
                    Init();
                return isMono;
            }
        }

        private static void Init()
        {
            Type t = Type.GetType("Mono.Runtime");
            isMono = t != null;
        }
    }
}