Example #1
0
        public void List(string asxCode, string name, Date date, bool trust, AssetCategory category)
        {
            if ((date <= Date.MinValue) || (date >= Date.MaxValue))
            {
                throw new ArgumentOutOfRangeException("Listing date is invalid");
            }


            var @event = new StockListedEvent(Id, Version, asxCode, name, date, category, trust);

            Apply(@event);

            PublishEvent(@event);
        }
Example #2
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);
        }