public override string RemoteProcedureCallArgument(string var) { return(CSharp.Escape(var)); }
public override string PublicCallParameter(string var) { return("out IntPtr " + CSharp.Escape(var)); }
public override string PublicWrapExpression(string var) { return(string.Format("0 != {0}", CSharp.Escape(var))); }
public override string ProxyUnwrapExpression(string var) { return(string.Format("({0})RemoteProxy.Unwrap({1})", Struct.ClassName, CSharp.Escape(var))); }
public override string RemoteUnwrapExpression(string var) { return(string.Format("CfrObject.Unwrap({0})", CSharp.Escape(var))); }
public void EmitRemoteRead(CodeBuilder b) { ArgumentType.EmitRemoteRead(b, CSharp.Escape(ProxyVarName)); }
public override void EmitRemoteEventArgGetterStatements(CodeBuilder b, string var) { b.AppendLine("return 0 != call.{0};", CSharp.Escape(var)); }
public virtual void EmitPostRemoteCallStatements(CodeBuilder b, string var) { if (IsOut) { b.AppendLine("{0} = {1};", var, RemoteWrapExpression("call." + (var == "this" ? "self" : CSharp.Escape(var)))); } }
public virtual void EmitRemoteEventArgGetterStatements(CodeBuilder b, string var) { b.AppendLine("return {0};", RemoteWrapExpression("call." + CSharp.Escape(var))); }
public virtual string PublicEventConstructorArgument(string var) { return(CSharp.Escape(var)); }
public virtual void EmitPreRemoteCallStatements(CodeBuilder b, string var) { b.AppendLine("call.{0} = {0};", CSharp.Escape(var)); }
public virtual string ProxyUnwrapExpression(string var) { return(CSharp.Escape(var)); }
public virtual string PInvokeOutArgument(string var) { return("out " + CSharp.Escape(var)); }
public override string RemoteUnwrapExpression(string var) { return(string.Format("(UIntPtr){0}", CSharp.Escape(var))); }
public void EmitRemoteRead(CodeBuilder b) { ParameterType.EmitRemoteRead(b, CSharp.Escape(PublicVarName)); }
public virtual void EmitRemoteEventArgSetterStatements(CodeBuilder b, string var) { b.AppendLine("call.{0} = {1};", CSharp.Escape(var), RemoteUnwrapExpression("value")); }
public virtual void EmitRemoteCallFields(CodeBuilder b) { ArgumentType.EmitRemoteCallFields(b, CSharp.Escape(ProxyVarName)); }
public virtual void EmitValueStructGetterVars(CodeBuilder b, string var) { b.AppendLine("{0} {1};", PInvokeSymbol, CSharp.Escape(var)); }
public override void EmitRemotePreCallStatements(CodeBuilder b, string var) { b.AppendLine("if(!CfrObject.CheckConnection({0}, connection)) throw new ArgumentException(\"Render process connection mismatch.\", \"{1}\");", CSharp.Escape(var), var); b.AppendLine("call.{0} = CfrBaseRefCounted.Unwrap({0}).ptr;", CSharp.Escape(var)); }
public override void EmitPrePublicCallStatements(CodeBuilder b, string var) { b.AppendLine("var {0}_pinned = new PinnedString({1});", var, CSharp.Escape(var)); }
public override string PublicUnwrapExpression(string var) { return(string.Format("{0}.Unwrap({1})", Struct.ClassName, CSharp.Escape(var))); }
public override void EmitPostRemoteRaiseEventStatements(CodeBuilder b, string var) { b.AppendLine("{0} = e.m_{1}_wrapped;", CSharp.Escape(var), var); }
public override string ProxyWrapExpression(string var) { return(string.Format("RemoteProxy.Wrap({0})", CSharp.Escape(var))); }
public override string[] RemoteCallbackParameterList(string var) { return(new string[] { "out string " + CSharp.Escape(var) }); }
public override void EmitPreRemoteCallStatements(CodeBuilder b, string var) { b.AppendLine("call.{0} = {0}.ptr;", CSharp.Escape(var)); }
public override void EmitRemotePreCallStatements(CodeBuilder b, string var) { switch (RemoteSymbol) { case "RemotePtr": b.AppendLine("if({0}.connection != connection) throw new ArgumentException(\"Render process connection mismatch.\", \"{1}\");", CSharp.Escape(var), var); b.AppendLine("call.{0} = {0}.ptr;", CSharp.Escape(var)); return; default: base.EmitRemotePreCallStatements(b, var); return; } }
public override string PublicCallArgument(string var) { return("out " + CSharp.Escape(var)); }
public virtual void EmitRemoteCallFields(CodeBuilder b) { ParameterType.EmitRemoteCallFields(b, CSharp.Escape(PublicVarName)); }
public override string PublicUnwrapExpression(string var) { return(string.Format("{0} ? 1 : 0", CSharp.Escape(var))); }
public override void EmitRemoteEventArgGetterStatements(CodeBuilder b, string var) { b.AppendLine("if(m_{0}_wrapped == null) m_{0}_wrapped = {1}.Wrap(new RemotePtr(connection, call.{2}));", var, Struct.RemoteClassName, CSharp.Escape(var)); b.AppendLine("return m_{0}_wrapped;", var); }