MethodResponse Class

Definition

Important

This API is not CLS-compliant.

實作 IMethodReturnMessage 介面,以建立做為遠端物件上之方法回應的訊息。Implements the IMethodReturnMessage interface to create a message that acts as a method response on a remote object.

This API supports the product infrastructure and is not intended to be used directly from your code.

public ref class MethodResponse : System::Runtime::Remoting::Messaging::IMethodReturnMessage, System::Runtime::Serialization::ISerializable
[System.CLSCompliant(false)]
[System.Serializable]
public class MethodResponse : System.Runtime.Remoting.Messaging.IMethodReturnMessage, System.Runtime.Serialization.ISerializable
[System.CLSCompliant(false)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public 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 IMethodMessage
    interface IMessage
    interface ISerializable
type MethodResponse = class
    interface IMethodReturnMessage
    interface ISerializable
    interface IMethodMessage
    interface IMessage
Public Class MethodResponse
Implements IMethodReturnMessage, ISerializable
Inheritance
MethodResponse
Derived
Attributes
Implements

Remarks

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.

Constructors

MethodResponse(Header[], IMethodCallMessage)

從遠端標頭的陣列和要求訊息,初始化 MethodResponse 類別的新執行個體。Initializes a new instance of the MethodResponse class from an array of remoting headers and a request message.

Fields

ExternalProperties

指定 IDictionary 介面,表示遠端訊息的屬性集合。Specifies an IDictionary interface that represents a collection of the remoting message's properties.

InternalProperties

指定 IDictionary 介面,表示遠端訊息的屬性集合。Specifies an IDictionary interface that represents a collection of the remoting message's properties.

Properties

ArgCount

取得傳遞給方法的引數數目。Gets the number of arguments passed to the method.

Args

取得傳遞給方法的引數陣列。Gets an array of arguments passed to the method.

Exception

取得方法呼叫期間擲回的例外狀況,但如果方法沒有擲回例外狀況,則為 nullGets the exception thrown during the method call, or null if the method did not throw an exception.

HasVarArgs

取得值,指出方法是否接受變動數目的引數。Gets a value that indicates whether the method can accept a variable number of arguments.

LogicalCallContext

取得目前方法呼叫的 LogicalCallContextGets the LogicalCallContext for the current method call.

MethodBase

取得受呼叫方法的 MethodBaseGets the MethodBase of the called method.

MethodName

取得受叫用方法的名稱。Gets the name of the invoked method.

MethodSignature

取得包含方法簽章的物件。Gets an object that contains the method signature.

OutArgCount

取得方法呼叫中標記為 refout 參數的引數數目。Gets the number of arguments in the method call marked as ref or out parameters.

OutArgs

取得方法呼叫中標記為 refout 參數的引數陣列。Gets an array of arguments in the method call that are marked as ref or out parameters.

Properties

取得 IDictionary 介面,表示遠端訊息的屬性集合。Gets an IDictionary interface that represents a collection of the remoting message's properties.

ReturnValue

取得方法呼叫的傳回值。Gets the return value of the method call.

TypeName

取得進行方法呼叫之遠端物件的完整型別名稱。Gets the full type name of the remote object on which the method call is being made.

Uri

取得進行方法呼叫之遠端物件的統一資源識別元 (URI)。Gets the Uniform Resource Identifier (URI) of the remote object on which the method call is being made.

Methods

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetArg(Int32)

在指定索引處取得方法引數當做物件。Gets a method argument, as an object, at a specified index.

GetArgName(Int32)

在指定索引處取得方法引數的名稱。Gets the name of a method argument at a specified index.

GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetObjectData(SerializationInfo, StreamingContext)

GetObjectData(SerializationInfo, StreamingContext) 方法尚未實作。The GetObjectData(SerializationInfo, StreamingContext) method is not implemented.

GetOutArg(Int32)

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

GetOutArgName(Int32)

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

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
HeaderHandler(Header[])

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

MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(Inherited from Object)
RootSetObjectData(SerializationInfo, StreamingContext)

設定序列化設定中的方法資訊。Sets method information from serialization settings.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also