ShapeElement::OnOrphaned Method (SerializationResult^)
Visual Studio 2015
Called when a
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)
Parameters
- serializationResult
-
Type:
Microsoft.VisualStudio.Modeling::SerializationResult^
The serialization warning or error to display if an orphan is found.
A shape is an orphan if it is not linked to a parent shape. The diagram is checked for orphans during deserialization. By default, orphans are removed from the diagram.
protected virtual void CheckForOrphanedShapes(DslDiagrams::Diagram diagram, DslModeling::SerializationResult serializationResult) { global::System.Collections.Generic.List<DslDiagrams::ShapeElement> orphanedShapes = new global::System.Collections.Generic.List<DslDiagrams::ShapeElement>(); diagram.IterateShapes(new OrphanedShapeIterator(orphanedShapes, diagram)); foreach (DslDiagrams::ShapeElement orphanedShape in orphanedShapes) { if (serializationResult.Failed) break; orphanedShape.OnOrphaned(serializationResult); } }
Show: