MethodResponse MethodResponse MethodResponse MethodResponse Class

定义

重要

此 API 不符合 CLS。

实现 IMethodReturnMessage 接口来创建一条消息,该消息作为远程对象上的方法响应。Implements the IMethodReturnMessage interface to create a message that acts as a method response on a remote object.

此 API 支持产品基础结构,不能在代码中直接使用。

public ref class MethodResponse : System::Runtime::Remoting::Messaging::IMethodReturnMessage, System::Runtime::Serialization::ISerializable
[System.CLSCompliant(false)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Security.SecurityCritical]
[System.Serializable]
public class MethodResponse : System.Runtime.Remoting.Messaging.IMethodReturnMessage, System.Runtime.Serialization.ISerializable
type MethodResponse = class
    interface IMethodReturnMessage
    interface ISerializable
    interface IMethodMessage
    interface IMessage
Public Class MethodResponse
Implements IMethodReturnMessage, ISerializable
继承
MethodResponseMethodResponseMethodResponseMethodResponse
派生
属性
实现

注解

MethodResponse作为在远程对象上调用的方法生成的, 用于将方法调用的结果返回给调用方。A MethodResponse is generated as a result of a method called on a remote object, and is used to return the results of the method call back to the caller. 消息包括返回值和out参数。The message includes a return value and out arguments.

MethodResponse类由 .NET Framework 的远程处理基础结构使用。The MethodResponse class is used by the remoting infrastructure of the .NET Framework. 不需要直接创建MethodResponse类的实例, 而是IMethodReturnMessage使用接口。You do not need to create an instance of the MethodResponse class directly; instead, use the IMethodReturnMessage interface.

MethodResponse包含消息接收器末尾的远程处理数据。MethodResponse contains remoting data at the end of the message sink. 远程处理服务器向客户MethodResponse端返回一条消息。A remoting server returns a MethodResponse message to a client.

构造函数

MethodResponse(Header[], IMethodCallMessage) MethodResponse(Header[], IMethodCallMessage) MethodResponse(Header[], IMethodCallMessage) MethodResponse(Header[], IMethodCallMessage)

从一个远程处理标头数组和一个请求消息初始化 MethodResponse 类的一个新实例。Initializes a new instance of the MethodResponse class from an array of remoting headers and a request message.

字段

ExternalProperties ExternalProperties ExternalProperties ExternalProperties

指定表示远程处理消息属性集合的 IDictionary 接口。Specifies an IDictionary interface that represents a collection of the remoting message's properties.

InternalProperties InternalProperties InternalProperties InternalProperties

指定表示远程处理消息属性集合的 IDictionary 接口。Specifies an IDictionary interface that represents a collection of the remoting message's properties.

属性

ArgCount ArgCount ArgCount ArgCount

获取传递给该方法的参数的数目。Gets the number of arguments passed to the method.

Args Args Args Args

获取传递给该方法的参数数组。Gets an array of arguments passed to the method.

Exception Exception Exception Exception

获取方法调用期间引发的异常;或者如果该方法未引发异常,则为 nullGets the exception thrown during the method call, or null if the method did not throw an exception.

HasVarArgs HasVarArgs HasVarArgs HasVarArgs

获取一个值,该值指示该方法是否接受数目可变的参数。Gets a value that indicates whether the method can accept a variable number of arguments.

LogicalCallContext LogicalCallContext LogicalCallContext LogicalCallContext

获取当前方法调用的 LogicalCallContextGets the LogicalCallContext for the current method call.

MethodBase MethodBase MethodBase MethodBase

获取被调用方法的 MethodBaseGets the MethodBase of the called method.

MethodName MethodName MethodName MethodName

获取被调用方法的名称。Gets the name of the invoked method.

MethodSignature MethodSignature MethodSignature MethodSignature

获取包含方法签名的对象。Gets an object that contains the method signature.

OutArgCount OutArgCount OutArgCount OutArgCount

获取方法调用中标记为 refout 参数的参数的数目。Gets the number of arguments in the method call marked as ref or out parameters.

OutArgs OutArgs OutArgs OutArgs

获取方法调用中标记为 refout 参数的一组参数。Gets an array of arguments in the method call that are marked as ref or out parameters.

Properties Properties Properties Properties

获取表示远程处理消息属性集合的 IDictionary 接口。Gets an IDictionary interface that represents a collection of the remoting message's properties.

ReturnValue ReturnValue ReturnValue ReturnValue

获取方法调用的返回值。Gets the return value of the method call.

TypeName TypeName TypeName TypeName

获取在其上进行方法调用的远程对象的完整类型名称。Gets the full type name of the remote object on which the method call is being made.

Uri Uri Uri Uri

获取在其上进行方法调用的远程对象的统一资源标识符 (URI)。Gets the Uniform Resource Identifier (URI) of the remote object on which the method call is being made.

方法

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetArg(Int32) GetArg(Int32) GetArg(Int32) GetArg(Int32)

获取指定索引处作为对象的方法参数。Gets a method argument, as an object, at a specified index.

GetArgName(Int32) GetArgName(Int32) GetArgName(Int32) GetArgName(Int32)

获取指定索引处的方法参数的名称。Gets the name of a method argument at a specified index.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext)

GetObjectData(SerializationInfo, StreamingContext) 方法未实现。The GetObjectData(SerializationInfo, StreamingContext) method is not implemented.

GetOutArg(Int32) GetOutArg(Int32) GetOutArg(Int32) GetOutArg(Int32)

返回标记为 refout 参数的指定参数。Returns the specified argument marked as a ref parameter or an out parameter.

GetOutArgName(Int32) GetOutArgName(Int32) GetOutArgName(Int32) GetOutArgName(Int32)

返回标记为 refout 参数的指定参数的名称。Returns the name of the specified argument marked as a ref parameter or an out parameter.

GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
HeaderHandler(Header[]) HeaderHandler(Header[]) HeaderHandler(Header[]) HeaderHandler(Header[])

从应用到一个方法的远程处理标头数组初始化一个内部序列化处理程序。Initializes an internal serialization handler from an array of remoting headers that are applied to a method.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
RootSetObjectData(SerializationInfo, StreamingContext) RootSetObjectData(SerializationInfo, StreamingContext) RootSetObjectData(SerializationInfo, StreamingContext) RootSetObjectData(SerializationInfo, StreamingContext)

从序列化设置来设置方法信息。Sets method information from serialization settings.

ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

适用于

另请参阅