UrlAttribute.IsContextOK 方法
返回一个布尔值,该值指示指定的 Context 是否满足 UrlAttribute 的要求。
**命名空间:**System.Runtime.Remoting.Activation
**程序集:**mscorlib(在 mscorlib.dll 中)
语法
声明
<ComVisibleAttribute(True)> _
Public Overrides Function IsContextOK ( _
ctx As Context, _
msg As IConstructionCallMessage _
) As Boolean
用法
Dim instance As UrlAttribute
Dim ctx As Context
Dim msg As IConstructionCallMessage
Dim returnValue As Boolean
returnValue = instance.IsContextOK(ctx, msg)
[ComVisibleAttribute(true)]
public override bool IsContextOK (
Context ctx,
IConstructionCallMessage msg
)
[ComVisibleAttribute(true)]
public:
virtual bool IsContextOK (
Context^ ctx,
IConstructionCallMessage^ msg
) override
/** @attribute ComVisibleAttribute(true) */
public boolean IsContextOK (
Context ctx,
IConstructionCallMessage msg
)
ComVisibleAttribute(true)
public override function IsContextOK (
ctx : Context,
msg : IConstructionCallMessage
) : boolean
参数
- ctx
当前上下文属性检查所依据的上下文。
- msg
结构调用,需要依据当前上下文检查其参数。
返回值
如果传入的上下文是可接受的,则为 true;否则为 false。
异常
异常类型 | 条件 |
---|---|
直接调用方没有基础结构权限。 |
.NET Framework 安全性
- SecurityPermission 用于操作基础结构代码。关联的枚举:SecurityPermissionFlag.Infrastructure
平台
Windows 98、Windows 2000 SP4、Windows Millennium Edition、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition
.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求。
版本信息
.NET Framework
受以下版本支持:2.0、1.1、1.0
请参见
参考
UrlAttribute 类
UrlAttribute 成员
System.Runtime.Remoting.Activation 命名空间
Context