public override void RemoveBusBinding(int index) { MathNet.Symbolics.Bus bus = _busSet[index]; _busSet[index] = null; _completelyConnected = false; RemoveLinkedArchitecture(); if (bus != null) { OnBusChanged(index); Service <IMediator> .Instance.NotifyBusDetachedFromPort(bus, this, index); } }
public override void AddBusBinding(int index, MathNet.Symbolics.Bus bus) { if (_busSet[index] == null) { _busSet[index] = bus; if (UpdateIsCompletelyConnected()) { LookupAndLinkNewArchitecture(); } } else { _busSet[index] = bus; if (_completelyConnected && _currentArchitecture != null && !_currentArchitecture.RebindToPortIfSupported(this)) { LookupAndLinkNewArchitecture(); } } OnBusChanged(index); Service <IMediator> .Instance.NotifyBusAttachedToPort(bus, this, index); }
public override void ReplaceBusBinding(int index, MathNet.Symbolics.Bus replacement) { // TODO: could be optimized... RemoveBusBinding(index); AddBusBinding(index, replacement); }