SynchronizationAttribute.IsContextOK 方法

定義

回傳一個布林值,表示上下文參數是否符合上下文屬性的要求。

public:
 override bool IsContextOK(System::Runtime::Remoting::Contexts::Context ^ ctx, System::Runtime::Remoting::Activation::IConstructionCallMessage ^ msg);
public override bool IsContextOK(System.Runtime.Remoting.Contexts.Context ctx, System.Runtime.Remoting.Activation.IConstructionCallMessage msg);
[System.Runtime.InteropServices.ComVisible(true)]
public override bool IsContextOK(System.Runtime.Remoting.Contexts.Context ctx, System.Runtime.Remoting.Activation.IConstructionCallMessage msg);
[System.Runtime.InteropServices.ComVisible(true)]
[System.Security.SecurityCritical]
public override bool IsContextOK(System.Runtime.Remoting.Contexts.Context ctx, System.Runtime.Remoting.Activation.IConstructionCallMessage msg);
override this.IsContextOK : System.Runtime.Remoting.Contexts.Context * System.Runtime.Remoting.Activation.IConstructionCallMessage -> bool
[<System.Runtime.InteropServices.ComVisible(true)>]
override this.IsContextOK : System.Runtime.Remoting.Contexts.Context * System.Runtime.Remoting.Activation.IConstructionCallMessage -> bool
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Security.SecurityCritical>]
override this.IsContextOK : System.Runtime.Remoting.Contexts.Context * System.Runtime.Remoting.Activation.IConstructionCallMessage -> bool
Public Overrides Function IsContextOK (ctx As Context, msg As IConstructionCallMessage) As Boolean

參數

ctx
Context

需要查證的背景。

msg
IConstructionCallMessage

在建立時收集的資訊,該物件以此屬性標記為上下文綁定物件。 他們 SynchronizationAttribute 可以在判斷上下文是否可接受的情況下,檢查、新增並移除屬性。

傳回

true如果 pass in context 是可以的;否則,。 false

屬性

例外狀況

ctxmsg參數為 null

適用於