コード例 #1
0
    public void PlanMaintenanceJob(PlanMaintenanceJob command)
    {
        // check business rules
        command.PlannedMaintenanceJobShouldFallWithinOneBusinessDay();
        this.NumberOfParallelMaintenanceJobsMustNotExceedAvailableWorkStations(command);
        this.NumberOfParallelMaintenanceJobsOnAVehicleMustNotExceedOne(command);

        // handle event
        MaintenanceJobPlanned e = command.MapToMaintenanceJobPlanned();

        RaiseEvent(e);
    }
コード例 #2
0
        public void PlanMaintenanceJob(PlanMaintenanceJob command)
        {
            // check business rules
            command.PlannedMaintenanceJobShouldFallWithinOneBusinessDay();
            this.NumberOfParallelMaintenanceJobsMustNotExceedAvailableWorkStations(command);
            this.NumberOfParallelMaintenanceJobsOnAVehicleMustNotExceedOne(command);

            // handle event
            MaintenanceJobPlanned e = new MaintenanceJobPlanned(command.MessageId,
                                                                command.StartTime,
                                                                command.EndTime,
                                                                command.CustomerInfo,
                                                                command.VehicleInfo,
                                                                command.Description);

            RaiseEvent(e);
        }