Ich habe folgende Klassen:Correct UML-Diagramm für Dependency Injection
public interface IRule { void Execute(int i); }
public interface IRule1 : IRule { }
public interface IRule2 : IRule { }
public interface IRuleExecutor { void Execute(int i) }
public class Rule1 : IRule1 { public void Execute(int i) { } }
public class Rule2 : IRule2 { public void Execute(int i) { } }
public class RuleExecutor : IRuleExecutor
{
private ICollection<IRule> allRules;
public RuleExecutor(ICollection<IRule> rules)
{
this.allRules = rules;
}
public void Execute(int i) { }
}
Was ist der richtige Weg, um diese Klassen angezeigt wird (vor allem die Beziehung zwischen RuleExecutor und den Regeln) in einem UML-Klassendiagramm?
Vielen Dank im Voraus
Danke das ist, wie ich es getan habe, würde :-) – xeraphim
Ich habe soeben „-allRules“. –
Ich habe eine Frage: Warum ist die Linie von Rule1 zu IRule1 punktiert, aber die Linie von IRule1 nicht iRULE? – xeraphim