/*************************************/ public virtual bool RemoveInput(string name) { if (name == null) { return(false); } ParamInfo match = InputParams.Find(x => x.Name == name); if (match != null) { match.IsSelected = false; } return(true); }
/*************************************/ /**** Input Methods ****/ /*************************************/ public virtual bool AddInput(int index, string name, Type type = null) { if (name == null || index < 0) { return(false); } ParamInfo match = InputParams.Find(x => x.Name == name); if (match != null) { match.IsSelected = true; } else { ParamInfo param = Engine.UI.Create.ParamInfo(name, type); InputParams.Insert(index, param); m_CompiledGetters.Insert(index, Engine.UI.Create.InputAccessor(m_DataAccessor.GetType(), param.DataType)); } return(true); }
/*************************************/ public virtual bool CanRemoveInput(string name) { ParamInfo match = InputParams.Find(x => x.Name == name); return(match != null && !match.IsRequired); }