Detach() private method

private Detach ( ) : void
return void
Exemplo n.º 1
0
 public void RemoveRelationship(Relationship relationship)
 {
     if (relationships.Contains(relationship))
     {
         relationship.Detach();
         relationship.Modified -= ElementChanged;
         relationships.Remove(relationship);
         OnRelationRemoved(new RelationshipEventArgs(relationship));
     }
 }
Exemplo n.º 2
0
 public void RemoveRelationship(Relationship relationship)
 {
     if (_relationships.Contains(relationship))
     {
         OnBeginUndoableOperation(this, EventArgs.Empty);
         relationship.Detach();
         relationship.BeginUndoableOperation -= new EventHandler(OnBeginUndoableOperation);
         relationship.Modified -= new EventHandler(ElementChanged);
         _relationships.Remove(relationship);
         OnRelationRemoved(new RelationshipEventArgs(relationship));
     }
 }
Exemplo n.º 3
0
 private void RemoveRelationships(IEntity entity)
 {
     for (int i = 0; i < relationships.Count; i++)
     {
         Relationship relationship = relationships[i];
         if (relationship.First == entity || relationship.Second == entity)
         {
             relationship.Detach();
             relationship.Modified -= ElementChanged;
             relationships.RemoveAt(i--);
             OnRelationRemoved(new RelationshipEventArgs(relationship));
         }
     }
 }
Exemplo n.º 4
0
 private void RemoveRelationships(IEntity entity)
 {
     for (int i = 0; i < _relationships.Count; i++)
     {
         Relationship relationship = _relationships[i];
         if (relationship.First == entity || relationship.Second == entity)
         {
             OnBeginUndoableOperation(this, EventArgs.Empty);
             relationship.Detach();
             relationship.BeginUndoableOperation -= new EventHandler(OnBeginUndoableOperation);
             relationship.Modified -= new EventHandler(ElementChanged);
             _relationships.RemoveAt(i--);
             OnRelationRemoved(new RelationshipEventArgs(relationship));
         }
     }
 }
Exemplo n.º 5
0
		public void RemoveRelationship(Relationship relationship)
		{
			if (relationships.Contains(relationship))
			{
				relationship.Detach();
				relationship.Modified -= ElementChanged;
				relationships.Remove(relationship);
				OnRelationRemoved(new RelationshipEventArgs(relationship));
			}
		}