If this option is enabled, the engine scripts a BDL function for each call to a .NET method. The transaction calls the generated function. This makes the transactions shorter and easy to read. Input parameters to the .NET method become input parameters for the BDL function. If the .NET method returns a value, the value will be the return value of the function.
C# Code | BDL Script |
---|---|
[Transaction(Etranstype.TRANSTYPE_MAIN)] public void TMain() { } [TestMethod] public string Test1(int nParam) { } |
dclfunc function Vuser_Tmain(hObject:number) begin DotNetCallMethod(hObject, "TMain"); end; function Vuser_Test1(hObject:number;nParam:number): string; var sReturn : string; begin DotNetSetInt(hObject, nParam); DotNetCallMethod(hObject, "TMain"); DotNetGetString(hObject, sReturn, sizeof(sReturn)); Vuser_Test1 := sReturn; end; dcltrans transaction Tmain var sReturn : string; begin Vuser_Tmain(hVuser); SReturn := Vuser_Test1(hVuser, "stringparam"); end; |