System.Windows.Interop.ActiveXHost.TransitionFromLoadedToPassive C# (CSharp) Méthode

TransitionFromLoadedToPassive() private méthode

private TransitionFromLoadedToPassive ( ) : void
Résultat void
        private void TransitionFromLoadedToPassive()
        {
            Debug.Assert(this.ActiveXState == ActiveXHelper.ActiveXState.Loaded, "Wrong start state to transition from");
            if (this.ActiveXState == ActiveXHelper.ActiveXState.Loaded)
            {
                //
                // Need to make sure that we don't handle any PropertyChanged
                // notifications at this point.
                //this.NoComponentChangeEvents++;
                try
                {
                    //
                    // Release the _axInstance
                    if (_axInstance != null)
                    {
                        //
                        // Lets first get the cached interface pointers of _axInstance released.
                        this.DetachInterfacesInternal();

                        Marshal.FinalReleaseComObject(_axInstance);
                        _axInstance = null;
                    }
                }
                finally
                {
                    //
                }

                //
                // We are now Passive!
                this.ActiveXState = ActiveXHelper.ActiveXState.Passive;
            }
        }