DefaultDependencyAttribute クラス
アセンブリ: mscorlib (mscorlib.dll 内)
構文
<SerializableAttribute> _ <AttributeUsageAttribute(AttributeTargets.Assembly)> _ Public NotInheritable Class DefaultDependencyAttribute Inherits Attribute
[SerializableAttribute] [AttributeUsageAttribute(AttributeTargets.Assembly)] public sealed class DefaultDependencyAttribute : Attribute
[SerializableAttribute] [AttributeUsageAttribute(AttributeTargets::Assembly)] public ref class DefaultDependencyAttribute sealed : public Attribute
この属性は、ネイティブ アセンブリのイメージを生成するために ネイティブ イメージ ジェネレータ (Ngen.exe) が使用します。
適切な既定のバインディングを決定するには、依存アセンブリに DefaultDependencyAttribute 属性を適用します。
Ngen.exe は、読み込まれる可能性の高い依存関係 (Always) にバインドします。このヒントを使用すると、Ngen.exe は、ワーキング セットを縮小し、スループットを向上するコードを生成できますが、親アセンブリが読み込まれるときに必ず依存関係が読み込まれます。
Default の値を使用して DependencyAttribute 属性をアセンブリに適用すると、ネイティブ イメージの生成サービスは、DefaultDependencyAttribute 属性で指定されている適切な既定のバインディングを依存アセンブリに確認します。
DefaultDependencyAttribute 属性をアセンブリに適用して、依存関係が読み込まれる可能性があることを指定する方法を次のコード例に示します。
System.Attribute
System.Runtime.CompilerServices.DefaultDependencyAttribute
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- DefaultDependencyAttribute クラスのページへのリンク