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); } }
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); }
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()); }