public LineExpenseChanged(Guid id, DateTime timestamp, LineId lineId, BudgetId budgetId, UserId updatedBy, Expense expense) { Id = id; Timestamp = timestamp; LineId = lineId; BudgetId = budgetId; UpdatedBy = updatedBy; Expense = expense; }
public LineCreated(Guid id, DateTime timestamp, LineId lineId, BudgetId budgetId, UserId createdBy, Expense expense) { Id = id; Timestamp = timestamp; LineId = lineId; BudgetId = budgetId; Expense = expense; CreatedBy = createdBy; }
public LineMarkedObsolete(Guid id, DateTime timestamp, LineId lineId, BudgetId budget, UserId userId, LineId obsoletedFor) { Id = id; Timestamp = timestamp; LineId = lineId; BudgetId = budget; UserId = userId; ObsoletedFor = obsoletedFor; }
public void MarkObsolete(UserId userId, LineId obsoletedFor) { if (string.IsNullOrEmpty(Id) == false) throw new Exception("line does not exists"); RaiseEvent(new LineMarkedObsolete(Guid.NewGuid(), DateTime.Now, _state.GetLineId(), _state.GetBudgetId(), userId, obsoletedFor)); }
public void Create(LineId id, BudgetId budgetId, Expense expense, UserId createdBy) { if (string.IsNullOrEmpty(Id) == false) throw new Exception("line already exists"); RaiseEvent(new LineCreated(Guid.NewGuid(), DateTime.Now, id, budgetId, createdBy, expense)); }