protected override void EndInvokeBinding() { this.cg.cs.AppendLine("var val = NewBridgeClassObject(ctx, new_target, o, magic, {0});", CodeGenUtils.ToLiteral(this.disposable)); }
// 写入默认构造函数 (struct 无参构造) private void WriteDefaultConstructorBinding() { var decalringTypeName = this.cg.bindingManager.GetCSTypeFullName(this.methodBindingInfo.decalringType); this.cg.cs.AppendLine("var o = new {0}();", decalringTypeName); this.cg.cs.AppendLine("var val = NewBridgeClassObject(ctx, new_target, o, magic, {0});", CodeGenUtils.ToLiteral(this.disposable)); this.cg.cs.AppendLine("return val;"); this.cg.tsDeclare.AppendLine($"{this.methodBindingInfo.jsName}()"); }