SqlClientPermissionAttribute Class

Definition

将某安全操作与自定义安全特性相关联。Associates a security action with a custom security attribute.

public ref class SqlClientPermissionAttribute sealed : System::Data::Common::DBDataPermissionAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed class SqlClientPermissionAttribute : System.Data.Common.DBDataPermissionAttribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
[System.Serializable]
public sealed class SqlClientPermissionAttribute : System.Data.Common.DBDataPermissionAttribute
type SqlClientPermissionAttribute = class
    inherit DBDataPermissionAttribute
Public NotInheritable Class SqlClientPermissionAttribute
Inherits DBDataPermissionAttribute
Inheritance
Attributes

Constructors

SqlClientPermissionAttribute(SecurityAction)

初始化 SqlClientPermissionAttribute 类的新实例。Initializes a new instance of the SqlClientPermissionAttribute class.

Properties

Action

获取或设置安全性操作。Gets or sets a security action.

(Inherited from SecurityAttribute)
AllowBlankPassword

获取或设置一个值,该值指示是否允许使用空白密码。Gets or sets a value indicating whether a blank password is allowed.

(Inherited from DBDataPermissionAttribute)
ConnectionString

获取或设置允许的连接字符串。Gets or sets a permitted connection string.

(Inherited from DBDataPermissionAttribute)
KeyRestrictionBehavior

标识由 KeyRestrictions 属性标识的连接字符串参数列表是否为所唯一允许的连接字符串参数。Identifies whether the list of connection string parameters identified by the KeyRestrictions property are the only connection string parameters allowed.

(Inherited from DBDataPermissionAttribute)
KeyRestrictions

获取或设置允许或不允许的连接字符串参数。Gets or sets connection string parameters that are allowed or disallowed.

(Inherited from DBDataPermissionAttribute)
TypeId

在派生类中实现时,获取此 Attribute 的唯一标识符。When implemented in a derived class, gets a unique identifier for this Attribute.

(Inherited from Attribute)
Unrestricted

获取或设置一个值,该值指示是否声明了对受该特性保护的资源有完全(无限制的)权限。Gets or sets a value indicating whether full (unrestricted) permission to the resource protected by the attribute is declared.

(Inherited from SecurityAttribute)

Methods

CreatePermission()

返回一个 SqlClientPermission 对象,该对象是根据特性属性配置的。Returns a SqlClientPermission object that is configured according to the attribute properties.

Equals(Object)

返回一个值,该值指示此实例是否与指定的对象相等。Returns a value that indicates whether this instance is equal to a specified object.

(Inherited from Attribute)
GetHashCode()

返回此实例的哈希代码。Returns the hash code for this instance.

(Inherited from Attribute)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
IsDefaultAttribute()

在派生类中重写时,指示此实例的值是否是派生类的默认值。When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.

(Inherited from Attribute)
Match(Object)

当在派生类中重写时,返回一个指示此实例是否等于指定对象的值。When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.

(Inherited from Attribute)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
ShouldSerializeConnectionString()

标识特性是否应序列化连接字符串。Identifies whether the attribute should serialize the connection string.

(Inherited from DBDataPermissionAttribute)
ShouldSerializeKeyRestrictions()

标识特性是否应序列化键限制集合。Identifies whether the attribute should serialize the set of key restrictions.

(Inherited from DBDataPermissionAttribute)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

将一组名称映射为对应的一组调度标识符。Maps a set of names to a corresponding set of dispatch identifiers.

(Inherited from Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

检索对象的类型信息,然后可以使用该信息获取接口的类型信息。Retrieves the type information for an object, which can be used to get the type information for an interface.

(Inherited from Attribute)
_Attribute.GetTypeInfoCount(UInt32)

检索对象提供的类型信息接口的数量(0 或 1)。Retrieves the number of type information interfaces that an object provides (either 0 or 1).

(Inherited from Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

提供对某一对象公开的属性和方法的访问。Provides access to properties and methods exposed by an object.

(Inherited from Attribute)

Applies to

See also