public override void EmitPreProxyCallStatements(CodeBuilder b, string var)
 {
     b.AppendLine("{0}[] {1}_unwrapped;", Struct.ClassName, var);
     b.BeginIf("{0} != null", var);
     b.AppendLine("{0}_unwrapped = new {1}[{0}.Length];", var, Struct.ClassName);
     b.BeginBlock("for(int i = 0; i < {0}.Length; ++i)", var);
     b.AppendLine("{0}_unwrapped[i] = {1};", var, StructPtr.ProxyUnwrapExpression(var + "[i]"));
     b.EndBlock();
     b.BeginElse();
     b.AppendLine("{0}_unwrapped = null;", var);
     b.EndBlock();
 }
Esempio n. 2
0
 public override void EmitProxyEventArgSetter(CodeBuilder b, string var)
 {
     b.AppendLine("e.{0} = {1};", var, StructPtr.ProxyUnwrapExpression("value"));
 }