ContextAttribute.IsNewContextOK(Context) ContextAttribute.IsNewContextOK(Context) ContextAttribute.IsNewContextOK(Context) ContextAttribute.IsNewContextOK(Context) Method

定义

返回一个指示上下文属性是否与新上下文兼容的布尔值。Returns a Boolean value indicating whether the context property is compatible with the new context.

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

public:
 virtual bool IsNewContextOK(System::Runtime::Remoting::Contexts::Context ^ newCtx);
[System.Security.SecurityCritical]
public virtual bool IsNewContextOK (System.Runtime.Remoting.Contexts.Context newCtx);
abstract member IsNewContextOK : System.Runtime.Remoting.Contexts.Context -> bool
override this.IsNewContextOK : System.Runtime.Remoting.Contexts.Context -> bool
Public Overridable Function IsNewContextOK (newCtx As Context) As Boolean

参数

newCtx
Context Context Context Context

已在其中创建属性的新上下文。The new context in which the property has been created.

返回

如果上下文属性与新上下文兼容,则为 true;否则为 falsetrue if the context property is okay with the new context; otherwise, false.

实现

注解

将所有上下文属性添加到新的上下文之后, 这些属性都将被查询为在新上下文中是否正常。Once all the context properties have been added to the new context, they are all queried as to whether they are okay in the new context. 上下文属性可以查看新上下文的ContextProperties属性中的其他上下文属性, 并确定它是否与这些其他上下文属性兼容。The context property could look at the other context properties in the ContextProperties property of the new context and determine whether it is compatible with these other context properties.

备注

默认情况下, IsNewContextOK该方法true返回。By default, the IsNewContextOK method returns true.

适用于