Skip to content

Instantly share code, notes, and snippets.

@cnsoft
Created January 14, 2014 01:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cnsoft/8411443 to your computer and use it in GitHub Desktop.
Save cnsoft/8411443 to your computer and use it in GitHub Desktop.
How to extend object[] args.
object[] _args = args;
if(methodName == "doEfxCast"){
//extend args with isReal
//invoke proxy to call rpc.
object[] args2 = new object[args.Length+1];
System.Array.Copy(args,0,args2,0,args.Length);
if (_rpchandler)
args2[args.Length]= true;//Owner _rpchandler.isRealClient;
else
args2[args.Length]= false;//Others this.infGetMaster().isRealClient;
//extend isRealClient or not.
_args = args2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment