DynamicDependencyAttribute 类  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
说明一个成员对另一个成员的依赖关系。
public ref class DynamicDependencyAttribute sealed : Attribute[System.AttributeUsage(System.AttributeTargets.Constructor | System.AttributeTargets.Field | System.AttributeTargets.Method, AllowMultiple=true, Inherited=false)]
public sealed class DynamicDependencyAttribute : Attribute[<System.AttributeUsage(System.AttributeTargets.Constructor | System.AttributeTargets.Field | System.AttributeTargets.Method, AllowMultiple=true, Inherited=false)>]
type DynamicDependencyAttribute = class
    inherit AttributePublic NotInheritable Class DynamicDependencyAttribute
Inherits Attribute- 继承
- 属性
注解
此属性可用于向工具通知依赖性,而依赖关系不完全从元数据和 IL 中明显可见,例如,通过反射依赖的成员。
构造函数
| DynamicDependencyAttribute(DynamicallyAccessedMemberTypes, String, String) | 使用程序集中某一类型上指定成员类型初始化 DynamicDependencyAttribute 类的新实例。 | 
| DynamicDependencyAttribute(DynamicallyAccessedMemberTypes, Type) | 使用 Type 上指定的成员类型初始化 DynamicDependencyAttribute 类的新实例。 | 
| DynamicDependencyAttribute(String) | 使用与使用者所在类型相同的成员的指定签名初始化 DynamicDependencyAttribute 类的新实例。 | 
| DynamicDependencyAttribute(String, String, String) | 使用程序集中某一类型上成员指定签名初始化 DynamicDependencyAttribute 类的新实例。 | 
| DynamicDependencyAttribute(String, Type) | 使用 Type 上成员指定签名初始化 DynamicDependencyAttribute 类的新实例。 | 
属性
| AssemblyName | 获取指定类型的程序集名称。 | 
| Condition | 获取或设置依赖项适用的条件。 | 
| MemberSignature | 获取受依赖成员的签名。 | 
| MemberTypes | 获取受依赖成员的类型,例如字段和属性。 | 
| Type | 获取包含指定成员的 Type。 | 
| TypeId | 在派生类中实现时,获取此 Attribute 的唯一标识符。(继承自 Attribute) | 
| TypeName | 获取包含指定成员的类型的完整名称。 | 
方法
| Equals(Object) | 返回一个值,该值指示此实例是否与指定的对象相等。(继承自 Attribute) | 
| GetHashCode() | 返回此实例的哈希代码。(继承自 Attribute) | 
| GetType() | 获取当前实例的 Type。(继承自 Object) | 
| IsDefaultAttribute() | 在派生类中重写时,指示此实例的值是否是派生类的默认值。(继承自 Attribute) | 
| Match(Object) | 当在派生类中重写时,返回一个指示此实例是否等于指定对象的值。(继承自 Attribute) | 
| MemberwiseClone() | 创建当前 Object 的浅表副本。(继承自 Object) | 
| ToString() | 返回表示当前对象的字符串。(继承自 Object) |