using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tango.BL
{
/// <summary>
/// Represents an observable modified event arguments.
/// </summary>
/// <seealso cref="System.EventArgs" />
public class ObservableModifiedEventArgs : EventArgs
{
/// <summary>
/// Gets or sets the modified entity context.
/// </summary>
public ObservablesContext Context { get; set; }
/// <summary>
/// Gets or sets the modified entity.
/// </summary>
public IObservableEntity ModifiedEntity { get; set; }
/// <summary>
/// Gets or sets the notified entity.
/// </summary>
public IObservableEntity NotifiedEntity { get; set; }
/// <summary>
/// Gets a value indicating whether the modified entity is not the notified entity.
/// </summary>
public bool IsOtherContext
{
get { return ModifiedEntity != NotifiedEntity; }
}
/// <summary>
/// Initializes a new instance of the <see cref="ObservableModifiedEventArgs"/> class.
/// </summary>
/// <param name="context">The context.</param>
/// <param name="source">The source.</param>
/// <param name="target">The target.</param>
public ObservableModifiedEventArgs(ObservablesContext context, IObservableEntity source, IObservableEntity target)
{
Context = context;
ModifiedEntity = source;
NotifiedEntity = target;
}
}
}