Exemple #1
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                connection = null;
                Version    = null;
            }

            GC.SuppressFinalize(this);
        }
Exemple #2
0
        public void Initialize(XElement configuration)
        {
            log.Trace("ConnectionPool initialization.");
            log.Trace(configuration);

            if (configuration == null)
            {
                return;
            }

            foreach (var connectionSetting in configuration.Elements(DriverConfigurationConstant.ConfigurationElementName))
            {
                var connection = I2CConnection.Create(connectionSetting);
                if (!connections.ContainsKey(connection.Name))
                {
                    connections.Add(connection.Name, connection);
                }
            }
        }