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.

适用于