Ejemplo n.º 1
0
        /// <summary>Clean up any resources being used.</summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }

                // Dispose of the statsConnection.
                if (statsConnection != null)
                {
                    statsConnection.Dispose();
                }

                // Dispose the sessionHeartbeatTimer and webClient.
                if (sessionHeartbeatTimer != null)
                {
                    sessionHeartbeatTimer.Dispose();
                }
                if (webClient != null)
                {
                    webClient.Dispose();
                }
            }
            base.Dispose(disposing);
        }
Ejemplo n.º 2
0
        /// <summary>Clean up any resources being used.</summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected void Dispose(bool disposing)
        {
            if (disposing)
            {
                // Dispose of the statsConnection.
                if (statsConnection != null)
                {
                    statsConnection.Dispose();
                }

                // Dispose the sessionHeartbeatTimer.
                if (sessionHeartbeatTimer != null)
                {
                    sessionHeartbeatTimer.Dispose();
                }
            }
        }