X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FSystem.Runtime.Remoting.Messaging%2FReturnMessage.cs;h=aee39f5bb81103129491a363a4e1641fd44a3d56;hb=7c970f8ee1f635da8575bcf58d89c16bb5c2ace1;hp=2b75559217385953215298fad26d4a8dbad2013a;hpb=699e59742843044f6efa1726b7cb64f19d909e64;p=mono.git diff --git a/mcs/class/corlib/System.Runtime.Remoting.Messaging/ReturnMessage.cs b/mcs/class/corlib/System.Runtime.Remoting.Messaging/ReturnMessage.cs index 2b755592173..aee39f5bb81 100644 --- a/mcs/class/corlib/System.Runtime.Remoting.Messaging/ReturnMessage.cs +++ b/mcs/class/corlib/System.Runtime.Remoting.Messaging/ReturnMessage.cs @@ -37,6 +37,9 @@ using System.IO; namespace System.Runtime.Remoting.Messaging { +#if NET_2_0 + [System.Runtime.InteropServices.ComVisible (true)] +#endif public class ReturnMessage : IMethodReturnMessage, IMethodMessage, IMessage, IInternalMessage { object[] _outArgs; @@ -64,8 +67,10 @@ namespace System.Runtime.Remoting.Messaging _args = outArgs; _outArgsCount = outArgCount; _callCtx = callCtx; - _uri = request.Uri; - _methodBase = request.MethodBase; + if (request != null) { + _uri = request.Uri; + _methodBase = request.MethodBase; + } if (_args == null) _args = new object [outArgCount]; } @@ -73,8 +78,10 @@ namespace System.Runtime.Remoting.Messaging { _exception = exc; - if (request != null) + if (request != null) { _methodBase = request.MethodBase; + _callCtx = request.LogicalCallContext; + } _args = new object[0]; // .NET does this } @@ -92,12 +99,15 @@ namespace System.Runtime.Remoting.Messaging public bool HasVarArgs { get { - return (MethodBase.CallingConvention | CallingConventions.VarArgs) != 0; + if (_methodBase == null) return false; + else return (_methodBase.CallingConvention | CallingConventions.VarArgs) != 0; } } public LogicalCallContext LogicalCallContext { get { + if (_callCtx == null) + _callCtx = new LogicalCallContext (); return _callCtx; } } @@ -156,6 +166,11 @@ namespace System.Runtime.Remoting.Messaging } } + string IInternalMessage.Uri { + get { return Uri; } + set { Uri = value; } + } + public object GetArg (int arg_num) { return _args [arg_num]; @@ -214,6 +229,7 @@ namespace System.Runtime.Remoting.Messaging set { _targetIdentity = value; } } +#if !NET_2_0 public override string ToString () { string s = TypeName.Split(',')[0] + "." + MethodName + " ("; @@ -235,5 +251,6 @@ namespace System.Runtime.Remoting.Messaging } return s; } +#endif } }