BuildProviderAppliesToAttribute Class


定义一个特性,指定找到资源时应用生成提供程序的范围。Defines an attribute that specifies the scope where a build provider will be applied when a resource is located. 此类不能被继承。This class cannot be inherited.

public ref class BuildProviderAppliesToAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false)]
public sealed class BuildProviderAppliesToAttribute : Attribute
type BuildProviderAppliesToAttribute = class
    inherit Attribute
Public NotInheritable Class BuildProviderAppliesToAttribute
Inherits Attribute


BuildProvider类将在编译期间为具有特定文件扩展名的资源分析和生成代码。The BuildProvider class will parse and generate code during compilation for a resource with a specific file extension. 特性定义将为BuildProvider其调用对象的位置范围。 BuildProviderAppliesToAttributeThe BuildProviderAppliesToAttribute attribute defines the location scope for which the BuildProvider object will be called.

通过设置BuildProviderAppliesToAttribute属性, 可以将BuildProvider对象限制为某些保留的 ASP.NET 目录, 例如 \App_Code。By setting the BuildProviderAppliesToAttribute attribute, you can limit a BuildProvider object to certain reserved ASP.NET directories, such as \App_Code.

如果不将BuildProviderAppliesToAttribute特性BuildProvider应用于类, 则默认值为AllIf you do not apply a BuildProviderAppliesToAttribute attribute to a BuildProvider class, the default is All.



初始化应用到指定资源位置的 BuildProviderAppliesToAttribute 类的新实例。Initializes a new instance of the BuildProviderAppliesToAttribute class that applies to the specified resource location.



获取一个值,该值指示在找到具有相应扩展名的资源时将应用指定的 BuildProvider 类的位置。Gets a value that indicates where the specified BuildProvider class will be applied when a resource with the appropriate extension is found.


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

(Inherited from Attribute)



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

(Inherited from Attribute)

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

(Inherited from Attribute)

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

(Inherited from Object)

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

(Inherited from Attribute)

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

(Inherited from Attribute)

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

(Inherited from Object)

返回表示当前对象的字符串。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)

检索对象提供的类型信息接口的数量(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