语言

IIdentityPermissionFactory 接口

定义

注意

Code Access Security is not supported or honored by the runtime.

定义创建新标识权限的方法。

public interface class IIdentityPermissionFactory
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public interface IIdentityPermissionFactory
public interface IIdentityPermissionFactory
[System.Runtime.InteropServices.ComVisible(true)]
public interface IIdentityPermissionFactory
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type IIdentityPermissionFactory = interface
type IIdentityPermissionFactory = interface
[<System.Runtime.InteropServices.ComVisible(true)>]
type IIdentityPermissionFactory = interface
Public Interface IIdentityPermissionFactory
派生
属性

注解

Caution

代码访问安全性(CAS)已在 .NET Framework 和 .NET 的所有版本中弃用。 如果使用与 CAS 相关的 API,最新版本的 .NET 不会遵循 CAS 注释,并会生成错误。 开发人员应寻求完成安全任务的替代方法。

某些类型的证据具有相应的标识权限,该权限授予具有该证据的程序集。 这样,其他代码就可以要求标识,以便只有具有特定证据片段的代码才能通过。 例如,可以要求调用方具有特定的强名称;只有具有该强名称的调用方才会传递需求。 通过为证据对象实现 IIdentityPermissionFactory,您提供了 CreateIdentityPermission 的实现,.NET Framework 安全系统可以调用该实现以获得代表该证据的标识权限。 在策略解析过程中,安全系统将调用那些实现 IIdentityPermissionFactory 的所有证据对象上的方法,并将所得的标识权限授予适当的程序集。

方法

名称 说明
CreateIdentityPermission(Evidence)
已过时.

为指定的证据创建新的标识权限。

适用于

另请参阅