Exemplo n.º 1
0
        /// <summary>
        /// 到达港口
        /// </summary>
        /// <param name="port">港口</param>
        public void ArrivedAt(string port)
        {
            Assert.NotNullOrEmpty(nameof(port), port);

            var e = new ShipArrived()
            {
                Ship = Name, Port = port
            };

            Apply(e);
        }
Exemplo n.º 2
0
 public void OnDomainEvent(ShipArrived e)
 {
     Name     = e.Ship;
     Location = e.Port;
 }