public static DfirRoot CreateFunctionFromSignature(this NIType functionSignature, CompilableDefinitionName functionDefinitionName) { DfirRoot function = DfirRoot.Create(new CompileSpecification(functionDefinitionName, null)); int connectorPaneIndex = 0; foreach (NIType parameter in functionSignature.GetParameters()) { function.CreateDataItem( parameter.GetName(), parameter.GetDataType(), null, // defaultValue parameter.GetInputParameterPassingRule(), parameter.GetOutputParameterPassingRule(), connectorPaneIndex++); } return(function); }