Exemple #1
0
        public void Apply(ChangeDividendRulesEvent @event)
        {
            Version++;

            var newProperties = new DividendRules(
                @event.CompanyTaxRate,
                @event.DividendRoundingRule,
                @event.DrpActive,
                @event.DrpMethod);

            _DividendRules.Change(@event.ChangeDate, newProperties);
        }
Exemple #2
0
        public void ChangeDividendRules(Date changeDate, decimal companyTaxRate, RoundingRule newDividendRoundingRule, bool drpActive, DrpMethod newDrpMethod)
        {
            if (!IsEffectiveAt(changeDate))
            {
                throw new EffectiveDateException(String.Format("Stock not active at {0}", changeDate));
            }

            var properties = Properties[changeDate];

            var @event = new ChangeDividendRulesEvent(Id, Version, changeDate, companyTaxRate, newDividendRoundingRule, drpActive, newDrpMethod);

            Apply(@event);
            _Events.Add(@event);
        }