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