PrincipalPermissionAttribute.CreatePermission PrincipalPermissionAttribute.CreatePermission PrincipalPermissionAttribute.CreatePermission PrincipalPermissionAttribute.CreatePermission Method

定义

创建并返回一个新的 PrincipalPermissionCreates and returns a new PrincipalPermission.

public:
 override System::Security::IPermission ^ CreatePermission();
public override System.Security.IPermission CreatePermission ();
override this.CreatePermission : unit -> System.Security.IPermission
Public Overrides Function CreatePermission () As IPermission

返回

与此属性对应的 PrincipalPermissionA PrincipalPermission that corresponds to this attribute.

注解

此方法仅应由安全系统中,永远不会由应用程序代码调用。This method should only be called by the security system, never by application code.

在编译时,属性将安全声明转换为元数据中的序列化形式。At compile time, attributes convert security declarations to a serialized form in metadata. 此方法返回与此特性相对应的权限从创建元数据中的声明性安全数据。Declarative security data in metadata is created from the permission that this method returns that corresponds to this attribute.

适用于