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.

适用于