예제 #1
0
        public void FireBeforeFavourite(object sender, FavouriteEventArgs eventArgs)
        {
            var handler = BeforeFavourite;

            if (handler != null)
            {
                handler(this, eventArgs);
            }
        }
예제 #2
0
        public Favourite Add(Favourite favourite)
        {
            var e = new FavouriteEventArgs { Favourite = favourite };
            EventManager.Instance.FireBeforeFavourite(this, e);

            if (!e.Cancel)
            {
                favourite = _favouriteRepository.Add(favourite);

                EventManager.Instance.FireAfterFavourite(this, new FavouriteEventArgs { Favourite = favourite});
            }

            return favourite;
        }
예제 #3
0
        public void FireBeforeFavourite(object sender, FavouriteEventArgs eventArgs)
        {
            var handler = BeforeFavourite;

            if (handler != null)
            {
                handler(this, eventArgs);
            }
        }