Exemple #1
0
        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()));
        }
Exemple #2
0
        public void Apply(StockPropertiesChangedEvent @event)
        {
            Version++;

            var newProperties = new StockProperties(
                @event.AsxCode,
                @event.Name,
                @event.Category);

            _Properties.Change(@event.ChangeDate, newProperties);
        }
Exemple #3
0
        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);
        }