Esempio n. 1
0
        public void UnSubscribe(Guid unSubscribeFromId)
        {
            var subscribe = new UserSubscribe(unSubscribeFromId);

            if (_subscribes.Contains(subscribe))
            {
                _subscribes.Remove(subscribe);
                AddDomainEvent(new UserUnSubscribedDomainEvent(this.Id, subscribe));
            }
        }
Esempio n. 2
0
        public void Subscribe(Guid subscribeToId)
        {
            var subscribe = new UserSubscribe(subscribeToId);

            if (!_subscribes.Contains(subscribe))
            {
                _subscribes.Add(subscribe);
                AddDomainEvent(new UserSubscribedDomainEvent(this.Id, subscribe));
            }
        }