// (C) Patrik Torstensson
//
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
using System;
using System.Collections;
using System.IO;
CADObjRef objref = arg as CADObjRef;
if (null != objref) {
- string typeName = new string (objref.TypeName.ToCharArray());
- string uri = new string (objref.URI.ToCharArray());
+ string typeName = string.Copy (objref.TypeName);
+ string uri = string.Copy (objref.URI);
int domid = objref.SourceDomain;
ChannelInfo cinfo = new ChannelInfo (new CrossAppDomainData (domid));
case TypeCode.UInt16: return (UInt16)arg;
case TypeCode.UInt32: return (UInt32)arg;
case TypeCode.UInt64: return (UInt64)arg;
- case TypeCode.String: return new String (((string)arg).ToCharArray());
+ case TypeCode.String: return string.Copy ((string) arg);
case TypeCode.DateTime: return new DateTime (((DateTime)arg).Ticks);
default:
if (arg is TimeSpan) return new TimeSpan (((TimeSpan)arg).Ticks);
// Used when passing a IMethodCallMessage between appdomains
internal class CADMethodCallMessage : CADMessageBase {
string _uri;
- string _methodName;
- string _typeName;
-
- CADArgHolder _methodSignature;
-
- internal string TypeName {
- get {
- return _typeName;
- }
- }
-
+
+ internal RuntimeMethodHandle MethodHandle;
+
internal string Uri {
get {
return _uri;
}
}
- internal string MethodName {
- get {
- return _methodName;
- }
- }
-
static internal CADMethodCallMessage Create (IMessage callMsg) {
IMethodCallMessage msg = callMsg as IMethodCallMessage;
if (null == msg)
}
internal CADMethodCallMessage (IMethodCallMessage callMsg) {
- _methodName = callMsg.MethodName;
- _typeName = callMsg.TypeName;
_uri = callMsg.Uri;
+ MethodHandle = callMsg.MethodBase.MethodHandle;
ArrayList serializeList = null;
_args = MarshalArguments ( callMsg.Args, ref serializeList);
- // check if we need to save method signature
- if (RemotingServices.IsMethodOverloaded (callMsg)) {
- if (null == serializeList)
- serializeList = new ArrayList();
-
- _methodSignature = new CADArgHolder (serializeList.Count);
- serializeList.Add(callMsg.MethodSignature);
- }
-
// Save callcontext
SaveLogicalCallContext (callMsg, ref serializeList);
internal object [] GetArgs (ArrayList args) {
return UnmarshalArguments (_args, args);
}
-
- internal object [] GetMethodSignature (ArrayList args) {
- if (null == _methodSignature)
- return null;
-
- return (object []) args [_methodSignature.index];
- }
internal int PropertiesCount {
get {