Ejemplo n.º 1
0
    public override void Add(string item)
    {
        this.Collection.Insert(0, item);
        int addIndex = 0;

        CollectionAdded.Append($"{addIndex} ");
    }
Ejemplo n.º 2
0
 void OnCollectionAdded(Collection collection)
 {
     CollectionAdded?.Invoke(collection);
     if (tickergenerator.CollectionCount == 1)
     {
         context.GetModule <TickerModule>().AddSource(tickergenerator);
     }
 }
Ejemplo n.º 3
0
        public async Task <SavingsTransaction> CreateSavingsTransactionWhen(CollectionAdded notification)
        {
            var isSavingsAccount =
                await _savingsAccountRepository.IsSavingsAccount(notification.FromIban);

            if (isSavingsAccount)
            {
                var savingsTransaction = _savingsTransactionFactory.CreateFrom(SavingsTransactionType.Collection, -notification.Value, notification.IncomeDate, notification.FromIban, notification.Details, notification.CollectionId);
                return(savingsTransaction);
            }

            return(null);
        }
Ejemplo n.º 4
0
        public async Task <Income> CreateIncomeWhen(CollectionAdded notification)
        {
            var isSavingsAccount =
                await _savingsAccountRepository.IsSavingsAccount(notification.FromIban);

            if (isSavingsAccount)
            {
                return(null);
            }

            var income = _incomeFactory.CreateFrom(IncomeType.Collection, notification.Value, notification.IncomeDate, notification.From, notification.FromIban, notification.Details, notification.CollectionId);

            return(income);
        }
Ejemplo n.º 5
0
 internal virtual void RaiseCollectionAdded(LocalizationTableCollection collection) => CollectionAdded?.Invoke(collection);