コード例 #1
0
        static UnixLoader()
        {
            var buffer = Marshal.AllocHGlobal(0x1000);

            uname(buffer);
            var unixName = Marshal.PtrToStringAnsi(buffer);

            Marshal.FreeHGlobal(buffer);
            if (unixName == "Darwin")
            {
                OsXImports.Init();
            }
            else
            {
                LinuxImports.Init();
            }
        }
コード例 #2
0
        static UnixLoader()
        {
            var buffer = Marshal.AllocHGlobal(0x1000);

            uname(buffer);
            var unixName = Marshal.PtrToStringAnsi(buffer);

            Marshal.FreeHGlobal(buffer);
            if (unixName == "Darwin")
            {
                OsXImports.Init();
            }
#if NET6_0_OR_GREATER
            else if (OperatingSystem.IsAndroid())
            {
                AndroidImports.Init();
            }
#endif
            else
            {
                LinuxImports.Init();
            }
        }