/// <summary> /// Compare with another input. /// </summary> /// <param name="input"></param> /// <returns></returns> public bool Compare(InputData input) { if (input.Inputs.Count != Inputs.Count) { return(false); } for (int i = 0; i < Inputs.Count; i++) { InputTypeBase data = Inputs[i]; InputTypeBase other = input.Inputs[i]; if (data.GetType() != other.GetType()) { return(false); } if (!data.Compare(other)) { return(false); } } return(true); }
/// <summary> /// Retrieves the expected input types based on the <see cref="Build(InputData)"/> function. /// </summary> /// <returns></returns> private Type[] GetExpectedInputTypes() { if (m_ExpectedTypes != null) { return(m_ExpectedTypes); } InputData temp = new InputData(); Build(temp); m_ExpectedTypes = new Type[temp.Inputs.Count]; for (int i = 0; i < temp.Inputs.Count; i++) { InputTypeBase tempData = temp.Inputs[i]; m_ExpectedTypes[i] = tempData.GetType(); } return(m_ExpectedTypes); }