/// <summary> /// Adds the connector. /// </summary> /// <param name="connectorInfo">The connector info.</param> public void AddConnector(ClassConnectorInfo connectorInfo) { if (connectorInfo == null) { throw new ArgumentNullException("connectorInfo"); } this.connectorList.Add(connectorInfo); }
public void AddModelRelation(ClassConnectorInfo associationData) { if (associationData == null) { throw new ArgumentNullException("associationData"); } else if (associationData.Parent == null || associationData.Child == null) { throw new ArgumentException(Properties.Resources.ParentOrChildDataNotFound, "associationData"); } ExtendedObjectInfo parent = DiagramContext.DiagramObjects.Find(associationData.Parent.Key) as ExtendedObjectInfo; ExtendedObjectInfo child = DiagramContext.DiagramObjects.Find(associationData.Child.Key) as ExtendedObjectInfo; if (parent == null || child == null) { throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Properties.Resources.ParentOrChildObjectInfoNotFound, parent == null ? associationData.Parent.Key : associationData.Child.Key), "associationData"); } ObjectRelationInfo relation = new ObjectRelationInfo(parent, child, associationData.Name); DiagramContext.Relations.Add(relation); }