//void ReturnCustom_AddParam(CustomMethodInfo.FunctionParam funcParam) public async Task OnAddedOutParam(CodeDomNode.CustomMethodInfo.FunctionParam funcParam) { await EngineNS.Thread.AsyncDummyClass.DummyFunc(); var csParam = CSParam as ReturnCustomConstructParam; MethodParamInfoAssist retValue; if (funcParam.ParamType.Type.IsByRef) { var typefullname = funcParam.ParamType.Type.FullName.Substring(0, funcParam.ParamType.Type.FullName.Length - 1); var type = funcParam.ParamType.Type.Assembly.GetType(typefullname); //funcParam.ParamType = new VariableType(type, funcParam.ParamType.CSType); retValue = new MethodParamInfoAssist(); retValue.FieldDirection = System.CodeDom.FieldDirection.Out; retValue.IsParamsArray = false; retValue.ParameterType = type; retValue.ParamName = funcParam.ParamName; BindingOperations.SetBinding(this, CodeDomNode.CustomMethodInfo.FunctionParam.ParamNameProperty, new Binding("ParamName") { Source = retValue, Mode = BindingMode.TwoWay }); } else { retValue = funcParam.CreateParamInfoAssist(System.CodeDom.FieldDirection.Out); } var pm = new MethodInvokeParameterControl.MethodInvokeParameterConstructionParams() { CSType = CSParam.CSType, HostNodesContainer = CSParam.HostNodesContainer, ConstructParam = "", ConstructType = MethodInvokeNode.enParamConstructType.ReturnCustom, ParamInfo = retValue, }; var pc = new MethodInvokeParameterControl(pm); funcParam.OnParamTypeChanged -= pc.UpdateParamType; funcParam.OnParamTypeChanged += pc.UpdateParamType; pc.OnUpdateParamTypeAction = OnUpdateChildParamType; AddChildNode(pc, mParamsPanel); }
public async Task OnInsertOutParam(int index, CodeDomNode.CustomMethodInfo.FunctionParam funcParam) { await EngineNS.Thread.AsyncDummyClass.DummyFunc(); var csParam = CSParam as ReturnCustomConstructParam; var pm = new MethodInvokeParameterControl.MethodInvokeParameterConstructionParams() { CSType = CSParam.CSType, HostNodesContainer = CSParam.HostNodesContainer, ConstructParam = "", ConstructType = MethodInvokeNode.enParamConstructType.ReturnCustom, ParamInfo = funcParam.CreateParamInfoAssist(System.CodeDom.FieldDirection.Out), }; var pc = new MethodInvokeParameterControl(pm); funcParam.OnParamTypeChanged -= pc.UpdateParamType; funcParam.OnParamTypeChanged += pc.UpdateParamType; pc.OnUpdateParamTypeAction = OnUpdateChildParamType; InsertChildNode(index, pc, mParamsPanel); }