Exemple #1
0
        public void Dispose()
        {
            //Are we shutting down clean if so write 'nice shutdown' cookie
            if (DynamoModel.IsCrashing)
            {
                StabilityCookie.WriteCrashingShutdown();
            }
            else
            {
                StabilityCookie.WriteCleanShutdown();
            }

            // If the Analytics Client was initialized, shut it down.
            // Otherwise skip this step because it would cause an exception.
            if (Service.IsInitialized)
            {
                Service.ShutDown();
                // Unregister the GATrackerFactory only after shutdown is recorded.
                // Unregister is required, so that the host app can re-start Analytics service.
                Service.Instance.Unregister(GATrackerFactory.Name);
            }

            if (null != heartbeat)
            {
                Heartbeat.DestroyInstance();
            }
            heartbeat = null;

            if (null != logger)
            {
                logger.Dispose();
            }
            logger = null;
        }
        public void Dispose()
        {
            //Are we shutting down clean if so write 'nice shutdown' cookie
            if (DynamoModel.IsCrashing)
            {
                StabilityCookie.WriteCrashingShutdown();
            }
            else
            {
                StabilityCookie.WriteCleanShutdown();
            }

            Service.ShutDown();
            //Unregister the GATrackerFactory only after shutdown is recorded.
            //Unregister is required, so that the host app can re-start Analytics service.
            Service.Instance.Unregister(GATrackerFactory.Name);

            if (null != heartbeat)
            {
                Heartbeat.DestroyInstance();
            }
            heartbeat = null;

            if (null != logger)
            {
                logger.Dispose();
            }
            logger = null;
        }
Exemple #3
0
        public static void End()
        {
            // Heartbeat internally refers to the InstrumentationLogger (hence,
            // the "loggerImpl"), so we must destroy the heartbeat thread before
            // the rest of clean-up happens.
            Heartbeat.DestroyInstance();

            sessionID = null;

            if (loggerImpl != null)
            {
                loggerImpl.Dispose();
                loggerImpl = null;
            }

            started = false;
        }
Exemple #4
0
        public void Dispose()
        {
            //Are we shutting down clean if so write 'nice shutdown' cookie
            if (DynamoModel.IsCrashing)
            {
                StabilityCookie.WriteCrashingShutdown();
            }
            else
            {
                StabilityCookie.WriteCleanShutdown();
            }

            if (null != heartbeat)
            {
                Heartbeat.DestroyInstance();
            }
            heartbeat = null;

            if (null != logger)
            {
                logger.Dispose();
            }
            logger = null;
        }