LogicalCallContext 類別

定義

在遠端方法呼叫期間提供一組附隨於執行程式碼路徑的屬性。

public ref class LogicalCallContext sealed : ICloneable, System::Runtime::Serialization::ISerializable
[System.Serializable]
public sealed class LogicalCallContext : ICloneable, System.Runtime.Serialization.ISerializable
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class LogicalCallContext : ICloneable, System.Runtime.Serialization.ISerializable
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Security.SecurityCritical]
public sealed class LogicalCallContext : ICloneable, System.Runtime.Serialization.ISerializable
[<System.Serializable>]
type LogicalCallContext = class
    interface ISerializable
    interface ICloneable
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type LogicalCallContext = class
    interface ISerializable
    interface ICloneable
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Security.SecurityCritical>]
type LogicalCallContext = class
    interface ISerializable
    interface ICloneable
Public NotInheritable Class LogicalCallContext
Implements ICloneable, ISerializable
繼承
LogicalCallContext
屬性
實作

備註

LogicalCallContext類別是類別的版本 CallContext ,可在對遠端應用程式域進行方法呼叫期間使用。 CallContext是特製化的集合物件,類似于方法呼叫的執行緒區域儲存區,並且提供每個邏輯執行緒唯一的資料槽。 不會在其他邏輯執行緒的呼叫內容之間共用位置。 當物件向 CallContext 下移動和執行程式碼路徑時,可以將物件加入至,並在路徑中依不同物件進行檢查。

當遠端方法呼叫另一個物件時 AppDomainCallContext 類別會產生 LogicalCallContext 與遠端呼叫一起傳送的。 只有公開 ILogicalThreadAffinative 介面和儲存在中的物件會在的 CallContext 外部傳播 AppDomain LogicalCallContext 。 不支援這個介面的物件不會在 LogicalCallContext 具有遠端方法呼叫的實例中傳輸。

注意

此類別會建立連結要求。 如果立即呼叫端沒有基礎結構許可權,就會擲回 SecurityException。 如需詳細資訊,請參閱 連結需求

屬性

HasInfo

取得值,指出目前的 LogicalCallContext 是否含有資訊。

方法

Clone()

建立目前執行個體複本的新物件。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
FreeNamedDataSlot(String)

以指定的名稱清除資料位置。

GetData(String)

從目前執行個體擷取具有指定名稱的物件。

GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetObjectData(SerializationInfo, StreamingContext)

以序列化目前 SerializationInfo 所需資料填入 (Populate) 指定的 LogicalCallContext

GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
SetData(String, Object)

在目前執行個體中存放指定物件,並使它與指定名稱產生關聯。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於