Ejemplo n.º 1
0
        /// <inheritdoc/>
        public void Dispose()
        {
            if (updater != null)
            {
                updater.Dispose();
                updater = null;
            }

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

            isInitialized = false;
        }
Ejemplo n.º 2
0
        public void Dispose()
        {
            if (m_Updater != null)
            {
                m_Updater.Dispose();
                m_Updater = null;
            }

            // Dispose each pin
            lock (m_Pins)
            {
                foreach (var pinKey in m_Pins.Keys.ToArray())
                {
                    m_Pins[pinKey].Pin.Dispose();
                    m_Pins.Remove(pinKey);
                }
            }

            m_Pins = null;
        }
Ejemplo n.º 3
0
 /// <inheritdoc/>
 public void Dispose()
 {
     if (updater != null)
     {
         updater.Dispose();
         updater = null;
     }
     // Dispose each pin
     lock (pins)
     {
         for (int i = pinCount - 1; i >= 0; i--)
         {
             if (pins.ContainsKey(i))
             {
                 pins[i].Pin.Dispose();
                 pins.Remove(i);
             }
         }
     }
     pins = null;
 }
Ejemplo n.º 4
0
 /// <inheritdoc/>
 public void Dispose()
 {
     if (updater != null)
     {
         updater.Dispose();
         updater = null;
     }
     if (buttonPin != null)
     {
         buttonPin.Dispose();
         buttonPin = null;
     }
     if (xChannel != null)
     {
         xChannel.Dispose();
         xChannel = null;
     }
     if (yChannel != null)
     {
         yChannel.Dispose();
         yChannel = null;
     }
     isInitialized = false;
 }