private void subscribeToDataManager(SCDataManager dataManager) { dataManager.PropertyChanged += propertyChanged; dataManager.Commodities.RelationshipChanged += relationshipChanged; dataManager.TradingPorts.RelationshipChanged += relationshipChanged; foreach (Commodity commodity in dataManager.Commodities) { subscribeToCommodity(commodity); } foreach (TradingPort tradingPort in dataManager.TradingPorts) { subscribeToTradingPort(tradingPort); } }
public SCDeltaManager(SCDataManager dataManager) { this.dataManager = dataManager; subscribeToDataManager(dataManager); }