Skip to content

Commit

Permalink
Changed args and result to ref
Browse files Browse the repository at this point in the history
  • Loading branch information
andot committed Dec 1, 2016
1 parent cfb7d08 commit 89122e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Hprose/Server/HproseService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* *
* hprose service class for C#. *
* *
* LastModified: Jan 23, 2016 *
* LastModified: Dec 1, 2016 *
* Author: Ma Bingyao <[email protected]> *
* *
\**********************************************************/
Expand Down Expand Up @@ -609,7 +609,7 @@ protected MemoryStream DoInvoke(MemoryStream istream, HproseMethods methods, Hpr
arguments = new object[0];
}
if (OnBeforeInvoke != null) {
OnBeforeInvoke(name, arguments, byRef, context);
OnBeforeInvoke(name, ref arguments, byRef, context);
}
if (remoteMethod == null) {
args = arguments;
Expand Down Expand Up @@ -637,7 +637,7 @@ protected MemoryStream DoInvoke(MemoryStream istream, HproseMethods methods, Hpr
Array.Copy(args, 0, arguments, 0, count);
}
if (OnAfterInvoke != null) {
OnAfterInvoke(name, arguments, byRef, result, context);
OnAfterInvoke(name, ref arguments, byRef, ref result, context);
}
if (remoteMethod.mode == HproseResultMode.RawWithEndTag) {
data.Write((byte[])result, 0, ((byte[])result).Length);
Expand Down
6 changes: 3 additions & 3 deletions src/Hprose/Server/HproseServiceEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* *
* hprose service event for C#. *
* *
* LastModified: May 30, 2015 *
* LastModified: Dec 1, 2016 *
* Author: Ma Bingyao <[email protected]> *
* *
\**********************************************************/
Expand All @@ -21,8 +21,8 @@
using Hprose.Common;

namespace Hprose.Server {
public delegate void BeforeInvokeEvent(string name, object[] args, bool byRef, HproseContext context);
public delegate void AfterInvokeEvent(string name, object[] args, bool byRef, object result, HproseContext context);
public delegate void BeforeInvokeEvent(string name, ref object[] args, bool byRef, HproseContext context);
public delegate void AfterInvokeEvent(string name, ref object[] args, bool byRef, ref object result, HproseContext context);
public delegate void SendHeaderEvent(HproseContext context);
public delegate void SendErrorEvent(Exception e, HproseContext context);
}
Expand Down

0 comments on commit 89122e5

Please sign in to comment.