3 // Copyright (c) Microsoft Corporation. All rights reserved.
7 namespace System.Runtime.Serialization.Formatters.Binary
10 using System.Collections;
11 using System.Runtime.Remoting.Messaging;
12 using System.Reflection;
16 internal sealed class BinaryMethodCallMessage
18 #pragma warning disable 414
19 Object[] _inargs = null;
20 #pragma warning restore
21 String _methodName = null;
22 String _typeName = null;
23 Object _methodSignature = null;
25 Type[] _instArgs = null;
26 Object[] _args = null;
27 [System.Security.SecurityCritical] // auto-generated
28 LogicalCallContext _logicalCallContext = null;
30 Object[] _properties = null;
32 [System.Security.SecurityCritical] // auto-generated
33 internal BinaryMethodCallMessage(String uri, String methodName, String typeName, Type[] instArgs, Object[] args, Object methodSignature, LogicalCallContext callContext, Object[] properties)
35 _methodName = methodName;
44 _methodSignature = methodSignature;
45 if (callContext == null)
46 _logicalCallContext = new LogicalCallContext();
48 _logicalCallContext = callContext;
50 _properties = properties;
54 public String MethodName
56 get {return _methodName;}
59 public String TypeName
61 get {return _typeName;}
65 public Type[] InstantiationArgs
67 get {return _instArgs;}
70 public Object MethodSignature
72 get {return _methodSignature;}
80 public LogicalCallContext LogicalCallContext
82 [System.Security.SecurityCritical] // auto-generated
83 get {return _logicalCallContext;}
86 public bool HasProperties
88 get {return (_properties != null);}
91 internal void PopulateMessageProperties(IDictionary dict)
93 foreach (DictionaryEntry de in _properties)
95 dict[de.Key] = de.Value;
103 internal class BinaryMethodReturnMessage
105 #pragma warning disable 414
106 Object[] _outargs = null;
107 #pragma warning restore
108 Exception _exception = null;
109 Object _returnValue = null;
111 Object[] _args = null;
112 [System.Security.SecurityCritical] // auto-generated
113 LogicalCallContext _logicalCallContext = null;
115 Object[] _properties = null;
117 [System.Security.SecurityCritical] // auto-generated
118 internal BinaryMethodReturnMessage(Object returnValue, Object[] args, Exception e, LogicalCallContext callContext, Object[] properties)
120 _returnValue = returnValue;
122 args = new Object[0];
128 if (callContext == null)
129 _logicalCallContext = new LogicalCallContext();
131 _logicalCallContext = callContext;
133 _properties = properties;
136 public Exception Exception
138 get {return _exception;}
141 public Object ReturnValue
143 get {return _returnValue;}
151 public LogicalCallContext LogicalCallContext
153 [System.Security.SecurityCritical] // auto-generated
154 get {return _logicalCallContext;}
157 public bool HasProperties
159 get {return (_properties != null);}
162 internal void PopulateMessageProperties(IDictionary dict)
164 foreach (DictionaryEntry de in _properties)
166 dict[de.Key] = de.Value;
171 #endif // FEATURE_REMOTING