Example #1
0
        /// <summary>
        /// Shuts down AoInitialize object and check back in extensions to ensure
        /// any ESRI libraries that have been used are unloaded in the correct order.
        /// </summary>
        /// <remarks>Once Shutdown has been called, you cannot re-initialize the product license
        /// and should not make any ArcObjects call.</remarks>
        public void ShutdownApplication()
        {
            if (m_hasShutDown)
            {
                return;
            }

            //Check back in extensions
            foreach (KeyValuePair <esriLicenseExtensionCode, esriLicenseStatus> item in m_extensionStatus)
            {
                if (item.Value == esriLicenseStatus.esriLicenseCheckedOut)
                {
                    m_AoInit.CheckInExtension(item.Key);
                }
            }

            m_requestedProducts.Clear();

            if (m_requestedExtensions != null)
            {
                m_requestedExtensions.Clear();
            }
            m_extensionStatus.Clear();
            m_productStatus.Clear();
            m_AoInit.Shutdown();
            m_hasShutDown = true;
            //m_hasInitializeProduct = false;
        }
        public void ShutdownApplication()
        {
            if (_aoInitialize == null)
            {
                return;
            }

            //Checkin the extensions
            if (_initializedExtensions != null)
            {
                foreach (esriLicenseExtensionCode extensionCode in _initializedExtensions)
                {
                    if (_aoInitialize.CheckInExtension(extensionCode) !=
                        esriLicenseStatus.esriLicenseCheckedIn)
                    {
                        //Silent check in error
                        //System.Diagnostic.Trace.WriteLine(LicenseMessage(licenseStatus), "ESRI License Initializer")
                    }
                }
            }

            //Shut down the AoInitialize object
            _aoInitialize.Shutdown();
            //_aoInitialize = null;
        }
Example #3
0
        } // initLic method

        public void shutdown()
        {
            if (mLicInit != null)
            {
                mLicInit.Shutdown();
            }
        }
Example #4
0
 public static void ShutDown()
 {
     if (aoinitialize != null)
     {
         aoinitialize.CheckOutExtension(esriLicenseExtensionCode.esriLicenseExtensionCodeNetwork);
         aoinitialize.Shutdown();
     }
 }
        public void TearDown()
        {
            license.Shutdown();

            IDisposable disposable = this.target as IDisposable;

            if (disposable != null)
            {
                disposable.Dispose();
            }
        }
Example #6
0
        public void ShutdownApplication()
        {
            if (m_AoInitialize == null)
            {
                return;
            }

            //关闭 AoInitilaize对象
            m_AoInitialize.Shutdown();
            m_AoInitialize = null;
        }
Example #7
0
        /// <summary>
        ///     Releases unmanaged and - optionally - managed resources.
        /// </summary>
        /// <param name="disposing">
        ///     <c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only
        ///     unmanaged resources.
        /// </param>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_AoInit != null)
                {
                    _AoInit.Shutdown();
                }

                AOUninitialize.Shutdown();
            }
        }
 private void UnRegisterLicenseService()
 {
     if (m_pAoInit != null)
     {
         try
         {
             m_pAoInit.Shutdown();
         }
         catch
         {
         }
         finally
         {
             //ComObject.Release(ref m_pAoInit);
         }
     }
 }
Example #9
0
 private static void returnLicense()
 {
     m_License.Shutdown();
 }
Example #10
0
 public void TearDown()
 {
     // clean up
     license.Shutdown();
 }
Example #11
0
 public override void Finish()
 {
     license.Shutdown();
 }
Example #12
0
 public static void ReturnESRILicense(IAoInitialize pESRILicense)
 {
     if (pESRILicense != null)
     {
         pESRILicense.Shutdown();                                                                // RELEASE THE LICENSE
         Marshal.ReleaseComObject(pESRILicense);
     }
 }
 public void ShutDown()
 {
     m_AoInitializeClass.Shutdown();
 }