public void SetRightSide(IHasOutput rightSide) { if (_rightSide != null) { // ToDO: create custom error throw new ArgumentException("Cannot set right side multiple times"); } if (_rightSideType != rightSide.OutputType()) { // TODO: use custom error instead of this throw new ArgumentException("Incompatible output types"); } _rightSide = rightSide; }
// protected abstract void Initialize(IHasOutput value); // // public override void Instantiate(params dynamic[] input) // { // OneArgumentCheck(typeof(IHasOutput), input); // // Value = input[0]; // Initialize(Value); // } public EType OutputType() { return(Value.OutputType()); }