コード例 #1
0
ファイル: Vehicle.cs プロジェクト: serkankaraagac/dddlib
        private void Handle(NewVehicle @event)
        {
            if (this.Registration != null)
            {
                throw new RuntimeException("Event processed twice!");
            }

            this.Registration = new Registration(@event.RegistrationNumber);
        }
コード例 #2
0
ファイル: Vehicle.cs プロジェクト: asd1355215911/dddlib
        private void Handle(NewVehicle @event)
        {
            if (this.Registration != null)
            {
                throw new RuntimeException("Event processed twice!");
            }

            this.Registration = new Registration(@event.RegistrationNumber);
        }