/// <summary> /// Decreases the counter and remove from the dictionary if it was the last opened data source. /// </summary> internal void Close() { if (IsLast) { GatewayAdapter.RemoveDataSource(dataSourceDefinition); } openCounter--; }
/// <summary> /// If it is a new DataSource adds it to the opened dictionary and increases the counter /// </summary> internal void Open() { if (!IsOpened) { GatewayAdapter.AddDataSource(dataSourceDefinition, this); } openCounter++; }