1694 types derived from Attribute
aspire (3)
Aspire.Acquisition.Tests (1)
Aspire.Azure.AI.Inference (2)
Aspire.Azure.AI.Inference.Tests (1)
Aspire.Azure.AI.OpenAI (2)
Aspire.Azure.AI.OpenAI.Tests (1)
Aspire.Azure.Data.Tables (2)
Aspire.Azure.Data.Tables.Tests (1)
Aspire.Azure.Messaging.EventHubs (2)
Aspire.Azure.Messaging.EventHubs.Tests (1)
Aspire.Azure.Messaging.ServiceBus (2)
Aspire.Azure.Messaging.ServiceBus.Tests (1)
Aspire.Azure.Messaging.WebPubSub (2)
Aspire.Azure.Messaging.WebPubSub.Tests (1)
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (1)
Aspire.Azure.Npgsql.Tests (1)
Aspire.Azure.Search.Documents (2)
Aspire.Azure.Search.Documents.Tests (1)
Aspire.Azure.Security.KeyVault (2)
Aspire.Azure.Security.KeyVault.Tests (1)
Aspire.Azure.Storage.Blobs (2)
Aspire.Azure.Storage.Blobs.Tests (1)
Aspire.Azure.Storage.Files.DataLake (2)
Aspire.Azure.Storage.Files.DataLake.Tests (1)
Aspire.Azure.Storage.Queues (2)
Aspire.Azure.Storage.Queues.Tests (1)
Aspire.Cli.EndToEnd.Tests (1)
Aspire.Cli.Tests (2)
Aspire.Confluent.Kafka.Tests (1)
Aspire.Dashboard (2)
Aspire.Dashboard.Components.Tests (2)
Aspire.Dashboard.Tests (2)
Aspire.Deployment.EndToEnd.Tests (1)
Aspire.EndToEnd.Tests (1)
Aspire.Hosting (9)
Aspire.Hosting.Analyzers (11)
Aspire.Hosting.Analyzers.Tests (1)
Aspire.Hosting.Azure.Kubernetes.Tests (1)
Aspire.Hosting.Azure.Kusto.Tests (1)
Aspire.Hosting.Azure.Provisioning.Generators (11)
Aspire.Hosting.Azure.Provisioning.Tests (1)
Aspire.Hosting.Azure.Tests (1)
Aspire.Hosting.Blazor.Tests (1)
Aspire.Hosting.Browsers.Tests (1)
Aspire.Hosting.CodeGeneration.Go.Tests (1)
Aspire.Hosting.CodeGeneration.Java.Tests (1)
Aspire.Hosting.CodeGeneration.Python.Tests (1)
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
Aspire.Hosting.Containers.Tests (1)
Aspire.Hosting.DevTunnels.Tests (1)
Aspire.Hosting.Docker.Tests (1)
Aspire.Hosting.Dotnet.Tests (1)
Aspire.Hosting.DotnetTool.Tests (1)
Aspire.Hosting.EntityFrameworkCore.Tests (1)
Aspire.Hosting.Foundry.Tests (1)
Aspire.Hosting.Garnet.Tests (1)
Aspire.Hosting.Go.Tests (1)
Aspire.Hosting.Integration.Analyzers (11)
Aspire.Hosting.Java.Tests (1)
Aspire.Hosting.JavaScript.Tests (1)
Aspire.Hosting.Kafka.Tests (1)
Aspire.Hosting.Keycloak.Tests (1)
Aspire.Hosting.Kubernetes (1)
Aspire.Hosting.Kubernetes.Tests (1)
Aspire.Hosting.Maui.Tests (1)
Aspire.Hosting.Milvus.Tests (1)
Aspire.Hosting.MongoDB.Tests (1)
Aspire.Hosting.MySql.Tests (1)
Aspire.Hosting.Nats.Tests (1)
Aspire.Hosting.OpenAI.Tests (1)
Aspire.Hosting.Oracle.Tests (1)
Aspire.Hosting.Orleans.Tests (1)
Aspire.Hosting.PostgreSQL.Tests (1)
Aspire.Hosting.Python (1)
Aspire.Hosting.Python.Tests (1)
Aspire.Hosting.Qdrant.Tests (1)
Aspire.Hosting.RabbitMQ.Tests (1)
Aspire.Hosting.Radius.Tests (1)
Aspire.Hosting.Redis.Tests (1)
Aspire.Hosting.RemoteHost.Tests (5)
Aspire.Hosting.Rust.Tests (1)
Aspire.Hosting.Sdk.Tests (1)
Aspire.Hosting.Seq.Tests (1)
Aspire.Hosting.SqlServer.Tests (1)
Aspire.Hosting.Testing.Tests (2)
Aspire.Hosting.Tests (1)
Aspire.Hosting.TestUtilities (1)
Aspire.Hosting.Valkey.Tests (1)
Aspire.Hosting.Yarp.Tests (1)
Aspire.Keycloak.Authentication.Tests (1)
Aspire.Managed.Tests (1)
Aspire.Microsoft.Azure.Cosmos (2)
Aspire.Microsoft.Azure.Cosmos.Tests (1)
Aspire.Microsoft.Azure.StackExchangeRedis.Tests (1)
Aspire.Microsoft.Data.SqlClient (2)
Aspire.Microsoft.Data.SqlClient.Tests (1)
Aspire.Microsoft.EntityFrameworkCore.Cosmos (2)
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (1)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (2)
Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests (1)
Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration (2)
Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests (1)
Aspire.Milvus.Client (2)
Aspire.Milvus.Client.Tests (1)
Aspire.MongoDB.Driver (2)
Aspire.MongoDB.Driver.Tests (1)
Aspire.MongoDB.Driver.v2.Tests (1)
Aspire.MongoDB.EntityFrameworkCore (2)
Aspire.MongoDB.EntityFrameworkCore.Tests (1)
Aspire.MySqlConnector (2)
Aspire.MySqlConnector.Tests (1)
Aspire.NATS.Net (2)
Aspire.NATS.Net.Tests (1)
Aspire.Npgsql (2)
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL (2)
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (1)
Aspire.Npgsql.Tests (1)
Aspire.OpenAI (2)
Aspire.OpenAI.Tests (1)
Aspire.Oracle.EntityFrameworkCore (2)
Aspire.Oracle.EntityFrameworkCore.Tests (1)
Aspire.Playground.Tests (6)
Aspire.Pomelo.EntityFrameworkCore.MySql (2)
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (1)
Aspire.Qdrant.Client (2)
Aspire.Qdrant.Client.Tests (1)
Aspire.RabbitMQ.Client (2)
Aspire.RabbitMQ.Client.Tests (1)
Aspire.RabbitMQ.Client.v6.Tests (1)
Aspire.Seq (2)
Aspire.Seq.Tests (1)
Aspire.StackExchange.Redis (2)
Aspire.StackExchange.Redis.DistributedCaching (2)
Aspire.StackExchange.Redis.DistributedCaching.Tests (1)
Aspire.StackExchange.Redis.OutputCaching (2)
Aspire.StackExchange.Redis.OutputCaching.Tests (1)
Aspire.StackExchange.Redis.Tests (1)
Aspire.Templates.Tests (1)
Aspire.TerminalHost (1)
Aspire.TerminalHost.Tests (1)
Aspire.TestUtilities (4)
BlazorHosted (2)
BlazorHosted.Client (2)
BlazorStandalone (2)
CodeStyleConfigFileGenerator (2)
ConfigurationSchemaGenerator.Tests (3)
dotnet-Microsoft.XmlSerializer.Generator (14)
dotnet-openapi (1)
dotnet-svcutil-lib (64)
dotnet-user-jwts (1)
DotNetWatchTasks (2)
EventSourceGenerator (12)
GenerateDocumentationAndConfigFiles (5)
ILCompiler.Build.Tasks (2)
ILCompiler.Compiler (3)
ILCompiler.ReadyToRun (1)
illink (5)
ILLink.RoslynAnalyzer (14)
Infrastructure.Common (2)
Infrastructure.Tests (1)
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 (16)
Microsoft.AspNetCore.Components.AI (3)
Microsoft.AspNetCore.Components.AI.SourceGenerators (11)
Microsoft.AspNetCore.Components.Analyzers (11)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.Server (1)
Microsoft.AspNetCore.Components.Testing (1)
Microsoft.AspNetCore.Components.Testing.Generators (11)
Microsoft.AspNetCore.Components.Testing.NativeAot (11)
Microsoft.AspNetCore.Components.Web (1)
Microsoft.AspNetCore.Cors (2)
Microsoft.AspNetCore.DataProtection (1)
Microsoft.AspNetCore.DataProtection.MicroBenchmarks (1)
Microsoft.AspNetCore.Hosting.Abstractions (1)
Microsoft.AspNetCore.Http (2)
Microsoft.AspNetCore.Http.Abstractions (1)
Microsoft.AspNetCore.Http.Extensions (5)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (11)
Microsoft.AspNetCore.HttpLogging (1)
Microsoft.AspNetCore.Identity (4)
Microsoft.AspNetCore.Identity.UI (2)
Microsoft.AspNetCore.InternalTesting (19)
Microsoft.AspNetCore.Mvc.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.Testing (1)
Microsoft.AspNetCore.Mvc.Testing.Tasks (11)
Microsoft.AspNetCore.Mvc.ViewFeatures (11)
Microsoft.AspNetCore.OpenApi (1)
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 (5)
Microsoft.AspNetCore.Server.IIS (1)
Microsoft.AspNetCore.Server.IntegrationTesting (3)
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (11)
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 (24)
Microsoft.CodeAnalysis.AnalyzerUtilities (24)
Microsoft.CodeAnalysis.BuildClient.Package (1)
Microsoft.CodeAnalysis.CodeStyle (24)
Microsoft.CodeAnalysis.Extensions.Package (22)
Microsoft.CodeAnalysis.NetAnalyzers (12)
Microsoft.CodeAnalysis.ResxSourceGenerator (24)
Microsoft.CodeAnalysis.Workspaces (7)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (2)
Microsoft.Diagnostics.DataContractReader.Abstractions (11)
Microsoft.Diagnostics.DataContractReader.Contracts (1)
Microsoft.Extensions.AI.Abstractions (2)
Microsoft.Extensions.Compliance.Abstractions (1)
Microsoft.Extensions.Configuration.Abstractions (2)
Microsoft.Extensions.Configuration.Binder.SourceGeneration (15)
Microsoft.Extensions.Configuration.UserSecrets (1)
Microsoft.Extensions.DependencyInjection.Abstractions (3)
Microsoft.Extensions.FileProviders.Embedded.Manifest.Task (11)
Microsoft.Extensions.Http.Polly (11)
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 (1)
Microsoft.Extensions.Telemetry.Abstractions (11)
Microsoft.Extensions.Validation (2)
Microsoft.Extensions.Validation.ValidationsGenerator (11)
Microsoft.Extensions.VectorData.Abstractions (3)
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 (18)
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 (34)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Windows.Win32.UnscopedRefAttribute.g.cs (1)
22 :Attribute {
Microsoft.TestPlatform.CommunicationUtilities (1)
Microsoft.TestPlatform.Extensions.BlameDataCollector (1)
Microsoft.TestPlatform.Filter.Source (1)
Microsoft.TestPlatform.TestHostRuntimeProvider (1)
Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger (1)
Microsoft.VisualStudio.TestPlatform.Extensions.TestIds.TestLogger (1)
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (2)
Microsoft.VisualStudio.TestPlatform.ObjectModel (10)
Microsoft.Web.Xdt.Extensions (1)
PresentationCore (3)
PresentationFramework (10)
QuarantineTools.Tests (1)
Roslyn.Diagnostics.Analyzers (24)
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.IO.Pipelines (1)
System.Linq.Expressions (1)
System.Net.Http (1)
System.Net.Quic (1)
System.Net.Security (1)
System.Net.WebSockets (1)
System.ObjectModel (3)
System.Private.CoreLib (240)
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 (2)
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 (28)
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)
Testing.Tests (1)
UnitTests.Common (1)
1 instantiation of Attribute
System.Runtime.InteropServices (1)
890 references to Attribute
Aspire.Dashboard.Tests (2)
Aspire.Hosting.Blazor (1)
Aspire.Hosting.RemoteHost.Tests (2)
Aspire.Hosting.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.Identity.EntityFrameworkCore (6)
Microsoft.AspNetCore.Identity.UI (2)
Microsoft.AspNetCore.Mvc.ApiExplorer (2)
Microsoft.AspNetCore.Mvc.Core (6)
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
Microsoft.AspNetCore.OpenApi (4)
Microsoft.AspNetCore.Routing (4)
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 (2)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.CSharp (1)
Microsoft.Extensions.AI.Abstractions (2)
Microsoft.Extensions.DependencyInjection.Abstractions (3)
Microsoft.Extensions.VectorData.Abstractions (1)
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.VisualBasic.Forms (4)
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.Private.CoreLib (184)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Attribute.cs (93)
149private static Attribute[] InternalGetCustomAttributes(PropertyInfo element, Type type, bool inherit)
153Debug.Assert(type.IsSubclassOf(typeof(Attribute)) || type == typeof(Attribute));
156Attribute[] attributes = (Attribute[])element.GetCustomAttributes(type, inherit);
171List<Attribute> attributeList = new List<Attribute>();
181Attribute[] array = CreateAttributeArrayHelper(type, attributeList.Count);
253private static Attribute[] InternalGetCustomAttributes(EventInfo element, Type type, bool inherit)
257Debug.Assert(type.IsSubclassOf(typeof(Attribute)) || type == typeof(Attribute));
260Attribute[] attributes = (Attribute[])element.GetCustomAttributes(type, inherit);
275List<Attribute> attributeList = new List<Attribute>();
285Attribute[] array = CreateAttributeArrayHelper(type, attributeList.Count);
370private static Attribute[] InternalParamGetCustomAttributes(ParameterInfo param, Type? type, bool inherit)
384type ??= typeof(Attribute);
397Attribute[] ret;
401ret = (Attribute[])objAttr;
432Attribute[] attributes = CreateAttributeArrayHelper(type, count);
439attributes[count] = (Attribute)attr;
444Attribute[] temp = ret;
487if ((objAttr[i] is Attribute) && (attribUsage.Inherited))
500private static void CopyToAttributeList(List<Attribute> attributeList, Attribute[] attributes, Dictionary<Type, AttributeUsageAttribute> types)
530private static void AddAttributesToList(List<Attribute> attributeList, Attribute[] attributes, Dictionary<Type, AttributeUsageAttribute> types)
571private static Attribute[] CreateAttributeArrayHelper(Type elementType, int elementCount) =>
572elementType.ContainsGenericParameters ? new Attribute[elementCount] : (Attribute[])Array.CreateInstance(elementType, elementCount);
580public static Attribute[] GetCustomAttributes(MemberInfo element, Type attributeType)
585public static Attribute[] GetCustomAttributes(MemberInfo element, Type attributeType, bool inherit)
590if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
597_ => (Attribute[])element.GetCustomAttributes(attributeType, inherit)
601public static Attribute[] GetCustomAttributes(MemberInfo element)
606public static Attribute[] GetCustomAttributes(MemberInfo element, bool inherit)
612MemberTypes.Property => InternalGetCustomAttributes((PropertyInfo)element, typeof(Attribute), inherit),
613MemberTypes.Event => InternalGetCustomAttributes((EventInfo)element, typeof(Attribute), inherit),
614_ => (Attribute[])element.GetCustomAttributes(typeof(Attribute), inherit)
629if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
640public static Attribute? GetCustomAttribute(MemberInfo element, Type attributeType)
645public static Attribute? GetCustomAttribute(MemberInfo element, Type attributeType, bool inherit)
647Attribute[] attrib = GetCustomAttributes(element, attributeType, inherit);
652Attribute match = attrib[0];
662public static Attribute[] GetCustomAttributes(ParameterInfo element)
667public static Attribute[] GetCustomAttributes(ParameterInfo element, Type attributeType)
672public static Attribute[] GetCustomAttributes(ParameterInfo element, Type attributeType, bool inherit)
677if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
687return (Attribute[])element.GetCustomAttributes(attributeType, inherit);
690public static Attribute[] GetCustomAttributes(ParameterInfo element, bool inherit)
701return (Attribute[])element.GetCustomAttributes(typeof(Attribute), inherit);
716if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
738public static Attribute? GetCustomAttribute(ParameterInfo element, Type attributeType)
743public static Attribute? GetCustomAttribute(ParameterInfo element, Type attributeType, bool inherit)
747Attribute[] attrib = GetCustomAttributes(element, attributeType, inherit);
752Attribute match = attrib[0];
762public static Attribute[] GetCustomAttributes(Module element, Type attributeType)
767public static Attribute[] GetCustomAttributes(Module element)
772public static Attribute[] GetCustomAttributes(Module element, bool inherit)
776return (Attribute[])element.GetCustomAttributes(typeof(Attribute), inherit);
779public static Attribute[] GetCustomAttributes(Module element, Type attributeType, bool inherit)
784if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
787return (Attribute[])element.GetCustomAttributes(attributeType, inherit);
802if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
808public static Attribute? GetCustomAttribute(Module element, Type attributeType)
813public static Attribute? GetCustomAttribute(Module element, Type attributeType, bool inherit)
817Attribute[] attrib = GetCustomAttributes(element, attributeType, inherit);
822Attribute match = attrib[0];
832public static Attribute[] GetCustomAttributes(Assembly element, Type attributeType)
837public static Attribute[] GetCustomAttributes(Assembly element, Type attributeType, bool inherit)
842if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
845return (Attribute[])element.GetCustomAttributes(attributeType, inherit);
848public static Attribute[] GetCustomAttributes(Assembly element)
853public static Attribute[] GetCustomAttributes(Assembly element, bool inherit)
857return (Attribute[])element.GetCustomAttributes(typeof(Attribute), inherit);
872if (!attributeType.IsSubclassOf(typeof(Attribute)) && attributeType != typeof(Attribute))
878public static Attribute? GetCustomAttribute(Assembly element, Type attributeType)
883public static Attribute? GetCustomAttribute(Assembly element, Type attributeType, bool inherit)
887Attribute[] attrib = GetCustomAttributes(element, attributeType, inherit);
892Attribute match = attrib[0];
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.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.ServiceModel.Primitives.Tests (1)
System.Text.Json (6)
System.Windows.Forms (82)
System.Windows.Forms.Design (51)
System.Windows.Forms.Primitives (6)
System.Xaml (16)