Associations are the most common relationships between types. In Model Xtractor, associations are the result of expansion of regular type member items that return another type, or a combination of types. When type members are properties or fields, they can be further refined into aggregations or compositions.
Aggregation and Composition
Regular member items with a non-void and not a generic returned type expand into associations. In Model Xtractor, depending on member’s kind, their connector may show at one end if it’s about an aggregation or composition, or if the item returns multiple objects:
- Functions (like GetAccessControl here) expand into associations.
- Fields and properties that return Object-based types automatically expand into aggregations.
- Fields and properties that return structures (.NET ValueType-based objects, like struct, enum, most primitive types) automatically expand into compositions.
Generalizations
Types can expose <<extends>> dependency items to their base types. For instance, both DirectoryInfo and FileInfo inherit from or extend the FileSystemInfo class:
When expanded, the <<extends>> dependency becomes a generalization connector to the base class, like the one from DirectoryInfo to FileSystemInfo. Drag and drop the highlighted <<extends>> item of FileInfo outside the shape, and it will also become a similar connector to FileSystemInfo. The item disappeared from the shape, because it was delegated to the connector and automatically hidden. When you select and delete the connector, it will reappear back to its original shape.
An interface cannot implement other interfaces, it can only inherit from or extend them. Interface types can inherit from more than one interface, so in that particular case of multiple inheritance you may find multiple <<extends>> dependency items in the interface shape:





Leave a Comment