示例#1
0
        public static bool Enable()
        {
            try
            {
                m_api.Log.Log("XPNet CLR: Enable");

                m_plugin.Enable();

                return(true);
            }
            catch (Exception exc)
            {
                m_log?.Log(exc);
                return(false);
            }
        }
示例#2
0
        public static bool Enable()
        {
            // MAINT: The same concern described in Start(), about not making any calls to
            // external DLLs directly from this method, also applies here.  Caveat: m_plugin
            // of course comes from an external DLL, but it _must_ have already successfully
            // loaded or it wouldn't be set.  We don't try to handle the case where methods
            // are called in an order that is different from the guarantees that X-Plane gives
            // us, so if called when m_plugin is null, behavior is officially undefined (though
            // you can see pretty easily what it'll do below).

            try
            {
                m_log?.Log("XPNet CLR: Enable");

                m_plugin.Enable();

                return(true);
            }
            catch (Exception exc)
            {
                m_log?.Log(exc);
                return(false);
            }
        }