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,否則為 false

屬性

例外狀況

ctxmsg 參數為 null

適用於