Visual Studio UML Class Diagram & Modeling of Generic Types

前端 未结 1 1634
名媛妹妹
名媛妹妹 2020-12-24 09:35

I need to model a concrete generic class inheriting from a base generic class. First, see below:

\"enter

相关标签:
1条回答
  • 2020-12-24 09:47

    You need to add a new binding class (BaseFacade <Activity, int>) connect it to your parameterized class (BaseFacade<T, TKey>) with a template binding connector and then specialize your child class (ActivityFacade) from the binding class.

    enter image description here

    From the OMG UML specification

    "A template is a parameterized element ... used to generate other model elements using TemplateBinding relationships. The template parameters for the template signature specify the formal parameters that will be substituted by actual parameters (or the default) in a binding."

    UPDATE:

    The diagram I included is drawn using EA. The same concept can be modeled in Visual Studio UML tool. See the section "Template types: To use a template type" in msdn.

    0 讨论(0)
提交回复
热议问题