Exemple #1
0
        /// <summary>
        /// 离开港口
        /// </summary>
        /// <param name="port">港口</param>
        public void DepartedAt(string port)
        {
            Assert.NotNullOrEmpty(nameof(port), port);

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

            Apply(e);
        }
Exemple #2
0
 public void OnDomainEvent(ShipDeparted e)
 {
     Name     = e.Ship;
     Location = e.Port;
 }