protected override void Dispose(bool disposing) { if (disposing) { connection = null; Version = null; } GC.SuppressFinalize(this); }
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); } } }