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)

傳回標記為 ref 參數或 out 參數的指定引數。Returns the specified argument marked as a ref parameter or an out parameter.

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

傳回標記為 ref 參數或 out 參數之指定引數的名稱。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[])

從套用至方法的遠端標頭陣列,初始化內部序列化 (Serialization) 處理常式。Initializes an internal serialization handler from an array of remoting headers that are applied to a method.

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

建立目前 Object 的淺層複本 (Shallow Copy)。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)

適用於

另請參閱