Exemplo n.º 1
0
 public void AcceptOnCreation(IModifier<ICharacter> modifier)
 {
     if (IsNew) {
         modifier.ModifyOnCreation(this);
     } else {
         throw new InvalidOperationException("Only a new character can be modified with ModifyOnCreation");
     }
 }