Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 public override void ReplaceBusBinding(int index, MathNet.Symbolics.Bus replacement)
 {
     // TODO: could be optimized...
     RemoveBusBinding(index);
     AddBusBinding(index, replacement);
 }