public void Apply(StapledSecurityListedEvent @event) { Version++; Start(@event.ListingDate); var properties = new StockProperties(@event.AsxCode, @event.Name, @event.Category); _Properties.Change(@event.ListingDate, properties); _ChildSecurities = new StapledSecurityChild[@event.ChildSecurities.Length]; for (var i = 0; i < @event.ChildSecurities.Length; i++) { _ChildSecurities[i] = new StapledSecurityChild(@event.ChildSecurities[i].AsxCode, @event.ChildSecurities[i].Name, @event.ChildSecurities[i].Trust); } var dividendRules = new DividendRules(0.30m, RoundingRule.Round, false, DrpMethod.Round); _DividendRules.Change(@event.ListingDate, dividendRules); var percentages = new ApportionedCurrencyValue[_ChildSecurities.Length]; for (var i = 0; i < @event.ChildSecurities.Length; i++) { percentages[i].Units = 1; } MathUtils.ApportionAmount(1.00m, percentages); _RelativeNTAs.Change(@event.ListingDate, new RelativeNTA(percentages.Select(x => x.Amount).ToArray())); }
public void Apply(ChangeDividendRulesEvent @event) { Version++; var newProperties = new DividendRules( @event.CompanyTaxRate, @event.DividendRoundingRule, @event.DrpActive, @event.DrpMethod); _DividendRules.Change(@event.ChangeDate, newProperties); }
public void Apply(StockListedEvent @event) { Version++; Trust = @event.Trust; Start(@event.ListingDate); var properties = new StockProperties(@event.AsxCode, @event.Name, @event.Category); _Properties.Change(@event.ListingDate, properties); var dividendRules = new DividendRules(0.30m, RoundingRule.Round, false, DrpMethod.Round); _DividendRules.Change(@event.ListingDate, dividendRules); }