C# Class CompartmentMapping.CompartmentMappingUtil

Some static utility methods to use with compartment mappings
Show file Open project: thabart/SimpleOrm Class Usage Examples

Public Methods

Method Description
AllCompartmentMappingRules ( DomainModel model ) : System.Type[]

Gets all rules defined by the compartment mappings to register them by the dsl framework.

You should override the GetCustomDomainModelTypes() method in a partial class of your DomainModel.

AllCompartmentMappingRules ( DomainModel model, Type baseElementsForList ) : System.Type[]

Gets all rules defined by the compartment mappings to register them by the dsl framework.

You should override the GetCustomDomainModelTypes() method in a partial class of your DomainModel.

RemoveRerouteCommand ( IList baseList ) : IList
RerouteCompartmentMappings ( BinaryLinkShape link ) : void

Reroutes a compartment connection link shape.

The start and endpoints of the link will recalculated.

RerouteCompartmentMappings ( Diagram diagram ) : void

Reroutes all compartment connection link shape of a given diagram.

The start and endpoints of the link will recalculated.

RerouteCompartmentMappings ( NodeShape shape ) : void

Reroutes all compartment connection link shape connected to a given NodeShape.

The start and endpoints of the link will recalculated.

Private Methods

Method Description
DoRerouteCompartmentMappings ( BinaryLinkShape link ) : void

Reroutes a compartment connection link shape.

To call this method you have to fill the cache and start a transaction!

FindAllCompartmentMappingRouter ( Assembly assembly ) : void

Search for all classes based on CompartmentMappingRouterBase

Only direct subclasses of CompartmentMappingRouterBase will be found, but since the code generator creates this classes it is not a problem. The generated code must be live in the Dsl Porject or the rules may be not found.

FindAllCompartmentRules ( Assembly assembly ) : System.Type[]

Search for all Rules based on CompartmentMappingAddRuleBase or CompartmentEntryDeletingRuleBase

Only direct subclasses of CompartmentEntryDeletingRuleBase will be found, but since the code generator creates this classes it is not a problem. The generated code must be live in the Dsl Porject or the rules may be not found.

Method Details

AllCompartmentMappingRules() public static method

Gets all rules defined by the compartment mappings to register them by the dsl framework.
You should override the GetCustomDomainModelTypes() method in a partial class of your DomainModel.
public static AllCompartmentMappingRules ( DomainModel model ) : System.Type[]
model DomainModel The model to get the rules for.
return System.Type[]

AllCompartmentMappingRules() public static method

Gets all rules defined by the compartment mappings to register them by the dsl framework.
You should override the GetCustomDomainModelTypes() method in a partial class of your DomainModel.
public static AllCompartmentMappingRules ( DomainModel model, Type baseElementsForList ) : System.Type[]
model DomainModel The model to get the rules for.
baseElementsForList System.Type Some other rules to add to the result list.
return System.Type[]

RemoveRerouteCommand() public static method

public static RemoveRerouteCommand ( IList baseList ) : IList
baseList IList
return IList

RerouteCompartmentMappings() public static method

Reroutes a compartment connection link shape.
The start and endpoints of the link will recalculated.
public static RerouteCompartmentMappings ( BinaryLinkShape link ) : void
link BinaryLinkShape The BinaryLinkShape
return void

RerouteCompartmentMappings() public static method

Reroutes all compartment connection link shape of a given diagram.
The start and endpoints of the link will recalculated.
public static RerouteCompartmentMappings ( Diagram diagram ) : void
diagram Diagram The Diagram
return void

RerouteCompartmentMappings() public static method

Reroutes all compartment connection link shape connected to a given NodeShape.
The start and endpoints of the link will recalculated.
public static RerouteCompartmentMappings ( NodeShape shape ) : void
shape NodeShape The NodeShape
return void