d0769cef0f
Changed the base CancellableObjectEventArgs to have a protected property so inheritors can just expose the 'T' object as their own better name.
35 lines
800 B
C#
35 lines
800 B
C#
namespace Umbraco.Core.Events
|
|
{
|
|
public class CopyEventArgs<TEntity> : CancellableObjectEventArgs<TEntity>
|
|
{
|
|
public CopyEventArgs(TEntity original, TEntity copy, bool canCancel, int parentId) : base(original, canCancel)
|
|
{
|
|
Copy = copy;
|
|
ParentId = parentId;
|
|
}
|
|
|
|
public CopyEventArgs(TEntity eventObject, TEntity copy, int parentId) : base(eventObject)
|
|
{
|
|
Copy = copy;
|
|
ParentId = parentId;
|
|
}
|
|
|
|
/// <summary>
|
|
/// The copied entity
|
|
/// </summary>
|
|
public TEntity Copy { get; set; }
|
|
|
|
/// <summary>
|
|
/// The original entity
|
|
/// </summary>
|
|
public TEntity Original
|
|
{
|
|
get { return EventObject; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or Sets the Id of the objects new parent.
|
|
/// </summary>
|
|
public int ParentId { get; private set; }
|
|
}
|
|
} |