示例#1
0
 public override void Add(Ninja ninja)
 {
     if (InternalMembers.Contains(ninja))
     {
         return;
     }
     InternalMembers.Add(ninja);
 }
示例#2
0
 public override void Add(Ninja ninja)
 {
     if (InternalMembers.Contains(ninja))
     {
         throw new DuplicateNinjaException();
     }
     InternalMembers.Add(ninja);
 }
示例#3
0
 public override void Add(Ninja ninja)
 {
     if (InternalMembers.Contains(ninja))
     {
         OnAddingDuplicateNinja(new AddingDuplicateNinjaEventArgs(ninja));
         return;
     }
     InternalMembers.Add(ninja);
 }