using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using RealTimeGraphX.EventArguments; namespace RealTimeGraphX { /// /// Represents an base class. /// /// The type of the out. /// /// public abstract class GraphOutputComponentBase : GraphObject, IGraphOutputComponent where TOut : IGraphComponent { /// /// Occurs when the property has changed. /// public event EventHandler> OutputChanged; private TOut _output; /// /// Gets the connected output . /// public TOut Output { get { return _output; } set { _output = value; RaisePropertyChangedAuto(); OnOutputChanged(_output); } } /// /// Raises the event. /// /// The output. protected virtual void OnOutputChanged(TOut output) { OutputChanged?.Invoke(this, new OutputChangedEventArgs(output)); } /// /// Connects this component to another . /// /// The output component. /// Specifies whether this call was made from a component. public abstract void ConnectOutput(TOut output, bool fromOutput = false); /// /// Disconnects this component from the connected . /// /// Specifies whether this call was made from a component. public abstract void DisconnectOutput(bool fromOutput = false); } }