/// <summary> /// Update the reference to the parent object, recursively for all children. /// </summary> /// <param name="x_parent">The parent inspection object.</param> public virtual void UpdateParentReference(InspectionObject x_parent) { Parent = x_parent; // Derived classes need to update all their children, too. // (Typically with "this" as parent, of course.) }
public override void UpdateParentReference(InspectionObject x_parent) { base.UpdateParentReference(x_parent); // Update all children. foreach (Pin pin in Pins ?? Enumerable.Empty <Pin> ()) { pin.UpdateParentReference(this); } }
public override void UpdateParentReference(InspectionObject x_parent) { base.UpdateParentReference(x_parent); // Update all children. foreach (Fiducial fiducial in Fiducials ?? Enumerable.Empty <Fiducial> ()) { fiducial.UpdateParentReference(this); } foreach (Component component in Components ?? Enumerable.Empty <Component> ()) { component.UpdateParentReference(this); } foreach (Board board in Boards ?? Enumerable.Empty <Board> ()) { board.UpdateParentReference(this); } }