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 in. /// public abstract class GraphInputComponentBase : GraphObject, IGraphInputComponent where TIn : IGraphComponent { /// /// Occurs when the property has changed. /// public event EventHandler> InputChanged; private TIn _input; /// /// Gets the connected input . /// public TIn Input { get { return _input; } private set { _input = value; RaisePropertyChangedAuto(); OnInputChanged(_input); } } /// /// Raises the event. /// /// The input. protected virtual void OnInputChanged(TIn input) { InputChanged?.Invoke(this, new InputChangedEventArgs(input)); } /// /// Connects the specified component output to this component input. /// /// The component. /// Specifies whether this call was made from a component. public abstract void ConnectInput(TIn component, bool fromInput = false); /// /// Disconnects this component input from the current connected . /// /// Specifies whether this call was made from a component. public abstract void DisconnectInput(bool fromInput = false); } }