System.Runtime.Remoting.Messaging.IMethodMessage Interface

Assembly: Mscorlib.dll
Namespace: System.Runtime.Remoting.Messaging
Summary
Defines the method message interface.
C# Syntax:
public interface IMethodMessage : IMessage
Remarks
A method message is used to send information to and from remote methods. For example, messages used for remote method calls implement the IMethodMessage interface.
See also:
System.Runtime.Remoting.Messaging Namespace

System.Runtime.Remoting.Messaging.IMethodMessage Member List:

Public Properties
ArgCount Read-only

Gets the number of arguments passed to the method.
Args Read-only

Gets an array of arguments passed to the method.
HasVarArgs Read-only

Gets a value indicating whether the message has variable arguments.
LogicalCallContext Read-only

Gets the LogicalCallContext for the current method call.
MethodBase Read-only

Gets the MethodBase of the called method.
MethodName Read-only

Gets the name of the invoked method.
MethodSignature Read-only

Gets an object containing the method signature.
TypeName Read-only

Gets the full Type name of the specific object that the call is destined for.
Uri Read-only

Gets the URI of the specific object that the call is destined for.
Public Methods
GetArg Gets a specific argument as an Object.
GetArgName Gets the name of the argument passed to the method.

Hierarchy:


System.Runtime.Remoting.Messaging.IMethodMessage Member Details

Property: ArgCount (read-only)
Summary
Gets the number of arguments passed to the method.
C# Syntax:
int ArgCount {get;}

Return to top


Property: Args (read-only)
Summary
Gets an array of arguments passed to the method.
C# Syntax:
object[] Args {get;}
Remarks
Although the IMethodMessage.Args property is redundant since the same functionality can be achieved through the IMethodMessage.ArgCount and IMethodMessage.GetArg, there might be performance optimization available if the implementer understands when all the arguments will be retrieved.

Return to top


Property: HasVarArgs (read-only)
Summary
Gets a value indicating whether the message has variable arguments.
C# Syntax:
bool HasVarArgs {get;}

Return to top


Property: LogicalCallContext (read-only)
Summary
Gets the LogicalCallContext for the current method call.
C# Syntax:
LogicalCallContext LogicalCallContext {get;}

Return to top


Property: MethodBase (read-only)
Summary
Gets the MethodBase of the called method.
C# Syntax:
MethodBase MethodBase {get;}
Remarks
This information is not transmitted to a remote location, but is used to cache the method base after it has been looked up once.

Return to top


Property: MethodName (read-only)
Summary
Gets the name of the invoked method.
C# Syntax:
string MethodName {get;}

Return to top


Property: MethodSignature (read-only)
Summary
Gets an object containing the method signature.
C# Syntax:
object MethodSignature {get;}
Remarks
All the current implementations of IMethodMessage return an array of Type objects containing the parameter types of the method.

Return to top


Property: TypeName (read-only)
Summary
Gets the full Type name of the specific object that the call is destined for.
C# Syntax:
string TypeName {get;}

Return to top


Property: Uri (read-only)
Summary
Gets the URI of the specific object that the call is destined for.
C# Syntax:
string Uri {get;}

Return to top


Method: GetArg(
   int argNum
)
Summary
Gets a specific argument as an Object.
C# Syntax:
object GetArg(
   int argNum
);
Parameters:

argNum

The number of the requested argument.

Return Value:
The argument passed to the method.

Return to top


Method: GetArgName(
   int index
)
Summary
Gets the name of the argument passed to the method.
C# Syntax:
string GetArgName(
   int index
);
Parameters:

index

The number of the requested argument.

Return Value:
The name of the specified argument passed to the method, or null if the current method is not implemented.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.