예제 #1
0
        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;
        }
예제 #2
0
//        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());
        }