Example #1
0
        protected override void Prepare()
        {
            var outputPin = FOutputContainer.GetPluginIO() as IPin;
            var subType   = outputPin.GetDownstreamSubType();

            if (subType != FLastSubType)
            {
                FLastSubType = subType;
                (outputPin as IEnumOut).SetSubType(subType);
                (FInputContainer.GetPluginIO() as IEnumIn).SetSubType(subType);
            }
        }
Example #2
0
        public override void Evaluate(int spreadMax)
        {
            var outputPin = FOutputContainer.GetPluginIO() as IPin;
            var subType   = outputPin.GetDownstreamSubType();

            if (subType != FLastSubType)
            {
                FLastSubType = subType;
                (outputPin as IEnumOut).SetSubType(subType);
                (FSpreadContainer.GetPluginIO() as IEnumIn).SetSubType(subType);
                (FInputContainer.GetPluginIO() as IEnumIn).SetSubType(subType);
            }
            base.Evaluate(spreadMax);
        }
Example #3
0
        protected override bool Prepare()
        {
            var outputPin = FOutputContainer.GetPluginIO() as IPin;
            var subType   = outputPin.GetDownstreamSubType();

            if (subType != FLastSubType)
            {
                FLastSubType = subType;
                (outputPin as IEnumOut).SetSubType(subType);
                foreach (var inputPin in FInputContainer.GetPluginIOs().OfType <IEnumIn>())
                {
                    inputPin.SetSubType(subType);
                }
                return(true);
            }
            return(base.Prepare());
        }
Example #4
0
        protected override void Prepare()
        {
            string subType = null;

            foreach (var output in FOutputContainer.GetPluginIOs().OfType <IPin>())
            {
                subType = output.GetDownstreamSubType();
                if (subType != null)
                {
                    break;
                }
            }
            if (subType != FLastSubType)
            {
                FLastSubType = subType;
                foreach (var outputPin in FOutputContainer.GetPluginIOs().OfType <IEnumIn>())
                {
                    outputPin.SetSubType(subType);
                }
                (FInputContainer.GetPluginIO() as IEnumIn).SetSubType(subType);
            }
        }