public void Remove(ConnectionInfo connection) { string key = GetKey(connection); connections.Remove(key); metadataProviders.Remove(connection); var e = new ConnectionsEventArgs(connection); ConnectionRemoved?.Invoke(this, e); }
public void RemoveConnection(IStudioConnection connection) { if (!_connections.Contains(connection)) { return; } connection.SetTargetState(Shared.ConnectionState.Destroyed); _connections.Remove(connection); ConnectionRemoved?.Invoke(this, connection); }
public virtual void RemoveConnection(InputPort port) { if (port == null) { throw new ArgumentNullException(); } if (_connections.Contains(port)) { _connections.Remove(port); ConnectionRemoved?.Invoke(this, new ConnectionModifiedEventArgs(ConnectionModifiedEventArgs.Modifier.Removed, port)); } else { throw new ArgumentException("element not found", nameof(port)); } }
public void HandleBpmnElementEvent(BpmnElementEvent e) { TranslateProcessId(e); switch (e.Type) { case BpmnConstants.BPMN_EVENT_CLICK: ElementClick?.Invoke(this, e); break; case BpmnConstants.BPMN_EVENT_ELEMENT_CHANGED: ElementChanged?.Invoke(this, e); break; case BpmnConstants.BPMN_EVENT_SHAPE_ADDED: ShapeAdded?.Invoke(this, e); break; case BpmnConstants.BPMN_EVENT_SHAPE_REMOVED: ShapeRemoved?.Invoke(this, e); break; case BpmnConstants.BPMN_EVENT_UPDATE_ID: ElementIdUpdated?.Invoke(this, e); break; case BpmnConstants.BPMN_EVENT_CONNECTION_REMOVED: ConnectionRemoved?.Invoke(this, e); break; case BpmnConstants.BPMN_EVENT_CONNECTION_ADDED: ConnectionAdded?.Invoke(this, e); break; case BpmnConstants.BPMN_EVENT_ROOT_ADDED: RootAdded?.Invoke(this, e); break; case BpmnConstants.BPMN_EVENT_ROOT_REMOVED: RootRemoved?.Invoke(this, e); break; } }
public void HandleBpmnElementEvent(BpmnElementEvent e) { switch (e.Type) { case "element.click": ElementClick?.Invoke(this, e); break; case "element.changed": ElementChanged?.Invoke(this, e); break; case "shape.added": ShapeAdded?.Invoke(this, e); break; case "shape.removed": ShapeRemoved?.Invoke(this, e); break; case "element.updateId": ElementIdUpdated?.Invoke(this, e); break; case "connection.removed": ConnectionRemoved?.Invoke(this, e); break; case "connection.added": ConnectionAdded?.Invoke(this, e); break; case "root.added": RootAdded?.Invoke(this, e); break; case "root.removed": RootRemoved?.Invoke(this, e); break; } }
/// <summary> /// Invokes ConnectionRemoved event. /// </summary> /// <param name="remoteId">The remote ID of the removed connection</param> protected virtual void OnConnectionRemoved(Guid remoteId) { ConnectionRemoved?.Invoke(this, new ConnectionRemovedEventArgs(remoteId)); }
/// <summary> /// Invokes ConnectionRemoved event. /// </summary> protected virtual void OnConnectionRemoved(ConnectionRemovedEventArgs e) { ConnectionRemoved?.Invoke(this, e); }