示例#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;
        }
示例#2
0
        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;
        }
示例#3
0
        } // initLic method

        public void shutdown()
        {
            if (mLicInit != null)
            {
                mLicInit.Shutdown();
            }
        }
示例#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();
            }
        }
示例#6
0
        public void ShutdownApplication()
        {
            if (m_AoInitialize == null)
            {
                return;
            }

            //关闭 AoInitilaize对象
            m_AoInitialize.Shutdown();
            m_AoInitialize = null;
        }
示例#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);
         }
     }
 }
示例#9
0
 private static void returnLicense()
 {
     m_License.Shutdown();
 }
示例#10
0
 public void TearDown()
 {
     // clean up
     license.Shutdown();
 }
示例#11
0
 public override void Finish()
 {
     license.Shutdown();
 }
示例#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();
 }