SynchronizationAttribute.IsContextOK(Context, IConstructionCallMessage) SynchronizationAttribute.IsContextOK(Context, IConstructionCallMessage) SynchronizationAttribute.IsContextOK(Context, IConstructionCallMessage) SynchronizationAttribute.IsContextOK(Context, IConstructionCallMessage) Method

定义

返回一个指示该上下文参数是否满足上下文特性要求的布尔值。Returns a Boolean value indicating whether the context parameter meets the context attribute's requirements.

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
Public Overrides Function IsContextOK (ctx As Context, msg As IConstructionCallMessage) As Boolean

参数

ctx
Context Context Context Context

要检查的上下文。The context to check.

msg
IConstructionCallMessage IConstructionCallMessage IConstructionCallMessage IConstructionCallMessage

在构造由该特性标记的上下文绑定对象时收集的信息。Information gathered at construction time of the context bound object marked by this attribute. 在确定是否可以接受该上下文时,SynchronizationAttribute 可以在该上下文中检查、添加和移除属性。The SynchronizationAttribute can inspect, add to, and remove properties from the context while determining if the context is acceptable to it.

返回

如果传入的上下文一切正常,则为 true;否则为 falsetrue if the passed in context is OK; otherwise, false.

异常

ctxmsg 参数为 nullThe ctx or msg parameter is null.

适用于