1595 types derived from Attribute
aspire (1)
Aspire.Azure.AI.Inference (2)
Aspire.Azure.AI.OpenAI (2)
Aspire.Azure.Data.Tables (2)
Aspire.Azure.Messaging.EventHubs (2)
Aspire.Azure.Messaging.ServiceBus (2)
Aspire.Azure.Messaging.WebPubSub (2)
Aspire.Azure.Search.Documents (2)
Aspire.Azure.Security.KeyVault (2)
Aspire.Azure.Storage.Blobs (2)
Aspire.Azure.Storage.Files.DataLake (2)
Aspire.Azure.Storage.Queues (2)
Aspire.Cli.Tests (1)
Aspire.Dashboard.Components.Tests (1)
Aspire.Dashboard.Tests (1)
Aspire.Hosting (8)
Aspire.Hosting.Analyzers (11)
Aspire.Hosting.Integration.Analyzers (11)
Aspire.Hosting.RemoteHost.Tests (4)
Aspire.Hosting.Testing.Tests (1)
Aspire.Hosting.Tests (1)
Aspire.Microsoft.Azure.Cosmos (2)
Aspire.Microsoft.Data.SqlClient (2)
Aspire.Microsoft.EntityFrameworkCore.Cosmos (2)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (2)
Aspire.Milvus.Client (2)
Aspire.MongoDB.Driver (2)
Aspire.MongoDB.EntityFrameworkCore (2)
Aspire.MySqlConnector (2)
Aspire.NATS.Net (2)
Aspire.Npgsql (2)
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL (2)
Aspire.OpenAI (2)
Aspire.Oracle.EntityFrameworkCore (2)
Aspire.Playground.Tests (4)
Aspire.Pomelo.EntityFrameworkCore.MySql (2)
Aspire.Qdrant.Client (2)
Aspire.RabbitMQ.Client (2)
Aspire.Seq (2)
Aspire.StackExchange.Redis (2)
Aspire.StackExchange.Redis.DistributedCaching (2)
Aspire.StackExchange.Redis.OutputCaching (2)
Aspire.TestUtilities (4)
CodeStyleConfigFileGenerator (2)
ConfigurationSchemaGenerator.Tests (2)
dotnet (1)
dotnet-Microsoft.XmlSerializer.Generator (14)
dotnet-svcutil-lib (64)
DotNetWatchTasks (2)
EventSourceGenerator (12)
GenerateDocumentationAndConfigFiles (5)
ILCompiler.Build.Tasks (2)
ILCompiler.Compiler (3)
ILCompiler.ReadyToRun (1)
illink (5)
ILLink.RoslynAnalyzer (14)
Infrastructure.Common (2)
Microsoft.AspNetCore.Analyzers (11)
Microsoft.AspNetCore.Antiforgery (1)
Microsoft.AspNetCore.App.Analyzers (11)
Microsoft.AspNetCore.App.SourceGenerators (11)
Microsoft.AspNetCore.Authorization (2)
Microsoft.AspNetCore.Components (12)
Microsoft.AspNetCore.Components.Analyzers (11)
Microsoft.AspNetCore.Components.Authorization (2)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.Server (1)
Microsoft.AspNetCore.Components.Web (1)
Microsoft.AspNetCore.Cors (2)
Microsoft.AspNetCore.DataProtection (1)
Microsoft.AspNetCore.Hosting.Abstractions (1)
Microsoft.AspNetCore.Http (2)
Microsoft.AspNetCore.Http.Abstractions (1)
Microsoft.AspNetCore.Http.Extensions (5)
Microsoft.AspNetCore.HttpLogging (1)
Microsoft.AspNetCore.Identity (4)
Microsoft.AspNetCore.Mvc.Analyzers (11)
Microsoft.AspNetCore.Mvc.Api.Analyzers (11)
Microsoft.AspNetCore.Mvc.Core (53)
Microsoft.AspNetCore.Mvc.DataAnnotations (2)
Microsoft.AspNetCore.Mvc.Razor (2)
Microsoft.AspNetCore.Mvc.RazorPages (3)
Microsoft.AspNetCore.Mvc.ViewFeatures (11)
Microsoft.AspNetCore.OpenApi.SourceGenerators (11)
Microsoft.AspNetCore.OutputCaching (1)
Microsoft.AspNetCore.RateLimiting (2)
Microsoft.AspNetCore.Razor (5)
Microsoft.AspNetCore.Razor.Runtime (6)
Microsoft.AspNetCore.Razor.Utilities.Shared (3)
Microsoft.AspNetCore.Routing (4)
Microsoft.AspNetCore.SignalR.Core (1)
Microsoft.Bcl.AsyncInterfaces (5)
Microsoft.Bcl.Numerics (5)
Microsoft.Build (1)
Microsoft.Build.Framework (9)
Microsoft.Build.Tasks.CodeAnalysis (3)
Microsoft.CodeAnalysis (10)
Microsoft.CodeAnalysis.Analyzers (12)
Microsoft.CodeAnalysis.AnalyzerUtilities (12)
Microsoft.CodeAnalysis.CodeStyle (12)
Microsoft.CodeAnalysis.Extensions.Package (10)
Microsoft.CodeAnalysis.ResxSourceGenerator (12)
Microsoft.CodeAnalysis.Workspaces (7)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (2)
Microsoft.Diagnostics.DataContractReader.Contracts (1)
Microsoft.Extensions.AI (21)
Microsoft.Extensions.AI.Evaluation (19)
Microsoft.Extensions.AI.OpenAI (22)
Microsoft.Extensions.Caching.Hybrid (9)
Microsoft.Extensions.Compliance.Abstractions (21)
Microsoft.Extensions.Compliance.Redaction (21)
Microsoft.Extensions.Compliance.Testing (21)
Microsoft.Extensions.Configuration.Abstractions (2)
Microsoft.Extensions.Configuration.UserSecrets (1)
Microsoft.Extensions.DataIngestion.Abstractions (19)
Microsoft.Extensions.DataIngestion.MarkItDown (19)
Microsoft.Extensions.DataIngestion.Tests (1)
Microsoft.Extensions.DependencyInjection.Abstractions (3)
Microsoft.Extensions.Http.Resilience (20)
Microsoft.Extensions.Identity.Core (1)
Microsoft.Extensions.Localization (2)
Microsoft.Extensions.Logging.Abstractions (2)
Microsoft.Extensions.Logging.Configuration (1)
Microsoft.Extensions.Logging.Console (1)
Microsoft.Extensions.Logging.EventLog (1)
Microsoft.Extensions.Logging.Generators (15)
Microsoft.Extensions.Options (3)
Microsoft.Extensions.Options.Contextual (21)
Microsoft.Extensions.Telemetry (21)
Microsoft.Extensions.Telemetry.Abstractions (11)
Microsoft.Extensions.TimeProvider.Testing (19)
Microsoft.Extensions.Validation (2)
Microsoft.Gen.BuildMetadata (1)
Microsoft.Gen.ContextualOptions.Generated.Tests (1)
Microsoft.Interop.ComInterfaceGenerator (13)
Microsoft.Interop.JavaScript.JSImportGenerator (13)
Microsoft.Interop.LibraryImportGenerator (13)
Microsoft.Interop.LibraryImportGenerator.Downlevel (13)
Microsoft.Interop.SourceGeneration (16)
Microsoft.JSInterop (1)
Microsoft.Maui (3)
Microsoft.Maui.Controls (20)
Microsoft.Maui.Controls.SourceGen (1)
Microsoft.Maui.Controls.Xaml (2)
Microsoft.Maui.Graphics (2)
Microsoft.ML.Core (19)
Microsoft.ML.CpuMath (2)
Microsoft.ML.Data (9)
Microsoft.ML.DataView (1)
Microsoft.ML.PerformanceTests (1)
Microsoft.ML.TestFrameworkCommon (1)
Microsoft.ML.TorchSharp (1)
Microsoft.Private.Windows.Core (33)
Microsoft.TestPlatform.CommunicationUtilities (1)
Microsoft.TestPlatform.Extensions.BlameDataCollector (1)
Microsoft.TestPlatform.Filter.Source (1)
Microsoft.TestPlatform.PlatformAbstractions (1)
Microsoft.TestPlatform.TestHostRuntimeProvider (1)
Microsoft.TestUtilities (2)
Microsoft.VisualBasic.Core (9)
Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger (1)
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (2)
Microsoft.VisualStudio.TestPlatform.ObjectModel (10)
PresentationCore (3)
PresentationFramework (10)
Roslyn.Diagnostics.Analyzers (12)
Shared (20)
System.Collections.Immutable (1)
System.ComponentModel.Annotations (20)
System.ComponentModel.Composition (11)
System.ComponentModel.Primitives (18)
System.ComponentModel.TypeConverter (28)
System.Composition.AttributedModel (11)
System.Configuration.ConfigurationManager (13)
System.Data.Common (1)
System.Diagnostics.TraceSource (2)
System.DirectoryServices.AccountManagement (3)
System.Drawing.Common (3)
System.Linq.Expressions (1)
System.Net.Quic (1)
System.ObjectModel (3)
System.Private.CoreLib (238)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\EventDataAttribute.cs (1)
18: Attribute
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\EventFieldAttribute.cs (1)
36: Attribute
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\EventIgnoreAttribute.cs (1)
15: Attribute
System.Private.CoreLib.Generators (12)
System.Private.StackTraceMetadata (2)
System.Private.TypeLoader (1)
System.Private.Windows.Core.TestUtilities (1)
System.Private.Xml (23)
System.Runtime.CompilerServices.VisualC (7)
System.Runtime.InteropServices (18)
System.Runtime.InteropServices.JavaScript (3)
System.Runtime.Serialization.Primitives (7)
System.ServiceModel.Primitives (27)
System.ServiceModel.Primitives.Tests (2)
System.Text.Json (2)
System.Text.Json.SourceGeneration (4)
System.Text.RegularExpressions (1)
System.Text.RegularExpressions.Generator (12)
System.Windows.Forms (7)
System.Windows.Forms.Design (1)
System.Xaml (23)
UnitTests.Common (1)
1 instantiation of Attribute
System.Runtime.InteropServices (1)
786 references to Attribute
Aspire.Dashboard.Tests (2)
Aspire.Hosting.RemoteHost.Tests (2)
ConfigurationSchemaGenerator.Tests (2)
dotnet-svcutil-lib (23)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SecurityAttributeGenerationHelper.cs (1)
13where T : Attribute
GenerateDocumentationAndConfigFiles (2)
illink (13)
Infrastructure.Tests (1)
Microsoft.AspNetCore.Components (2)
Microsoft.AspNetCore.Http.Extensions (1)
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
Microsoft.AspNetCore.Mvc.Core (6)
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
Microsoft.AspNetCore.Routing (3)
Microsoft.Build.Framework (1)
Microsoft.CodeAnalysis.Analyzers (2)
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
Microsoft.CodeAnalysis.CodeStyle (2)
Microsoft.CodeAnalysis.CSharp (2)
Microsoft.CodeAnalysis.Extensions.Package (2)
Microsoft.CodeAnalysis.Features (4)
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.CSharp (1)
Microsoft.Extensions.AI.Abstractions (2)
Microsoft.Extensions.DependencyInjection.Abstractions (3)
Microsoft.Gen.Logging.Generated.Tests (1)
Microsoft.Maui.Controls.DesignTools (2)
Microsoft.Maui.Controls.Xaml.DesignTools (1)
Microsoft.ML.Benchmarks.Tests (1)
Microsoft.ML.Core (1)
Microsoft.ML.Core.Tests (3)
Microsoft.ML.Data (12)
Microsoft.ML.DataView (2)
Microsoft.VisualStudio.TestPlatform.Common (3)
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (1)
Microsoft.VisualStudio.TestPlatform.ObjectModel (1)
mscorlib (1)
netstandard (1)
PresentationCore (4)
PresentationFramework (22)
ReachFramework (9)
Roslyn.Diagnostics.Analyzers (2)
System.ComponentModel.Annotations (19)
System.ComponentModel.Composition (3)
System.ComponentModel.Composition.Registration (37)
System\ComponentModel\Composition\Registration\PartBuilder.cs (14)
13private static readonly List<Attribute> s_importingConstructorList = new List<Attribute>() { new ImportingConstructorAttribute() };
204foreach (Attribute attr in member.GetCustomAttributes(typeof(Attribute), false))
223internal IEnumerable<Attribute> BuildTypeAttributes(Type type)
225var attributes = new List<Attribute>();
335internal bool BuildConstructorAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers)
376internal static void BuildDefaultConstructorAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers)
386private static void ConfigureConstructorAttributes(ConstructorInfo constructorInfo, ref List<Tuple<object, List<Attribute>>> configuredMembers, Action<ParameterInfo, ImportBuilder> configureConstructorImports)
388configuredMembers ??= new List<Tuple<object, List<Attribute>>>();
410List<Attribute> attributes = null;
417internal void BuildPropertyAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers)
423List<Attribute> attributes = null;
503configuredMembers ??= new List<Tuple<object, List<Attribute>>>();
System.ComponentModel.TypeConverter (172)
System\ComponentModel\TypeConverter.cs (4)
239return GetProperties(context, value, new Attribute[] { BrowsableAttribute.Yes });
249public virtual PropertyDescriptorCollection? GetProperties(ITypeDescriptorContext? context, object value, Attribute[]? attributes)
349protected SimplePropertyDescriptor(Type componentType, string name, Type propertyType) : this(componentType, name, propertyType, Array.Empty<Attribute>())
356protected SimplePropertyDescriptor(Type componentType, string name, Type propertyType, Attribute[]? attributes) : base(name, attributes)
System\ComponentModel\TypeDescriptor.cs (45)
199public static TypeDescriptionProvider AddAttributes(Type type, params Attribute[] attributes)
221public static TypeDescriptionProvider AddAttributes(object instance, params Attribute[] attributes)
464params Attribute[] attributes)
476params Attribute[] attributes)
524params Attribute[] attributes)
537params Attribute[] attributes)
570private static ArrayList? FilterMembers(IList members, Attribute[] attributes)
785Attribute[] attrArray = new Attribute[results.Count];
1128Attribute[] attributes)
1176public static EventDescriptorCollection GetEvents(object component, Attribute[] attributes)
1187public static EventDescriptorCollection GetEvents(object component, Attribute[]? attributes, bool noCustomTypeDesc)
1365Attribute[]? attributes)
1422public static PropertyDescriptorCollection GetProperties(object component, Attribute[]? attributes)
1433public static PropertyDescriptorCollection GetProperties(object component, Attribute[]? attributes, bool noCustomTypeDesc)
1444private static PropertyDescriptorCollection GetPropertiesImpl(object component, Attribute[]? attributes, bool noCustomTypeDesc, bool noAttributes)
1883private static ICollection PipelineAttributeFilter(int pipelineType, ICollection members, Attribute[]? filter, IDictionary? cache)
2002foreach (Attribute attr in members)
2097Attribute[] attrArray = new Attribute[list.Count];
2104throw new ArgumentException(SR.Format(SR.TypeDescriptorExpectedElementType, typeof(Attribute).FullName));
2259Attribute[] attrArray = new Attribute[list.Count];
2725private static bool ShouldHideMember(MemberDescriptor? member, Attribute? attribute)
2732Attribute? memberAttribute = member.Attributes[attribute.GetType()];
2846EventDescriptorCollection ICustomTypeDescriptor.GetEvents(Attribute[]? attributes)
2858PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties(Attribute[]? attributes)
2874private readonly Attribute[] _attrs;
2879internal AttributeProvider(TypeDescriptionProvider existingProvider, params Attribute[] attrs) : base(existingProvider)
2897private readonly Attribute[] _attributeArray;
2903internal AttributeTypeDescriptor(Attribute[] attrs, ICustomTypeDescriptor? parent) : base(parent)
2916Attribute[]? finalAttr;
2918Attribute[] newAttrs = _attributeArray;
2919Attribute[] newArray = new Attribute[existing.Count + newAttrs.Length];
2949finalAttr = new Attribute[actualCount];
2969private readonly Attribute[] _filter;
2972internal AttributeFilterCacheItem(Attribute[] filter, ICollection filteredMembers)
2978internal bool IsValid(Attribute[] filter)
3177EventDescriptorCollection ICustomTypeDescriptor.GetEvents(Attribute[]? attributes)
3201PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties(Attribute[]? attributes)
3652EventDescriptorCollection ICustomTypeDescriptor.GetEvents(Attribute[]? attributes)
3722PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties(Attribute[]? attributes)
4063public EventDescriptorCollection GetEvents(Attribute[]? attributes)
4149public PropertyDescriptorCollection GetProperties(Attribute[]? attributes)
System.Composition.AttributedModel (2)
System.Composition.Convention (50)
System\Composition\Convention\ConventionBuilder.cs (25)
19private readonly Dictionary<MemberInfo, List<Attribute>> _memberInfos = new Dictionary<MemberInfo, List<Attribute>>();
20private readonly Dictionary<ParameterInfo, List<Attribute>> _parameters = new Dictionary<ParameterInfo, List<Attribute>>();
114private List<Tuple<object, List<Attribute>>> EvaluateThisTypeInfoAgainstTheConvention(TypeInfo typeInfo)
116List<Attribute> attributes = new List<Attribute>();
117var configuredMembers = new List<Tuple<object, List<Attribute>>>();
147public override IEnumerable<Attribute> GetCustomAttributes(Type reflectedType, System.Reflection.MemberInfo member)
152List<Attribute> cachedAttributes = null;
174List<Attribute> attributeList;
175foreach (Tuple<object, List<Attribute>> element in EvaluateThisTypeInfoAgainstTheConvention(typeInfo))
185if (!_memberInfos.TryGetValue(mi, out List<Attribute> memberAttributes))
200if (!_parameters.TryGetValue(pi, out List<Attribute> parameterAttributes))
223IEnumerable<Attribute> appliedAttributes;
225appliedAttributes = Enumerable.Empty<Attribute>();
227appliedAttributes = member.GetCustomAttributes<Attribute>(false);
232private List<Attribute> ReadMemberCustomAttributes(Type reflectedType, System.Reflection.MemberInfo member)
234List<Attribute> cachedAttributes = null;
284public override IEnumerable<Attribute> GetCustomAttributes(Type reflectedType, System.Reflection.ParameterInfo parameter)
288IEnumerable<Attribute> attributes = parameter.GetCustomAttributes<Attribute>(false);
289List<Attribute> cachedAttributes = ReadParameterCustomAttributes(reflectedType, parameter);
293private List<Attribute> ReadParameterCustomAttributes(Type reflectedType, System.Reflection.ParameterInfo parameter)
295List<Attribute> cachedAttributes = null;
System\Composition\Convention\PartConventionBuilder.cs (20)
17private static List<Attribute> s_onImportsSatisfiedAttributeList;
18private static readonly List<Attribute> s_importingConstructorList = new List<Attribute>() { new ImportingConstructorAttribute() };
401foreach (Attribute attr in member.GetCustomAttributes<Attribute>(false))
420internal IEnumerable<Attribute> BuildTypeAttributes(Type type)
422var attributes = new List<Attribute>();
529internal bool BuildConstructorAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers)
537Attribute[] attributes = Attribute.GetCustomAttributes(ci, typeof(ImportingConstructorAttribute), false);
567internal static void BuildDefaultConstructorAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers)
577private static void ConfigureConstructorAttributes(ConstructorInfo constructorInfo, ref List<Tuple<object, List<Attribute>>> configuredMembers, Action<ParameterInfo, ImportConventionBuilder> configureConstructorImports)
579configuredMembers ??= new List<Tuple<object, List<Attribute>>>();
601List<Attribute> attributes = null;
608internal void BuildOnImportsSatisfiedNotification(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers)
646var onImportsSatisfiedAttributeList = new List<Attribute>
652configuredMembers.Add(new Tuple<object, List<Attribute>>(mi, s_onImportsSatisfiedAttributeList));
662internal void BuildPropertyAttributes(Type type, ref List<Tuple<object, List<Attribute>>> configuredMembers)
668List<Attribute> attributes = null;
748configuredMembers ??= new List<Tuple<object, List<Attribute>>>();
System.Composition.TypedParts (15)
System\Composition\Convention\AttributedModelProviderExtensions.cs (7)
14public static TAttribute GetDeclaredAttribute<TAttribute>(this AttributedModelProvider convention, Type reflectedType, MemberInfo member) where TAttribute : Attribute
19public static Attribute[] GetDeclaredAttributes(this AttributedModelProvider convention, Type reflectedType, MemberInfo member)
24public static TAttribute[] GetDeclaredAttributes<TAttribute>(this AttributedModelProvider convention, Type reflectedType, MemberInfo member) where TAttribute : Attribute
29public static TAttribute GetDeclaredAttribute<TAttribute>(this AttributedModelProvider convention, Type reflectedType, ParameterInfo parameter) where TAttribute : Attribute
34public static Attribute[] GetDeclaredAttributes(this AttributedModelProvider convention, Type reflectedType, ParameterInfo parameter)
36return convention.GetCustomAttributes(reflectedType, parameter).OfType<Attribute>().ToArray();
39public static TAttribute[] GetDeclaredAttributes<TAttribute>(this AttributedModelProvider convention, Type reflectedType, ParameterInfo parameter) where TAttribute : Attribute
System.Configuration.ConfigurationManager (12)
System.Data.Common (23)
System.DirectoryServices.AccountManagement (5)
System.Drawing.Common (2)
System.Private.CoreLib (99)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeExtensions.cs (54)
11public static Attribute? GetCustomAttribute(this Assembly element, Type attributeType)
13return Attribute.GetCustomAttribute(element, attributeType);
15public static Attribute? GetCustomAttribute(this Module element, Type attributeType)
17return Attribute.GetCustomAttribute(element, attributeType);
19public static Attribute? GetCustomAttribute(this MemberInfo element, Type attributeType)
21return Attribute.GetCustomAttribute(element, attributeType);
23public static Attribute? GetCustomAttribute(this ParameterInfo element, Type attributeType)
25return Attribute.GetCustomAttribute(element, attributeType);
28public static T? GetCustomAttribute<T>(this Assembly element) where T : Attribute
32public static T? GetCustomAttribute<T>(this Module element) where T : Attribute
36public static T? GetCustomAttribute<T>(this MemberInfo element) where T : Attribute
40public static T? GetCustomAttribute<T>(this ParameterInfo element) where T : Attribute
45public static Attribute? GetCustomAttribute(this MemberInfo element, Type attributeType, bool inherit)
47return Attribute.GetCustomAttribute(element, attributeType, inherit);
49public static Attribute? GetCustomAttribute(this ParameterInfo element, Type attributeType, bool inherit)
51return Attribute.GetCustomAttribute(element, attributeType, inherit);
54public static T? GetCustomAttribute<T>(this MemberInfo element, bool inherit) where T : Attribute
58public static T? GetCustomAttribute<T>(this ParameterInfo element, bool inherit) where T : Attribute
65public static IEnumerable<Attribute> GetCustomAttributes(this Assembly element)
67return Attribute.GetCustomAttributes(element);
69public static IEnumerable<Attribute> GetCustomAttributes(this Module element)
71return Attribute.GetCustomAttributes(element);
73public static IEnumerable<Attribute> GetCustomAttributes(this MemberInfo element)
75return Attribute.GetCustomAttributes(element);
77public static IEnumerable<Attribute> GetCustomAttributes(this ParameterInfo element)
79return Attribute.GetCustomAttributes(element);
82public static IEnumerable<Attribute> GetCustomAttributes(this MemberInfo element, bool inherit)
84return Attribute.GetCustomAttributes(element, inherit);
86public static IEnumerable<Attribute> GetCustomAttributes(this ParameterInfo element, bool inherit)
88return Attribute.GetCustomAttributes(element, inherit);
93public static IEnumerable<Attribute> GetCustomAttributes(this Assembly element, Type attributeType)
95return Attribute.GetCustomAttributes(element, attributeType);
97public static IEnumerable<Attribute> GetCustomAttributes(this Module element, Type attributeType)
99return Attribute.GetCustomAttributes(element, attributeType);
101public static IEnumerable<Attribute> GetCustomAttributes(this MemberInfo element, Type attributeType)
103return Attribute.GetCustomAttributes(element, attributeType);
105public static IEnumerable<Attribute> GetCustomAttributes(this ParameterInfo element, Type attributeType)
107return Attribute.GetCustomAttributes(element, attributeType);
110public static IEnumerable<T> GetCustomAttributes<T>(this Assembly element) where T : Attribute
114public static IEnumerable<T> GetCustomAttributes<T>(this Module element) where T : Attribute
118public static IEnumerable<T> GetCustomAttributes<T>(this MemberInfo element) where T : Attribute
122public static IEnumerable<T> GetCustomAttributes<T>(this ParameterInfo element) where T : Attribute
127public static IEnumerable<Attribute> GetCustomAttributes(this MemberInfo element, Type attributeType, bool inherit)
129return Attribute.GetCustomAttributes(element, attributeType, inherit);
131public static IEnumerable<Attribute> GetCustomAttributes(this ParameterInfo element, Type attributeType, bool inherit)
133return Attribute.GetCustomAttributes(element, attributeType, inherit);
136public static IEnumerable<T> GetCustomAttributes<T>(this MemberInfo element, bool inherit) where T : Attribute
140public static IEnumerable<T> GetCustomAttributes<T>(this ParameterInfo element, bool inherit) where T : Attribute
149return Attribute.IsDefined(element, attributeType);
153return Attribute.IsDefined(element, attributeType);
157return Attribute.IsDefined(element, attributeType);
161return Attribute.IsDefined(element, attributeType);
166return Attribute.IsDefined(element, attributeType, inherit);
170return Attribute.IsDefined(element, attributeType, inherit);
System\Reflection\Attribute.NativeAot.cs (30)
15public static Attribute GetCustomAttribute(Assembly element, Type attributeType)
19public static Attribute GetCustomAttribute(Assembly element, Type attributeType, bool inherit) => GetCustomAttribute(element, attributeType); // "inherit" is meaningless for assemblies
21public static Attribute GetCustomAttribute(MemberInfo element, Type attributeType) => GetCustomAttribute(element, attributeType, inherit: true);
22public static Attribute GetCustomAttribute(MemberInfo element, Type attributeType, bool inherit)
27public static Attribute GetCustomAttribute(Module element, Type attributeType)
31public static Attribute GetCustomAttribute(Module element, Type attributeType, bool inherit) => GetCustomAttribute(element, attributeType); // "inherit" is meaningless for modules
33public static Attribute GetCustomAttribute(ParameterInfo element, Type attributeType) => CustomAttributeExtensions.GetCustomAttribute(element, attributeType, inherit: true);
34public static Attribute GetCustomAttribute(ParameterInfo element, Type attributeType, bool inherit)
39public static Attribute[] GetCustomAttributes(Assembly element)
44public static Attribute[] GetCustomAttributes(Assembly element, bool inherit) => GetCustomAttributes(element); // "inherit" is meaningless for assemblies
45public static Attribute[] GetCustomAttributes(Assembly element, Type attributeType)
49public static Attribute[] GetCustomAttributes(Assembly element, Type attributeType, bool inherit) => GetCustomAttributes(element, attributeType); // "inherit" is meaningless for modules
51public static Attribute[] GetCustomAttributes(MemberInfo element) => GetCustomAttributes(element, inherit: true);
52public static Attribute[] GetCustomAttributes(MemberInfo element, bool inherit)
57public static Attribute[] GetCustomAttributes(MemberInfo element, Type attributeType) => GetCustomAttributes(element, attributeType, inherit: true);
58public static Attribute[] GetCustomAttributes(MemberInfo element, Type attributeType, bool inherit)
63public static Attribute[] GetCustomAttributes(Module element)
68public static Attribute[] GetCustomAttributes(Module element, bool inherit) => GetCustomAttributes(element); // "inherit" is meaningless for assemblies
69public static Attribute[] GetCustomAttributes(Module element, Type attributeType)
73public static Attribute[] GetCustomAttributes(Module element, Type attributeType, bool inherit) => GetCustomAttributes(element, attributeType); // "inherit" is meaningless for modules
75public static Attribute[] GetCustomAttributes(ParameterInfo element) => GetCustomAttributes(element, inherit: true);
76public static Attribute[] GetCustomAttributes(ParameterInfo element, bool inherit)
81public static Attribute[] GetCustomAttributes(ParameterInfo element, Type attributeType) => GetCustomAttributes(element, attributeType, inherit: true);
82public static Attribute[] GetCustomAttributes(ParameterInfo element, Type attributeType, bool inherit)
118private static Attribute OneOrNull(IEnumerable<CustomAttributeData> results)
136private static Attribute[] Instantiate(IEnumerable<CustomAttributeData> cads, Type actualElementType)
138ArrayBuilder<Attribute> attributes = default;
141Attribute instantiatedAttribute = cad.Instantiate();
151Attribute[] result = (Attribute[])Array.CreateInstance(actualElementType, attributes.Count);
System.Private.Windows.Core.TestUtilities (1)
System.Reflection.Context (19)
System.Reflection.DispatchProxy (1)
src\runtime\src\libraries\Common\src\System\Reflection\Emit\IgnoreAccessChecksToAttributeBuilder.cs (1)
24typeof(Attribute));
System.Runtime (1)
System.Runtime.InteropServices (4)
System.Runtime.Serialization.Formatters (1)
System.ServiceModel.Primitives (5)
System.Text.Json (6)
System.Windows.Forms (82)
System.Windows.Forms.Design (51)
System.Windows.Forms.Primitives (6)
System.Xaml (16)