Exemple #1
0
 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;
 }
Exemple #2
0
        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;
        }
Exemple #3
0
 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;
 }
Exemple #4
0
        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));
        }
Exemple #5
0
        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));
        }