Ejemplo n.º 1
0
        protected virtual void RaiseChangesCanceled(T entity)
        {
            ChangesCanceledEventArgs <T> args = null;
            var genericHandler = ChangesCanceled;

            if (genericHandler != null)
            {
                args = new ChangesCanceledEventArgs <T>(entity);
                genericHandler(this, args);
            }
            _changesCanceledNonGeneric?.Invoke(this, args ?? new ChangesCanceledEventArgs <T>(entity));
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Raises the <c>ChangesCanceled</c> event
        /// </summary>
        protected void RaiseChangesCanceled(T entity)
        {
            ChangesCanceledEventArgs <T> args = null;
            var genericHandler = ChangesCanceled;

            if (genericHandler != null)
            {
                args = new ChangesCanceledEventArgs <T>(entity);
                genericHandler(this, args);
            }
            var handler = _changesCanceledNonGeneric;

            if (handler != null)
            {
                handler(this, args ?? new ChangesCanceledEventArgs <T>(entity));
            }
        }