src/Misc/EFTools/EntityDesignEntityDesigner/CustomCode/Shapes/EntityTypeShape.cs
/// <summary>
///     Gets an array of CompartmentDescription for all compartments shown on this shape
///     The method will replace ElementListCompartmentDescription instances with EntityTypeElementListCompartmentDescription instances.
/// </summary>
Gets an array of CompartmentDescription for all compartments shown on this shape
The method will replace ElementListCompartmentDescription instances with EntityTypeElementListCompartmentDescription instances.
Gets an array of CompartmentDescription for all compartments shown on this shape The method will replace ElementListCompartmentDescription instances with EntityTypeElementListCompartmentDescription instances .
public override CompartmentDescription[] GetCompartmentDescriptions()
        {
            var compartmentDescription = base.GetCompartmentDescriptions();
            Debug.Assert(compartmentDescription.Length == 2, "There should be 2 compartment descriptions.");
            if (compartmentDescription.Length == 2)
            {
                var originalElementListCompartmentDescription = compartmentDescription[0] as ListCompartmentDescription;
                Debug.Assert(
                    originalElementListCompartmentDescription != null,
                    "The compartment description is not type of ListCompartmentDescription. Actual type: "
                    + compartmentDescription[0].GetType().Name);
                if (originalElementListCompartmentDescription != null)
                {
                    compartmentDescription[0] = new EntityTypeElementListCompartmentDescription(
                        originalElementListCompartmentDescription,
                        !EntityDesignerDiagramConstant.IsDefaultShapeExpanded,
                        true);
                }
                originalElementListCompartmentDescription = compartmentDescription[1] as ListCompartmentDescription;
                Debug.Assert(
                    originalElementListCompartmentDescription != null,
                    "The compartment description is not type of ListCompartmentDescription. Actual type: "
                    + compartmentDescription[1].GetType().Name);
                if (originalElementListCompartmentDescription != null)
                {
                    compartmentDescription[1] = new EntityTypeElementListCompartmentDescription(
                        originalElementListCompartmentDescription,
                        !EntityDesignerDiagramConstant.IsDefaultShapeExpanded,
                        false);
                }
            }
            return compartmentDescription;
        }
public override CompartmentDescription [ ] GetCompartmentDescriptions ( ) { var compartmentDescription = base . GetCompartmentDescriptions ( ) ; Debug . Assert ( compartmentDescription . Length == 2 , " " ) ; if ( compartmentDescription . Length == 2 ) { var originalElementListCompartmentDescription = compartmentDescription [ 0 ] as ListCompartmentDescription ; Debug . Assert ( originalElementListCompartmentDescription != null , " " + compartmentDescription [ 0 ] . GetType ( ) . Name ) ; if ( originalElementListCompartmentDescription != null ) { compartmentDescription [ 0 ] = new EntityTypeElementListCompartmentDescription ( originalElementListCompartmentDescription , ! EntityDesignerDiagramConstant . IsDefaultShapeExpanded , true ) ; } originalElementListCompartmentDescription = compartmentDescription [ 1 ] as ListCompartmentDescription ; Debug . Assert ( originalElementListCompartmentDescription != null , " " + compartmentDescription [ 1 ] . GetType ( ) . Name ) ; if ( originalElementListCompartmentDescription != null ) { compartmentDescription [ 1 ] = new EntityTypeElementListCompartmentDescription ( originalElementListCompartmentDescription , ! EntityDesignerDiagramConstant . IsDefaultShapeExpanded , false ) ; } } return compartmentDescription ; }
Gets an array of CompartmentDescription for all compartments shown on this shape
The method will replace ElementListCompartmentDescription instances with EntityTypeElementListCompartmentDescription instances.
Gets an array of CompartmentDescription for all compartments shown on this shape The method will replace ElementListCompartmentDescription instances with EntityTypeElementListCompartmentDescription instances .