コード例 #1
0
        public void Initialize()
        {
            //IL_0000: Unknown result type (might be due to invalid IL or missing references)
            //IL_0006: Expected O, but got Unknown
            //IL_004e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0058: Expected O, but got Unknown
            RailGameID val = new RailGameID();

            ((RailComparableID)val).id_ = 2000328uL;
            string[] array = new string[1]
            {
                " "
            };
            if (rail_api.RailNeedRestartAppForCheckingEnvironment(val, array.Length, array))
            {
                Environment.Exit(1);
            }
            if (!rail_api.RailInitialize())
            {
                Environment.Exit(1);
            }
            _callbackHelper.RegisterCallback((RAILEventID)2, new RailEventCallBackHandler(RailEventCallBack));
            isRailValid = true;
            ThreadPool.QueueUserWorkItem(TickThread, null);
            Main.OnTickForThirdPartySoftwareOnly += RailEventTick;
        }
コード例 #2
0
ファイル: CoreSocialModule.cs プロジェクト: Neubulae/Sources
        public void Initialize()
        {
            RailGameID railGameId = new RailGameID();

            ((RailComparableID)railGameId).id_ = (__Null)2000328L;
            string[] commandLineArgs = Environment.GetCommandLineArgs();
            if (rail_api.RailNeedRestartAppForCheckingEnvironment(railGameId, commandLineArgs.Length, commandLineArgs))
            {
                Environment.Exit(1);
            }
            if (!rail_api.RailInitialize())
            {
                Environment.Exit(1);
            }
            // ISSUE: method pointer
            this._callbackHelper.RegisterCallback((RAILEventID)2, new RailEventCallBackHandler((object)null, __methodptr(RailEventCallBack)));
            this.isRailValid = true;
            ThreadPool.QueueUserWorkItem(new WaitCallback(this.TickThread), (object)null);
            Main.OnTickForThirdPartySoftwareOnly += new Action(CoreSocialModule.RailEventTick);
        }