using System; using System.Collections; using System.Reflection; using System.Runtime.InteropServices; namespace System.Runtime.Remoting.Messaging { /// Implements the interface to create a request message that acts as a method call on a remote object. // Token: 0x020003F6 RID: 1014 [ComVisible(true)] public class MethodCallMessageWrapper : InternalMessageWrapper, IMessage, IMethodCallMessage, IMethodMessage { /// Initializes a new instance of the class by wrapping an interface. /// A message that acts as an outgoing method call on a remote object. // Token: 0x06002769 RID: 10089 RVA: 0x00081608 File Offset: 0x0007F808 public MethodCallMessageWrapper(IMethodCallMessage msg) : base(msg) { this._args = ((IMethodCallMessage)this.WrappedMessage).Args; this._inArgInfo = new ArgInfo(msg.MethodBase, ArgInfoType.In); } /// Gets the number of arguments passed to the method. /// A that represents the number of arguments passed to a method. /// /// /// // Token: 0x17000786 RID: 1926 // (get) Token: 0x0600276A RID: 10090 RVA: 0x00081644 File Offset: 0x0007F844 public virtual int ArgCount { get { return ((IMethodCallMessage)this.WrappedMessage).ArgCount; } } /// Gets an array of arguments passed to the method. /// An array of type that represents the arguments passed to a method. /// /// /// // Token: 0x17000787 RID: 1927 // (get) Token: 0x0600276B RID: 10091 RVA: 0x00081658 File Offset: 0x0007F858 // (set) Token: 0x0600276C RID: 10092 RVA: 0x00081660 File Offset: 0x0007F860 public virtual object[] Args { get { return this._args; } set { this._args = value; } } /// Gets a value indicating whether the method can accept a variable number of arguments. /// true if the method can accept a variable number of arguments; otherwise, false. /// /// /// // Token: 0x17000788 RID: 1928 // (get) Token: 0x0600276D RID: 10093 RVA: 0x0008166C File Offset: 0x0007F86C public virtual bool HasVarArgs { get { return ((IMethodCallMessage)this.WrappedMessage).HasVarArgs; } } /// Gets the number of arguments in the method call that are not marked as out parameters. /// A that represents the number of arguments in the method call that are not marked as out parameters. /// /// /// // Token: 0x17000789 RID: 1929 // (get) Token: 0x0600276E RID: 10094 RVA: 0x00081680 File Offset: 0x0007F880 public virtual int InArgCount { get { return this._inArgInfo.GetInOutArgCount(); } } /// Gets an array of arguments in the method call that are not marked as out parameters. /// An array of type that represents arguments in the method call that are not marked as out parameters. /// /// /// // Token: 0x1700078A RID: 1930 // (get) Token: 0x0600276F RID: 10095 RVA: 0x00081690 File Offset: 0x0007F890 public virtual object[] InArgs { get { return this._inArgInfo.GetInOutArgs(this._args); } } /// Gets the for the current method call. /// The for the current method call. /// /// /// // Token: 0x1700078B RID: 1931 // (get) Token: 0x06002770 RID: 10096 RVA: 0x000816A4 File Offset: 0x0007F8A4 public virtual LogicalCallContext LogicalCallContext { get { return ((IMethodCallMessage)this.WrappedMessage).LogicalCallContext; } } /// Gets the of the called method. /// The of the called method. /// /// /// // Token: 0x1700078C RID: 1932 // (get) Token: 0x06002771 RID: 10097 RVA: 0x000816B8 File Offset: 0x0007F8B8 public virtual MethodBase MethodBase { get { return ((IMethodCallMessage)this.WrappedMessage).MethodBase; } } /// Gets the name of the invoked method. /// A that contains the name of the invoked method. /// /// /// // Token: 0x1700078D RID: 1933 // (get) Token: 0x06002772 RID: 10098 RVA: 0x000816CC File Offset: 0x0007F8CC public virtual string MethodName { get { return ((IMethodCallMessage)this.WrappedMessage).MethodName; } } /// Gets an object that contains the method signature. /// A that contains the method signature. /// /// /// // Token: 0x1700078E RID: 1934 // (get) Token: 0x06002773 RID: 10099 RVA: 0x000816E0 File Offset: 0x0007F8E0 public virtual object MethodSignature { get { return ((IMethodCallMessage)this.WrappedMessage).MethodSignature; } } /// An that represents a collection of the remoting message's properties. /// An interface that represents a collection of the remoting message's properties. /// /// /// // Token: 0x1700078F RID: 1935 // (get) Token: 0x06002774 RID: 10100 RVA: 0x000816F4 File Offset: 0x0007F8F4 public virtual IDictionary Properties { get { if (this._properties == null) { this._properties = new MethodCallMessageWrapper.DictionaryWrapper(this, this.WrappedMessage.Properties); } return this._properties; } } /// Gets the full type name of the remote object on which the method call is being made. /// A that contains the full type name of the remote object on which the method call is being made. /// /// /// // Token: 0x17000790 RID: 1936 // (get) Token: 0x06002775 RID: 10101 RVA: 0x0008172C File Offset: 0x0007F92C public virtual string TypeName { get { return ((IMethodCallMessage)this.WrappedMessage).TypeName; } } /// Gets the Uniform Resource Identifier (URI) of the remote object on which the method call is being made. /// The URI of a remote object. /// /// /// // Token: 0x17000791 RID: 1937 // (get) Token: 0x06002776 RID: 10102 RVA: 0x00081740 File Offset: 0x0007F940 // (set) Token: 0x06002777 RID: 10103 RVA: 0x00081754 File Offset: 0x0007F954 public virtual string Uri { get { return ((IMethodCallMessage)this.WrappedMessage).Uri; } set { IInternalMessage internalMessage = this.WrappedMessage as IInternalMessage; if (internalMessage != null) { internalMessage.Uri = value; } else { this.Properties["__Uri"] = value; } } } /// Gets a method argument, as an object, at a specified index. /// The method argument as an object. /// The index of the requested argument. /// /// /// // Token: 0x06002778 RID: 10104 RVA: 0x00081790 File Offset: 0x0007F990 public virtual object GetArg(int argNum) { return this._args[argNum]; } /// Gets the name of a method argument at a specified index. /// The name of the method argument. /// The index of the requested argument. /// /// /// // Token: 0x06002779 RID: 10105 RVA: 0x0008179C File Offset: 0x0007F99C public virtual string GetArgName(int index) { return ((IMethodCallMessage)this.WrappedMessage).GetArgName(index); } /// Gets a method argument at a specified index that is not marked as an out parameter. /// The method argument that is not marked as an out parameter. /// The index of the requested argument. /// /// /// // Token: 0x0600277A RID: 10106 RVA: 0x000817B0 File Offset: 0x0007F9B0 public virtual object GetInArg(int argNum) { return this._args[this._inArgInfo.GetInOutArgIndex(argNum)]; } /// Gets the name of a method argument at a specified index that is not marked as an out parameter. /// The name of the method argument that is not marked as an out parameter. /// The index of the requested argument. /// /// /// // Token: 0x0600277B RID: 10107 RVA: 0x000817C8 File Offset: 0x0007F9C8 public virtual string GetInArgName(int index) { return this._inArgInfo.GetInOutArgName(index); } // Token: 0x04000F54 RID: 3924 private object[] _args; // Token: 0x04000F55 RID: 3925 private ArgInfo _inArgInfo; // Token: 0x04000F56 RID: 3926 private MethodCallMessageWrapper.DictionaryWrapper _properties; // Token: 0x020003F7 RID: 1015 private class DictionaryWrapper : MethodCallDictionary { // Token: 0x0600277C RID: 10108 RVA: 0x000817D8 File Offset: 0x0007F9D8 public DictionaryWrapper(IMethodMessage message, IDictionary wrappedDictionary) : base(message) { this._wrappedDictionary = wrappedDictionary; base.MethodKeys = MethodCallMessageWrapper.DictionaryWrapper._keys; } // Token: 0x0600277E RID: 10110 RVA: 0x0008180C File Offset: 0x0007FA0C protected override IDictionary AllocInternalProperties() { return this._wrappedDictionary; } // Token: 0x0600277F RID: 10111 RVA: 0x00081814 File Offset: 0x0007FA14 protected override void SetMethodProperty(string key, object value) { if (key == "__Args") { ((MethodCallMessageWrapper)this._message)._args = (object[])value; } else { base.SetMethodProperty(key, value); } } // Token: 0x06002780 RID: 10112 RVA: 0x0008184C File Offset: 0x0007FA4C protected override object GetMethodProperty(string key) { if (key == "__Args") { return ((MethodCallMessageWrapper)this._message)._args; } return base.GetMethodProperty(key); } // Token: 0x04000F57 RID: 3927 private IDictionary _wrappedDictionary; // Token: 0x04000F58 RID: 3928 private static string[] _keys = new string[] { "__Args" }; } } }