ContextAttribute.IsContextOK(Context, IConstructionCallMessage) 方法

定义

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

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 virtual bool IsContextOK(System::Runtime::Remoting::Contexts::Context ^ ctx, System::Runtime::Remoting::Activation::IConstructionCallMessage ^ ctorMsg);
public virtual bool IsContextOK (System.Runtime.Remoting.Contexts.Context ctx, System.Runtime.Remoting.Activation.IConstructionCallMessage ctorMsg);
[System.Security.SecurityCritical]
public virtual bool IsContextOK (System.Runtime.Remoting.Contexts.Context ctx, System.Runtime.Remoting.Activation.IConstructionCallMessage ctorMsg);
abstract member IsContextOK : System.Runtime.Remoting.Contexts.Context * System.Runtime.Remoting.Activation.IConstructionCallMessage -> bool
override this.IsContextOK : System.Runtime.Remoting.Contexts.Context * System.Runtime.Remoting.Activation.IConstructionCallMessage -> bool
[<System.Security.SecurityCritical>]
abstract member IsContextOK : System.Runtime.Remoting.Contexts.Context * System.Runtime.Remoting.Activation.IConstructionCallMessage -> bool
override this.IsContextOK : System.Runtime.Remoting.Contexts.Context * System.Runtime.Remoting.Activation.IConstructionCallMessage -> bool
Public Overridable Function IsContextOK (ctx As Context, ctorMsg As IConstructionCallMessage) As Boolean

参数

ctx
Context

要在其中检查的上下文。The context in which to check.

ctorMsg
IConstructionCallMessage

将上下文属性添加到的 IConstructionCallMessageThe IConstructionCallMessage to which to add the context property.

返回

Boolean

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

实现

属性

例外

ctxctorMsgnullEither ctx or ctorMsg is null.

适用于