diff --git a/csharp/extractor/Semmle.Extraction.CSharp.StubGenerator/StubVisitor.cs b/csharp/extractor/Semmle.Extraction.CSharp.StubGenerator/StubVisitor.cs index 664188c41c22..e29cd532a5ce 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.StubGenerator/StubVisitor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.StubGenerator/StubVisitor.cs @@ -186,7 +186,8 @@ private void StubTypedConstant(TypedConstant c) } break; case TypedConstantKind.Enum: - stubWriter.Write("throw null"); + stubWriter.Write($"({c.Type!.GetQualifiedName()}) "); + stubWriter.Write(c.Value!.ToString()); break; case TypedConstantKind.Array: stubWriter.Write("new []{"); @@ -200,7 +201,8 @@ private void StubTypedConstant(TypedConstant c) } private static readonly HashSet attributeAllowList = new() { - "System.FlagsAttribute" + "System.FlagsAttribute", + "System.AttributeUsageAttribute" }; private void StubAttribute(AttributeData a, string prefix) @@ -219,6 +221,14 @@ private void StubAttribute(AttributeData a, string prefix) { stubWriter.Write("("); WriteCommaSep(a.ConstructorArguments, StubTypedConstant); + if (a.ConstructorArguments.Any() && a.NamedArguments.Any()) + stubWriter.Write(","); + WriteCommaSep(a.NamedArguments, arg => + { + stubWriter.Write(arg.Key); + stubWriter.Write(" = "); + StubTypedConstant(arg.Value); + }); stubWriter.Write(")"); } stubWriter.WriteLine("]"); diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs index 616385358b97..da6e78c128b4 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authorization.cs @@ -6,6 +6,7 @@ namespace AspNetCore { namespace Authorization { + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public class AllowAnonymousAttribute : System.Attribute, Microsoft.AspNetCore.Authorization.IAllowAnonymous { public AllowAnonymousAttribute() => throw null; @@ -120,6 +121,7 @@ public static partial class AuthorizationServiceExtensions public static System.Threading.Tasks.Task AuthorizeAsync(this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy) => throw null; public static System.Threading.Tasks.Task AuthorizeAsync(this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, string policyName) => throw null; } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = true, Inherited = true)] public class AuthorizeAttribute : System.Attribute, Microsoft.AspNetCore.Authorization.IAuthorizeData { public string AuthenticationSchemes { get => throw null; set { } } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs index 042e1a767545..b8b7c67eb2ae 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Web.cs @@ -6,6 +6,7 @@ namespace AspNetCore { namespace Components { + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = true, Inherited = true)] public sealed class BindInputElementAttribute : System.Attribute { public string ChangeAttribute { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs index 5015bd3a9f98..518725e9c7d5 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs @@ -73,6 +73,7 @@ public static class BindConverter public static bool TryConvertToTimeOnly(object obj, System.Globalization.CultureInfo culture, out System.TimeOnly value) => throw null; public static bool TryConvertToTimeOnly(object obj, System.Globalization.CultureInfo culture, string format, out System.TimeOnly value) => throw null; } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = true, Inherited = true)] public sealed class BindElementAttribute : System.Attribute { public string ChangeAttribute { get => throw null; } @@ -81,11 +82,13 @@ public sealed class BindElementAttribute : System.Attribute public string Suffix { get => throw null; } public string ValueAttribute { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = true)] public sealed class CascadingParameterAttribute : System.Attribute { public CascadingParameterAttribute() => throw null; public string Name { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = true, Inherited = false)] public sealed class CascadingTypeParameterAttribute : System.Attribute { public CascadingTypeParameterAttribute(string name) => throw null; @@ -161,6 +164,7 @@ public class DynamicComponent : Microsoft.AspNetCore.Components.IComponent public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) => throw null; public System.Type Type { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false)] public sealed class EditorRequiredAttribute : System.Attribute { public EditorRequiredAttribute() => throw null; @@ -300,6 +304,7 @@ public struct EventCallbackWorkItem public static readonly Microsoft.AspNetCore.Components.EventCallbackWorkItem Empty; public System.Threading.Tasks.Task InvokeAsync(object arg) => throw null; } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = true, Inherited = true)] public sealed class EventHandlerAttribute : System.Attribute { public string AttributeName { get => throw null; } @@ -336,6 +341,7 @@ public class ComponentStatePersistenceManager public Microsoft.AspNetCore.Components.PersistentComponentState State { get => throw null; } } } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = true)] public sealed class InjectAttribute : System.Attribute { public InjectAttribute() => throw null; @@ -345,6 +351,7 @@ public interface IPersistentComponentStateStore System.Threading.Tasks.Task> GetPersistedStateAsync(); System.Threading.Tasks.Task PersistStateAsync(System.Collections.Generic.IReadOnlyDictionary state); } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false, Inherited = true)] public sealed class LayoutAttribute : System.Attribute { public LayoutAttribute(System.Type layoutType) => throw null; @@ -447,6 +454,7 @@ public abstract class OwningComponentBase : Microsoft.AspNetCore.Compo protected OwningComponentBase() => throw null; protected TService Service { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = true)] public sealed class ParameterAttribute : System.Attribute { public bool CaptureUnmatchedValues { get => throw null; set { } } @@ -647,6 +655,7 @@ public enum RenderTreeFrameType : short Markup = 8, } } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = true, Inherited = false)] public sealed class RouteAttribute : System.Attribute { public RouteAttribute(string template) => throw null; @@ -714,6 +723,7 @@ public class Router : Microsoft.AspNetCore.Components.IComponent, System.IDispos public System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters) => throw null; } } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = true)] public sealed class SupplyParameterFromQueryAttribute : System.Attribute { public SupplyParameterFromQueryAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs index ccee0b3f9915..11e0b379bbb6 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs @@ -25,10 +25,12 @@ public class CorsPolicyMetadata : Microsoft.AspNetCore.Cors.Infrastructure.ICors public CorsPolicyMetadata(Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy policy) => throw null; public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy Policy { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = false)] public class DisableCorsAttribute : System.Attribute, Microsoft.AspNetCore.Cors.Infrastructure.ICorsMetadata, Microsoft.AspNetCore.Cors.Infrastructure.IDisableCorsAttribute { public DisableCorsAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public class EnableCorsAttribute : System.Attribute, Microsoft.AspNetCore.Cors.Infrastructure.ICorsMetadata, Microsoft.AspNetCore.Cors.Infrastructure.IEnableCorsAttribute { public EnableCorsAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs index e03088e509dd..ccc28330ad79 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs @@ -34,6 +34,7 @@ public static partial class HostingEnvironmentExtensions public static bool IsProduction(this Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment) => throw null; public static bool IsStaging(this Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment) => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false, AllowMultiple = true)] public sealed class HostingStartupAttribute : System.Attribute { public HostingStartupAttribute(System.Type hostingStartupType) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs index 392bccee3da1..9b767d8e4732 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs @@ -105,6 +105,7 @@ public interface ICorsMetadata } namespace Http { + [System.AttributeUsage((System.AttributeTargets)2048, Inherited = false, AllowMultiple = false)] public sealed class AsParametersAttribute : System.Attribute { public AsParametersAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs index b6f38080c296..51d392fd4711 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Extensions.cs @@ -6,11 +6,13 @@ namespace AspNetCore { namespace Http { + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false, AllowMultiple = false)] public sealed class EndpointDescriptionAttribute : System.Attribute, Microsoft.AspNetCore.Http.Metadata.IEndpointDescriptionMetadata { public EndpointDescriptionAttribute(string description) => throw null; public string Description { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false, AllowMultiple = false)] public sealed class EndpointSummaryAttribute : System.Attribute, Microsoft.AspNetCore.Http.Metadata.IEndpointSummaryMetadata { public EndpointSummaryAttribute(string summary) => throw null; @@ -195,6 +197,7 @@ public static partial class SessionExtensions public static void SetInt32(this Microsoft.AspNetCore.Http.ISession session, string key, int value) => throw null; public static void SetString(this Microsoft.AspNetCore.Http.ISession session, string key, string value) => throw null; } + [System.AttributeUsage((System.AttributeTargets)4164, Inherited = false, AllowMultiple = false)] public sealed class TagsAttribute : System.Attribute, Microsoft.AspNetCore.Http.Metadata.ITagsMetadata { public TagsAttribute(params string[] tags) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs index 2b69a8d7dd77..8f413e6dcdad 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Core.cs @@ -67,6 +67,7 @@ public class AcceptedResult : Microsoft.AspNetCore.Mvc.ObjectResult public string Location { get => throw null; set { } } public override void OnFormatting(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = true, Inherited = true)] public sealed class AcceptVerbsAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Routing.IActionHttpMethodProvider, Microsoft.AspNetCore.Mvc.Routing.IRouteTemplateProvider { public AcceptVerbsAttribute(string method) => throw null; @@ -80,6 +81,7 @@ public sealed class AcceptVerbsAttribute : System.Attribute, Microsoft.AspNetCor } namespace ActionConstraints { + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false, Inherited = true)] public abstract class ActionMethodSelectorAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraint, Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintMetadata { public bool Accept(Microsoft.AspNetCore.Mvc.ActionConstraints.ActionConstraintContext context) => throw null; @@ -96,10 +98,12 @@ public class HttpMethodActionConstraint : Microsoft.AspNetCore.Mvc.ActionConstra public int Order { get => throw null; } } } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = true)] public class ActionContextAttribute : System.Attribute { public ActionContextAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false, Inherited = true)] public sealed class ActionNameAttribute : System.Attribute { public ActionNameAttribute(string name) => throw null; @@ -138,15 +142,18 @@ public class ApiBehaviorOptions : System.Collections.Generic.IEnumerable throw null; set { } } public bool SuppressModelStateInvalidFilter { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)5, AllowMultiple = false, Inherited = true)] public class ApiControllerAttribute : Microsoft.AspNetCore.Mvc.ControllerAttribute, Microsoft.AspNetCore.Mvc.Infrastructure.IApiBehaviorMetadata, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata { public ApiControllerAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false, Inherited = true)] public sealed class ApiConventionMethodAttribute : System.Attribute { public System.Type ConventionType { get => throw null; } public ApiConventionMethodAttribute(System.Type conventionType, string methodName) => throw null; } + [System.AttributeUsage((System.AttributeTargets)5, AllowMultiple = true, Inherited = true)] public sealed class ApiConventionTypeAttribute : System.Attribute { public System.Type ConventionType { get => throw null; } @@ -159,6 +166,7 @@ public class ApiDescriptionActionData } namespace ApiExplorer { + [System.AttributeUsage((System.AttributeTargets)2112, AllowMultiple = false, Inherited = false)] public sealed class ApiConventionNameMatchAttribute : System.Attribute { public ApiConventionNameMatchAttribute(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiConventionNameMatchBehavior matchBehavior) => throw null; @@ -176,6 +184,7 @@ public sealed class ApiConventionResult public ApiConventionResult(System.Collections.Generic.IReadOnlyList responseMetadataProviders) => throw null; public System.Collections.Generic.IReadOnlyList ResponseMetadataProviders { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)2048, AllowMultiple = false, Inherited = false)] public sealed class ApiConventionTypeMatchAttribute : System.Attribute { public ApiConventionTypeMatchAttribute(Microsoft.AspNetCore.Mvc.ApiExplorer.ApiConventionTypeMatchBehavior matchBehavior) => throw null; @@ -216,6 +225,7 @@ public interface IApiResponseTypeMetadataProvider System.Collections.Generic.IReadOnlyList GetSupportedContentTypes(string contentType, System.Type objectType); } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public class ApiExplorerSettingsAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionGroupNameProvider, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionVisibilityProvider { public ApiExplorerSettingsAttribute() => throw null; @@ -442,6 +452,7 @@ public abstract class ApplicationPart protected ApplicationPart() => throw null; public abstract string Name { get; } } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = true)] public sealed class ApplicationPartAttribute : System.Attribute { public string AssemblyName { get => throw null; } @@ -494,12 +505,14 @@ public class NullApplicationPartFactory : Microsoft.AspNetCore.Mvc.ApplicationPa public NullApplicationPartFactory() => throw null; public override System.Collections.Generic.IEnumerable GetApplicationParts(System.Reflection.Assembly assembly) => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = false)] public sealed class ProvideApplicationPartFactoryAttribute : System.Attribute { public ProvideApplicationPartFactoryAttribute(System.Type factoryType) => throw null; public ProvideApplicationPartFactoryAttribute(string factoryTypeName) => throw null; public System.Type GetFactoryType() => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = true)] public sealed class RelatedAssemblyAttribute : System.Attribute { public string AssemblyFileName { get => throw null; } @@ -507,6 +520,7 @@ public sealed class RelatedAssemblyAttribute : System.Attribute public static System.Collections.Generic.IReadOnlyList GetRelatedAssemblies(System.Reflection.Assembly assembly, bool throwOnError) => throw null; } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public class AreaAttribute : Microsoft.AspNetCore.Mvc.Routing.RouteValueAttribute { public AreaAttribute(string areaName) : base(default(string), default(string)) => throw null; @@ -541,6 +555,7 @@ public class BadRequestResult : Microsoft.AspNetCore.Mvc.StatusCodeResult { public BadRequestResult() : base(default(int)) => throw null; } + [System.AttributeUsage((System.AttributeTargets)2052, AllowMultiple = false, Inherited = true)] public class BindAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IPropertyFilterProvider { public BindAttribute(params string[] include) => throw null; @@ -549,11 +564,13 @@ public class BindAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBin public string Prefix { get => throw null; set { } } public System.Func PropertyFilter { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false, Inherited = true)] public class BindPropertiesAttribute : System.Attribute { public BindPropertiesAttribute() => throw null; public bool SupportsGet { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = true)] public class BindPropertyAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IBinderTypeProviderMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider, Microsoft.AspNetCore.Mvc.ModelBinding.IRequestPredicateProvider { public System.Type BinderType { get => throw null; set { } } @@ -607,6 +624,7 @@ public class ConflictResult : Microsoft.AspNetCore.Mvc.StatusCodeResult { public ConflictResult() : base(default(int)) => throw null; } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public class ConsumesAttribute : System.Attribute, Microsoft.AspNetCore.Http.Metadata.IAcceptsMetadata, Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraint, Microsoft.AspNetCore.Mvc.ActionConstraints.IActionConstraintMetadata, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiRequestMetadataProvider, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IResourceFilter { public bool Accept(Microsoft.AspNetCore.Mvc.ActionConstraints.ActionConstraintContext context) => throw null; @@ -630,6 +648,7 @@ public class ContentResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.As public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; public int? StatusCode { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false, Inherited = true)] public class ControllerAttribute : System.Attribute { public ControllerAttribute() => throw null; @@ -817,6 +836,7 @@ public class ControllerContext : Microsoft.AspNetCore.Mvc.ActionContext public ControllerContext(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; public virtual System.Collections.Generic.IList ValueProviderFactories { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = true)] public class ControllerContextAttribute : System.Attribute { public ControllerContextAttribute() => throw null; @@ -1237,6 +1257,7 @@ public struct Enumerator : System.IDisposable, System.Collections.Generic.IEnume protected abstract System.Collections.Generic.KeyValuePair this[int index] { get; } } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public class DisableRequestSizeLimitAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Http.Metadata.IRequestSizeLimitMetadata { public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; @@ -1275,6 +1296,7 @@ public class FileStreamResult : Microsoft.AspNetCore.Mvc.FileResult } namespace Filters { + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = true, Inherited = true)] public abstract class ActionFilterAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IActionFilter, Microsoft.AspNetCore.Mvc.Filters.IAsyncActionFilter, Microsoft.AspNetCore.Mvc.Filters.IAsyncResultFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IResultFilter { protected ActionFilterAttribute() => throw null; @@ -1286,6 +1308,7 @@ public abstract class ActionFilterAttribute : System.Attribute, Microsoft.AspNet public virtual System.Threading.Tasks.Task OnResultExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext context, Microsoft.AspNetCore.Mvc.Filters.ResultExecutionDelegate next) => throw null; public int Order { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = true, Inherited = true)] public abstract class ExceptionFilterAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IAsyncExceptionFilter, Microsoft.AspNetCore.Mvc.Filters.IExceptionFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter { protected ExceptionFilterAttribute() => throw null; @@ -1313,6 +1336,7 @@ public static class FilterScope public static readonly int Global; public static readonly int Last; } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = true, Inherited = true)] public abstract class ResultFilterAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IAsyncResultFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IResultFilter { protected ResultFilterAttribute() => throw null; @@ -1334,6 +1358,7 @@ public class ForbidResult : Microsoft.AspNetCore.Mvc.ActionResult public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; public Microsoft.AspNetCore.Authentication.AuthenticationProperties Properties { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public class FormatFilterAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata { public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; @@ -1471,6 +1496,7 @@ public abstract class TextOutputFormatter : Microsoft.AspNetCore.Mvc.Formatters. public abstract System.Threading.Tasks.Task WriteResponseBodyAsync(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context, System.Text.Encoding selectedEncoding); } } + [System.AttributeUsage((System.AttributeTargets)2176, AllowMultiple = false, Inherited = true)] public class FromBodyAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata, Microsoft.AspNetCore.Http.Metadata.IFromBodyMetadata { bool Microsoft.AspNetCore.Http.Metadata.IFromBodyMetadata.AllowEmpty { get => throw null; } @@ -1478,30 +1504,35 @@ public class FromBodyAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Mode public FromBodyAttribute() => throw null; public Microsoft.AspNetCore.Mvc.ModelBinding.EmptyBodyBehavior EmptyBodyBehavior { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)2176, AllowMultiple = false, Inherited = true)] public class FromFormAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata, Microsoft.AspNetCore.Http.Metadata.IFromFormMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider { public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; } public FromFormAttribute() => throw null; public string Name { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)2176, AllowMultiple = false, Inherited = true)] public class FromHeaderAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata, Microsoft.AspNetCore.Http.Metadata.IFromHeaderMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider { public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; } public FromHeaderAttribute() => throw null; public string Name { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)2176, AllowMultiple = false, Inherited = true)] public class FromQueryAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata, Microsoft.AspNetCore.Http.Metadata.IFromQueryMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider { public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; } public FromQueryAttribute() => throw null; public string Name { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)2176, AllowMultiple = false, Inherited = true)] public class FromRouteAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata, Microsoft.AspNetCore.Http.Metadata.IFromRouteMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider { public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; } public FromRouteAttribute() => throw null; public string Name { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)2176, AllowMultiple = false, Inherited = true)] public class FromServicesAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata, Microsoft.AspNetCore.Http.Metadata.IFromServiceMetadata { public Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource BindingSource { get => throw null; } @@ -1565,10 +1596,12 @@ public abstract class ActionDescriptorCollectionProvider : Microsoft.AspNetCore. protected ActionDescriptorCollectionProvider() => throw null; public abstract Microsoft.Extensions.Primitives.IChangeToken GetChangeToken(); } + [System.AttributeUsage((System.AttributeTargets)2176, AllowMultiple = false, Inherited = false)] public sealed class ActionResultObjectValueAttribute : System.Attribute { public ActionResultObjectValueAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)2048, AllowMultiple = false, Inherited = false)] public sealed class ActionResultStatusCodeAttribute : System.Attribute { public ActionResultStatusCodeAttribute() => throw null; @@ -1604,6 +1637,7 @@ public class DefaultOutputFormatterSelector : Microsoft.AspNetCore.Mvc.Infrastru public DefaultOutputFormatterSelector(Microsoft.Extensions.Options.IOptions options, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) => throw null; public override Microsoft.AspNetCore.Mvc.Formatters.IOutputFormatter SelectFormatter(Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterCanWriteContext context, System.Collections.Generic.IList formatters, Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection contentTypes) => throw null; } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public sealed class DefaultStatusCodeAttribute : System.Attribute { public DefaultStatusCodeAttribute(int statusCode) => throw null; @@ -1813,6 +1847,7 @@ public class LocalRedirectResult : Microsoft.AspNetCore.Mvc.ActionResult public string Url { get => throw null; set { } } public Microsoft.AspNetCore.Mvc.IUrlHelper UrlHelper { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = true, Inherited = true)] public class MiddlewareFilterAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter { public System.Type ConfigurationType { get => throw null; } @@ -1821,6 +1856,7 @@ public class MiddlewareFilterAttribute : System.Attribute, Microsoft.AspNetCore. public bool IsReusable { get => throw null; } public int Order { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)2204, AllowMultiple = false, Inherited = true)] public class ModelBinderAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.IBinderTypeProviderMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IBindingSourceMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelNameProvider { public System.Type BinderType { get => throw null; set { } } @@ -2065,6 +2101,7 @@ public enum BindingBehavior Never = 1, Required = 2, } + [System.AttributeUsage((System.AttributeTargets)2180, AllowMultiple = false, Inherited = true)] public class BindingBehaviorAttribute : System.Attribute { public Microsoft.AspNetCore.Mvc.ModelBinding.BindingBehavior Behavior { get => throw null; } @@ -2078,10 +2115,12 @@ public abstract class BindingSourceValueProvider : Microsoft.AspNetCore.Mvc.Mode public virtual Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider Filter(Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource bindingSource) => throw null; public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ValueProviderResult GetValue(string key); } + [System.AttributeUsage((System.AttributeTargets)2180, AllowMultiple = false, Inherited = true)] public sealed class BindNeverAttribute : Microsoft.AspNetCore.Mvc.ModelBinding.BindingBehaviorAttribute { public BindNeverAttribute() : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.BindingBehavior)) => throw null; } + [System.AttributeUsage((System.AttributeTargets)2180, AllowMultiple = false, Inherited = true)] public sealed class BindRequiredAttribute : Microsoft.AspNetCore.Mvc.ModelBinding.BindingBehaviorAttribute { public BindRequiredAttribute() : base(default(Microsoft.AspNetCore.Mvc.ModelBinding.BindingBehavior)) => throw null; @@ -2583,6 +2622,7 @@ public static partial class ModelValidatorProviderExtensions public static void RemoveType(this System.Collections.Generic.IList list) where TModelValidatorProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidatorProvider => throw null; public static void RemoveType(this System.Collections.Generic.IList list, System.Type type) => throw null; } + [System.AttributeUsage((System.AttributeTargets)2180, AllowMultiple = false, Inherited = true)] public sealed class ValidateNeverAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IPropertyValidationFilter { public ValidateNeverAttribute() => throw null; @@ -2633,6 +2673,7 @@ public static partial class ValueProviderFactoryExtensions public static void RemoveType(this System.Collections.Generic.IList list, System.Type type) => throw null; } } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false, Inherited = true)] public class ModelMetadataTypeAttribute : System.Attribute { public ModelMetadataTypeAttribute(System.Type type) => throw null; @@ -2676,14 +2717,17 @@ public class NoContentResult : Microsoft.AspNetCore.Mvc.StatusCodeResult { public NoContentResult() : base(default(int)) => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false, Inherited = true)] public sealed class NonActionAttribute : System.Attribute { public NonActionAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false, Inherited = true)] public sealed class NonControllerAttribute : System.Attribute { public NonControllerAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false, Inherited = true)] public class NonViewComponentAttribute : System.Attribute { public NonViewComponentAttribute() => throw null; @@ -2722,6 +2766,7 @@ public class PhysicalFileResult : Microsoft.AspNetCore.Mvc.FileResult public override System.Threading.Tasks.Task ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext context) => throw null; public string FileName { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public class ProducesAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IResultFilter { public Microsoft.AspNetCore.Mvc.Formatters.MediaTypeCollection ContentTypes { get => throw null; set { } } @@ -2734,6 +2779,7 @@ public class ProducesAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ApiE public int StatusCode { get => throw null; } public System.Type Type { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false, Inherited = true)] public sealed class ProducesDefaultResponseTypeAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDefaultResponseMetadataProvider, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata { public ProducesDefaultResponseTypeAttribute() => throw null; @@ -2742,11 +2788,13 @@ public sealed class ProducesDefaultResponseTypeAttribute : System.Attribute, Mic public int StatusCode { get => throw null; } public System.Type Type { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)69, AllowMultiple = false, Inherited = true)] public sealed class ProducesErrorResponseTypeAttribute : System.Attribute { public ProducesErrorResponseTypeAttribute(System.Type type) => throw null; public System.Type Type { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = true, Inherited = true)] public class ProducesResponseTypeAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ApiExplorer.IApiResponseMetadataProvider, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata { public ProducesResponseTypeAttribute(int statusCode) => throw null; @@ -2823,6 +2871,7 @@ public class RedirectToRouteResult : Microsoft.AspNetCore.Mvc.ActionResult, Micr public Microsoft.AspNetCore.Routing.RouteValueDictionary RouteValues { get => throw null; set { } } public Microsoft.AspNetCore.Mvc.IUrlHelper UrlHelper { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public class RequestFormLimitsAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter { public bool BufferBody { get => throw null; set { } } @@ -2840,6 +2889,7 @@ public class RequestFormLimitsAttribute : System.Attribute, Microsoft.AspNetCore public int ValueCountLimit { get => throw null; set { } } public int ValueLengthLimit { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public class RequestSizeLimitAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Http.Metadata.IRequestSizeLimitMetadata { public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; @@ -2848,6 +2898,7 @@ public class RequestSizeLimitAttribute : System.Attribute, Microsoft.AspNetCore. long? Microsoft.AspNetCore.Http.Metadata.IRequestSizeLimitMetadata.MaxRequestBodySize { get => throw null; } public int Order { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)68, Inherited = true, AllowMultiple = false)] public class RequireHttpsAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IAuthorizationFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter { public RequireHttpsAttribute() => throw null; @@ -2856,6 +2907,7 @@ public class RequireHttpsAttribute : System.Attribute, Microsoft.AspNetCore.Mvc. public int Order { get => throw null; set { } } public bool Permanent { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public class ResponseCacheAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter { public string CacheProfileName { get => throw null; set { } } @@ -2876,6 +2928,7 @@ public enum ResponseCacheLocation Client = 1, None = 2, } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = true, Inherited = true)] public class RouteAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Routing.IRouteTemplateProvider { public RouteAttribute(string template) => throw null; @@ -2893,6 +2946,7 @@ public abstract class DynamicRouteValueTransformer public object State { get => throw null; set { } } public abstract System.Threading.Tasks.ValueTask TransformAsync(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.RouteValueDictionary values); } + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = true, Inherited = true)] public abstract class HttpMethodAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Routing.IActionHttpMethodProvider, Microsoft.AspNetCore.Mvc.Routing.IRouteTemplateProvider { public HttpMethodAttribute(System.Collections.Generic.IEnumerable httpMethods) => throw null; @@ -2927,6 +2981,7 @@ public class KnownRouteValueConstraint : Microsoft.AspNetCore.Routing.IParameter public KnownRouteValueConstraint(Microsoft.AspNetCore.Mvc.Infrastructure.IActionDescriptorCollectionProvider actionDescriptorCollectionProvider) => throw null; public bool Match(Microsoft.AspNetCore.Http.HttpContext httpContext, Microsoft.AspNetCore.Routing.IRouter route, string routeKey, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteDirection routeDirection) => throw null; } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = true, Inherited = true)] public abstract class RouteValueAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Routing.IRouteValueProvider { protected RouteValueAttribute(string routeKey, string routeValue) => throw null; @@ -2968,6 +3023,7 @@ public sealed class SerializableError : System.Collections.Generic.Dictionary throw null; public SerializableError(Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary modelState) => throw null; } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = true, Inherited = true)] public class ServiceFilterAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter { public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; @@ -3007,6 +3063,7 @@ public class StatusCodeResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft public int StatusCode { get => throw null; } int? Microsoft.AspNetCore.Mvc.Infrastructure.IStatusCodeActionResult.StatusCode { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = true, Inherited = true)] public class TypeFilterAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter { public object[] Arguments { get => throw null; set { } } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs index 0095fefebbf8..41e0d9290a84 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.DataAnnotations.cs @@ -53,6 +53,7 @@ public abstract class ValidationProviderAttribute : System.Attribute public abstract System.Collections.Generic.IEnumerable GetValidationAttributes(); } } + [System.AttributeUsage((System.AttributeTargets)132, AllowMultiple = false, Inherited = true)] public sealed class HiddenInputAttribute : System.Attribute { public HiddenInputAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs index 6a400b960cc0..87d84d8ed604 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.Razor.cs @@ -79,6 +79,7 @@ public interface IViewCompilerProvider { Microsoft.AspNetCore.Mvc.Razor.Compilation.IViewCompiler GetCompiler(); } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = true)] public class RazorViewAttribute : System.Attribute { public RazorViewAttribute(string path, System.Type viewType) => throw null; @@ -107,6 +108,7 @@ public sealed class TagHelperMemoryCacheProvider } namespace Internal { + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = true)] public class RazorInjectAttribute : System.Attribute { public RazorInjectAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs index cde917a0ddeb..7cc84bb8b970 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.RazorPages.cs @@ -400,6 +400,7 @@ public abstract class PageLoader : Microsoft.AspNetCore.Mvc.RazorPages.Infrastru public abstract System.Threading.Tasks.Task LoadAsync(Microsoft.AspNetCore.Mvc.RazorPages.PageActionDescriptor actionDescriptor); public virtual System.Threading.Tasks.Task LoadAsync(Microsoft.AspNetCore.Mvc.RazorPages.PageActionDescriptor actionDescriptor, Microsoft.AspNetCore.Http.EndpointMetadataCollection endpointMetadata) => throw null; } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false, Inherited = true)] public class PageModelAttribute : System.Attribute { public PageModelAttribute() => throw null; @@ -464,6 +465,7 @@ public interface IPageModelFactoryProvider System.Action CreateModelDisposer(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor descriptor); System.Func CreateModelFactory(Microsoft.AspNetCore.Mvc.RazorPages.CompiledPageActionDescriptor descriptor); } + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false, Inherited = true)] public class NonHandlerAttribute : System.Attribute { public NonHandlerAttribute() => throw null; @@ -604,6 +606,7 @@ public class PageContext : Microsoft.AspNetCore.Mvc.ActionContext public virtual Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; set { } } public virtual System.Collections.Generic.IList> ViewStartFactories { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = true)] public class PageContextAttribute : System.Attribute { public PageContextAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs index 64af1faa7eb7..4303910db3ac 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Mvc.ViewFeatures.cs @@ -6,6 +6,7 @@ namespace AspNetCore { namespace Mvc { + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public class AutoValidateAntiforgeryTokenAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter { public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; @@ -130,6 +131,7 @@ public sealed class ViewNotFoundEventData : Microsoft.AspNetCore.Mvc.Diagnostics public string ViewName { get => throw null; } } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public class IgnoreAntiforgeryTokenAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter { public IgnoreAntiforgeryTokenAttribute() => throw null; @@ -165,6 +167,7 @@ public class MvcViewOptions : System.Collections.Generic.IEnumerable throw null; set { } } public System.Collections.Generic.IList ViewEngines { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = true)] public class PageRemoteAttribute : Microsoft.AspNetCore.Mvc.RemoteAttributeBase { public PageRemoteAttribute() => throw null; @@ -184,6 +187,7 @@ public class PartialViewResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsof public Microsoft.AspNetCore.Mvc.ViewEngines.IViewEngine ViewEngine { get => throw null; set { } } public string ViewName { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = true)] public class RemoteAttribute : Microsoft.AspNetCore.Mvc.RemoteAttributeBase { protected RemoteAttribute() => throw null; @@ -193,6 +197,7 @@ public class RemoteAttribute : Microsoft.AspNetCore.Mvc.RemoteAttributeBase protected override string GetUrl(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext context) => throw null; protected string RouteName { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = true)] public abstract class RemoteAttributeBase : System.ComponentModel.DataAnnotations.ValidationAttribute, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IClientModelValidator { public string AdditionalFields { get => throw null; set { } } @@ -608,17 +613,20 @@ public class ViewContext : Microsoft.AspNetCore.Mvc.ActionContext public System.IO.TextWriter Writer { get => throw null; set { } } } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public class SkipStatusCodePagesAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IResourceFilter, Microsoft.AspNetCore.Http.Metadata.ISkipStatusCodePagesMetadata { public SkipStatusCodePagesAttribute() => throw null; public void OnResourceExecuted(Microsoft.AspNetCore.Mvc.Filters.ResourceExecutedContext context) => throw null; public void OnResourceExecuting(Microsoft.AspNetCore.Mvc.Filters.ResourceExecutingContext context) => throw null; } + [System.AttributeUsage((System.AttributeTargets)128, Inherited = true, AllowMultiple = false)] public sealed class TempDataAttribute : System.Attribute { public TempDataAttribute() => throw null; public string Key { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public class ValidateAntiForgeryTokenAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter { public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; @@ -648,6 +656,7 @@ public abstract class ViewComponent public Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; } public Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine ViewEngine { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false, Inherited = true)] public class ViewComponentAttribute : System.Attribute { public ViewComponentAttribute() => throw null; @@ -762,6 +771,7 @@ public class ViewComponentContext public Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary ViewData { get => throw null; } public System.IO.TextWriter Writer { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = true)] public class ViewComponentContextAttribute : System.Attribute { public ViewComponentContextAttribute() => throw null; @@ -811,6 +821,7 @@ public class ViewViewComponentResult : Microsoft.AspNetCore.Mvc.IViewComponentRe public string ViewName { get => throw null; set { } } } } + [System.AttributeUsage((System.AttributeTargets)128, Inherited = true, AllowMultiple = false)] public sealed class ViewDataAttribute : System.Attribute { public ViewDataAttribute() => throw null; @@ -1212,6 +1223,7 @@ public class PartialViewResultExecutor : Microsoft.AspNetCore.Mvc.ViewFeatures.V public virtual Microsoft.AspNetCore.Mvc.ViewEngines.ViewEngineResult FindView(Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.PartialViewResult viewResult) => throw null; protected Microsoft.Extensions.Logging.ILogger Logger { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public class SaveTempDataAttribute : System.Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter { public Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata CreateInstance(System.IServiceProvider serviceProvider) => throw null; @@ -1288,6 +1300,7 @@ public class ViewComponentResultExecutor : Microsoft.AspNetCore.Mvc.Infrastructu public ViewComponentResultExecutor(Microsoft.Extensions.Options.IOptions mvcHelperOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Text.Encodings.Web.HtmlEncoder htmlEncoder, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider modelMetadataProvider, Microsoft.AspNetCore.Mvc.ViewFeatures.ITempDataDictionaryFactory tempDataDictionaryFactory, Microsoft.AspNetCore.Mvc.Infrastructure.IHttpResponseStreamWriterFactory writerFactory) => throw null; public virtual System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.ViewComponentResult result) => throw null; } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = true)] public class ViewContextAttribute : System.Attribute { public ViewContextAttribute() => throw null; @@ -1334,6 +1347,7 @@ public class ViewDataDictionary : Microsoft.AspNetCore.Mvc.ViewFeatures. public ViewDataDictionary(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary source, object model) : base(default(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary)) => throw null; public TModel Model { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = true)] public class ViewDataDictionaryAttribute : System.Attribute { public ViewDataDictionaryAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.OutputCaching.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.OutputCaching.cs index 0ad5295bbef6..d0928b92469f 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.OutputCaching.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.OutputCaching.cs @@ -39,6 +39,7 @@ public interface IOutputCacheStore System.Threading.Tasks.ValueTask GetAsync(string key, System.Threading.CancellationToken cancellationToken); System.Threading.Tasks.ValueTask SetAsync(string key, byte[] value, string[] tags, System.TimeSpan validFor, System.Threading.CancellationToken cancellationToken); } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public sealed class OutputCacheAttribute : System.Attribute { public OutputCacheAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.RateLimiting.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.RateLimiting.cs index 6fa8fb2c1156..f12f92bec5a5 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.RateLimiting.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.RateLimiting.cs @@ -24,10 +24,12 @@ public static partial class RateLimiterServiceCollectionExtensions } namespace RateLimiting { + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public sealed class DisableRateLimitingAttribute : System.Attribute { public DisableRateLimitingAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = true)] public sealed class EnableRateLimitingAttribute : System.Attribute { public EnableRateLimitingAttribute(string policyName) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs index 58ade22f1eb5..fcb7e1de4f1e 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.Runtime.cs @@ -22,6 +22,7 @@ public abstract class RazorCompiledItem public abstract System.Collections.Generic.IReadOnlyList Metadata { get; } public abstract System.Type Type { get; } } + [System.AttributeUsage((System.AttributeTargets)5, AllowMultiple = true, Inherited = false)] public sealed class RazorCompiledItemAttribute : System.Attribute { public RazorCompiledItemAttribute(System.Type type, string kind, string identifier) => throw null; @@ -40,28 +41,33 @@ public class RazorCompiledItemLoader protected System.Collections.Generic.IEnumerable LoadAttributes(System.Reflection.Assembly assembly) => throw null; public virtual System.Collections.Generic.IReadOnlyList LoadItems(System.Reflection.Assembly assembly) => throw null; } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = true, Inherited = true)] public sealed class RazorCompiledItemMetadataAttribute : System.Attribute { public RazorCompiledItemMetadataAttribute(string key, string value) => throw null; public string Key { get => throw null; } public string Value { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = false, Inherited = false)] public sealed class RazorConfigurationNameAttribute : System.Attribute { public string ConfigurationName { get => throw null; } public RazorConfigurationNameAttribute(string configurationName) => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = true, Inherited = false)] public sealed class RazorExtensionAssemblyNameAttribute : System.Attribute { public string AssemblyName { get => throw null; } public RazorExtensionAssemblyNameAttribute(string extensionName, string assemblyName) => throw null; public string ExtensionName { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = false, Inherited = false)] public sealed class RazorLanguageVersionAttribute : System.Attribute { public RazorLanguageVersionAttribute(string languageVersion) => throw null; public string LanguageVersion { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = true, Inherited = true)] public sealed class RazorSourceChecksumAttribute : System.Attribute, Microsoft.AspNetCore.Razor.Hosting.IRazorSourceChecksumMetadata { public string Checksum { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs index 1765573540a3..0629742d0105 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Razor.cs @@ -24,6 +24,7 @@ public class DefaultTagHelperContent : Microsoft.AspNetCore.Razor.TagHelpers.Tag public override void Reinitialize() => throw null; public override void WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) => throw null; } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = false)] public sealed class HtmlAttributeNameAttribute : System.Attribute { public HtmlAttributeNameAttribute() => throw null; @@ -32,6 +33,7 @@ public sealed class HtmlAttributeNameAttribute : System.Attribute public bool DictionaryAttributePrefixSet { get => throw null; } public string Name { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = false)] public sealed class HtmlAttributeNotBoundAttribute : System.Attribute { public HtmlAttributeNotBoundAttribute() => throw null; @@ -43,6 +45,7 @@ public enum HtmlAttributeValueStyle NoQuotes = 2, Minimized = 3, } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = true, Inherited = false)] public sealed class HtmlTargetElementAttribute : System.Attribute { public string Attributes { get => throw null; set { } } @@ -73,6 +76,7 @@ public sealed class NullHtmlEncoder : System.Text.Encodings.Web.HtmlEncoder public override unsafe bool TryEncodeUnicodeScalar(int unicodeScalar, char* buffer, int bufferLength, out int numberOfCharactersWritten) => throw null; public override bool WillEncode(int unicodeScalar) => throw null; } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false, Inherited = false)] public sealed class OutputElementHintAttribute : System.Attribute { public OutputElementHintAttribute(string outputElement) => throw null; @@ -89,6 +93,7 @@ public abstract class ReadOnlyTagHelperAttributeList : System.Collections.Object public bool TryGetAttribute(string name, out Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute attribute) => throw null; public bool TryGetAttributes(string name, out System.Collections.Generic.IReadOnlyList attributes) => throw null; } + [System.AttributeUsage((System.AttributeTargets)4, Inherited = false, AllowMultiple = false)] public sealed class RestrictChildrenAttribute : System.Attribute { public System.Collections.Generic.IEnumerable ChildTags { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs index 9e3cda66696e..c3508dbbf217 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Routing.cs @@ -291,11 +291,13 @@ public abstract class EndpointDataSource public abstract Microsoft.Extensions.Primitives.IChangeToken GetChangeToken(); public virtual System.Collections.Generic.IReadOnlyList GetGroupedEndpoints(Microsoft.AspNetCore.Routing.RouteGroupContext context) => throw null; } + [System.AttributeUsage((System.AttributeTargets)4164, Inherited = false, AllowMultiple = false)] public sealed class EndpointGroupNameAttribute : System.Attribute, Microsoft.AspNetCore.Routing.IEndpointGroupNameMetadata { public EndpointGroupNameAttribute(string endpointGroupName) => throw null; public string EndpointGroupName { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)4160, Inherited = false, AllowMultiple = false)] public sealed class EndpointNameAttribute : System.Attribute, Microsoft.AspNetCore.Routing.IEndpointNameMetadata { public EndpointNameAttribute(string endpointName) => throw null; @@ -306,11 +308,13 @@ public class EndpointNameMetadata : Microsoft.AspNetCore.Routing.IEndpointNameMe public EndpointNameMetadata(string endpointName) => throw null; public string EndpointName { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)4164, AllowMultiple = false, Inherited = true)] public sealed class ExcludeFromDescriptionAttribute : System.Attribute, Microsoft.AspNetCore.Routing.IExcludeFromDescriptionMetadata { public ExcludeFromDescriptionAttribute() => throw null; public bool ExcludeFromDescription { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = false, Inherited = false)] public sealed class HostAttribute : System.Attribute, Microsoft.AspNetCore.Routing.IHostMetadata { public HostAttribute(string host) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs index 0691c592da0d..c3d969fc67e6 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.SignalR.Core.cs @@ -240,6 +240,7 @@ public class HubMetadata public HubMetadata(System.Type hubType) => throw null; public System.Type HubType { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false, Inherited = true)] public class HubMethodNameAttribute : System.Attribute { public HubMethodNameAttribute(string name) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs index 02189892cd27..c3f84b43f886 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.Abstractions.cs @@ -23,6 +23,7 @@ public static partial class ConfigurationExtensions public static string GetConnectionString(this Microsoft.Extensions.Configuration.IConfiguration configuration, string name) => throw null; public static Microsoft.Extensions.Configuration.IConfigurationSection GetRequiredSection(this Microsoft.Extensions.Configuration.IConfiguration configuration, string key) => throw null; } + [System.AttributeUsage((System.AttributeTargets)128)] public sealed class ConfigurationKeyNameAttribute : System.Attribute { public ConfigurationKeyNameAttribute(string name) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs index 6dca2bc59e37..6c89808ea0d9 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Configuration.UserSecrets.cs @@ -13,6 +13,7 @@ public class PathHelper public PathHelper() => throw null; public static string GetSecretsPathFromSecretsId(string userSecretsId) => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false, AllowMultiple = false)] public class UserSecretsIdAttribute : System.Attribute { public UserSecretsIdAttribute(string userSecretId) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs index 64878c372698..0a7ff9a9534e 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.DependencyInjection.Abstractions.cs @@ -14,6 +14,7 @@ public static class ActivatorUtilities public static object GetServiceOrCreateInstance(System.IServiceProvider provider, System.Type type) => throw null; public static T GetServiceOrCreateInstance(System.IServiceProvider provider) => throw null; } + [System.AttributeUsage((System.AttributeTargets)32767)] public class ActivatorUtilitiesConstructorAttribute : System.Attribute { public ActivatorUtilitiesConstructorAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs index 4edd2e5e8c57..5bcf000eceaa 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Identity.Core.cs @@ -341,6 +341,7 @@ public enum PasswordVerificationResult Success = 1, SuccessRehashNeeded = 2, } + [System.AttributeUsage((System.AttributeTargets)128)] public class PersonalDataAttribute : System.Attribute { public PersonalDataAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs index 99932b86e13b..95d2f0b7b596 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Localization.cs @@ -23,6 +23,7 @@ public class LocalizationOptions public LocalizationOptions() => throw null; public string ResourcesPath { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = false, Inherited = false)] public class ResourceLocationAttribute : System.Attribute { public ResourceLocationAttribute(string resourceLocation) => throw null; @@ -55,6 +56,7 @@ public class ResourceNamesCache : Microsoft.Extensions.Localization.IResourceNam public ResourceNamesCache() => throw null; public System.Collections.Generic.IList GetOrAdd(string name, System.Func> valueFactory) => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = false, Inherited = false)] public class RootNamespaceAttribute : System.Attribute { public RootNamespaceAttribute(string rootNamespace) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs index 0436b1d8d7e0..d71f41ff5c3f 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.Abstractions.cs @@ -167,6 +167,7 @@ public static class LoggerMessage public static System.Func DefineScope(string formatString) => throw null; public static System.Func DefineScope(string formatString) => throw null; } + [System.AttributeUsage((System.AttributeTargets)64)] public sealed class LoggerMessageAttribute : System.Attribute { public LoggerMessageAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs index f3bb0065fe13..9250f1e5fc4b 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.Extensions.Logging.cs @@ -93,6 +93,7 @@ public static partial class LoggingBuilderExtensions public static Microsoft.Extensions.Logging.ILoggingBuilder Configure(this Microsoft.Extensions.Logging.ILoggingBuilder builder, System.Action action) => throw null; public static Microsoft.Extensions.Logging.ILoggingBuilder SetMinimumLevel(this Microsoft.Extensions.Logging.ILoggingBuilder builder, Microsoft.Extensions.Logging.LogLevel level) => throw null; } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false, Inherited = false)] public class ProviderAliasAttribute : System.Attribute { public string Alias { get => throw null; } diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs index da3135522512..01954004a7ef 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.JSInterop.cs @@ -145,6 +145,7 @@ public static partial class JSInProcessRuntimeExtensions { public static void InvokeVoid(this Microsoft.JSInterop.IJSInProcessRuntime jsRuntime, string identifier, params object[] args) => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = true)] public sealed class JSInvokableAttribute : System.Attribute { public JSInvokableAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs index 862067e580e6..d3630da337fd 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.VisualBasic.Core.cs @@ -49,6 +49,7 @@ public sealed class Collection : System.Collections.ICollection, System.Collecti public object this[object Index] { get => throw null; } public object this[string Key] { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)4, Inherited = false, AllowMultiple = false)] public sealed class ComClassAttribute : System.Attribute { public string ClassID { get => throw null; } @@ -158,6 +159,7 @@ public sealed class DecimalType public static decimal FromString(string Value, System.Globalization.NumberFormatInfo NumberFormat) => throw null; public static decimal Parse(string Value, System.Globalization.NumberFormatInfo NumberFormat) => throw null; } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false, Inherited = false)] public sealed class DesignerGeneratedAttribute : System.Attribute { public DesignerGeneratedAttribute() => throw null; @@ -290,10 +292,12 @@ public sealed class Operators public static object SubtractObject(object Left, object Right) => throw null; public static object XorObject(object Left, object Right) => throw null; } + [System.AttributeUsage((System.AttributeTargets)2048, Inherited = false, AllowMultiple = false)] public sealed class OptionCompareAttribute : System.Attribute { public OptionCompareAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)4, Inherited = false, AllowMultiple = false)] public sealed class OptionTextAttribute : System.Attribute { public OptionTextAttribute() => throw null; @@ -318,6 +322,7 @@ public sealed class SingleType public static float FromString(string Value) => throw null; public static float FromString(string Value, System.Globalization.NumberFormatInfo NumberFormat) => throw null; } + [System.AttributeUsage((System.AttributeTargets)4, Inherited = false, AllowMultiple = false)] public sealed class StandardModuleAttribute : System.Attribute { public StandardModuleAttribute() => throw null; @@ -870,6 +875,7 @@ public enum FirstWeekOfYear FirstFourDays = 2, FirstFullWeek = 3, } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false, Inherited = false)] public sealed class HideModuleNameAttribute : System.Attribute { public HideModuleNameAttribute() => throw null; @@ -950,6 +956,7 @@ public enum MsgBoxStyle MsgBoxRight = 524288, MsgBoxRtlReading = 1048576, } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false, Inherited = false)] public sealed class MyGroupCollectionAttribute : System.Attribute { public string CreateMethod { get => throw null; } @@ -1078,6 +1085,7 @@ public enum VariantType UserDefinedType = 36, Array = 8192, } + [System.AttributeUsage((System.AttributeTargets)256, Inherited = false, AllowMultiple = false)] public sealed class VBFixedArrayAttribute : System.Attribute { public int[] Bounds { get => throw null; } @@ -1085,6 +1093,7 @@ public sealed class VBFixedArrayAttribute : System.Attribute public VBFixedArrayAttribute(int UpperBound1, int UpperBound2) => throw null; public int Length { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)256, Inherited = false, AllowMultiple = false)] public sealed class VBFixedStringAttribute : System.Attribute { public VBFixedStringAttribute(int Length) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs index 300ca5dcd914..45282a5ea2d0 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Annotations.cs @@ -12,6 +12,7 @@ public class AssociatedMetadataTypeTypeDescriptionProvider : System.ComponentMod public AssociatedMetadataTypeTypeDescriptionProvider(System.Type type, System.Type associatedMetadataType) => throw null; public override System.ComponentModel.ICustomTypeDescriptor GetTypeDescriptor(System.Type objectType, object instance) => throw null; } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false, Inherited = true)] public sealed class AssociationAttribute : System.Attribute { public AssociationAttribute(string name, string thisKey, string otherKey) => throw null; @@ -22,6 +23,7 @@ public sealed class AssociationAttribute : System.Attribute public string ThisKey { get => throw null; } public System.Collections.Generic.IEnumerable ThisKeyMembers { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false)] public class CompareAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute { public CompareAttribute(string otherProperty) => throw null; @@ -31,15 +33,18 @@ public class CompareAttribute : System.ComponentModel.DataAnnotations.Validation public string OtherPropertyDisplayName { get => throw null; } public override bool RequiresValidationContext { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false, Inherited = true)] public sealed class ConcurrencyCheckAttribute : System.Attribute { public ConcurrencyCheckAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)2432, AllowMultiple = false)] public sealed class CreditCardAttribute : System.ComponentModel.DataAnnotations.DataTypeAttribute { public CreditCardAttribute() : base(default(System.ComponentModel.DataAnnotations.DataType)) => throw null; public override bool IsValid(object value) => throw null; } + [System.AttributeUsage((System.AttributeTargets)2500, AllowMultiple = true)] public sealed class CustomValidationAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute { public CustomValidationAttribute(System.Type validatorType, string method) => throw null; @@ -68,6 +73,7 @@ public enum DataType PostalCode = 15, Upload = 16, } + [System.AttributeUsage((System.AttributeTargets)2496, AllowMultiple = false)] public class DataTypeAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute { public DataTypeAttribute(System.ComponentModel.DataAnnotations.DataType dataType) => throw null; @@ -78,6 +84,7 @@ public class DataTypeAttribute : System.ComponentModel.DataAnnotations.Validatio public virtual string GetDataTypeName() => throw null; public override bool IsValid(object value) => throw null; } + [System.AttributeUsage((System.AttributeTargets)2500, AllowMultiple = false)] public sealed class DisplayAttribute : System.Attribute { public bool AutoGenerateField { get => throw null; set { } } @@ -99,6 +106,7 @@ public sealed class DisplayAttribute : System.Attribute public System.Type ResourceType { get => throw null; set { } } public string ShortName { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)4, Inherited = true, AllowMultiple = false)] public class DisplayColumnAttribute : System.Attribute { public DisplayColumnAttribute(string displayColumn) => throw null; @@ -108,6 +116,7 @@ public class DisplayColumnAttribute : System.Attribute public string SortColumn { get => throw null; } public bool SortDescending { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false)] public class DisplayFormatAttribute : System.Attribute { public bool ApplyFormatInEditMode { get => throw null; set { } } @@ -119,23 +128,27 @@ public class DisplayFormatAttribute : System.Attribute public string NullDisplayText { get => throw null; set { } } public System.Type NullDisplayTextResourceType { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false, Inherited = true)] public sealed class EditableAttribute : System.Attribute { public bool AllowEdit { get => throw null; } public bool AllowInitialValue { get => throw null; set { } } public EditableAttribute(bool allowEdit) => throw null; } + [System.AttributeUsage((System.AttributeTargets)2432, AllowMultiple = false)] public sealed class EmailAddressAttribute : System.ComponentModel.DataAnnotations.DataTypeAttribute { public EmailAddressAttribute() : base(default(System.ComponentModel.DataAnnotations.DataType)) => throw null; public override bool IsValid(object value) => throw null; } + [System.AttributeUsage((System.AttributeTargets)2496, AllowMultiple = false)] public sealed class EnumDataTypeAttribute : System.ComponentModel.DataAnnotations.DataTypeAttribute { public EnumDataTypeAttribute(System.Type enumType) : base(default(System.ComponentModel.DataAnnotations.DataType)) => throw null; public System.Type EnumType { get => throw null; } public override bool IsValid(object value) => throw null; } + [System.AttributeUsage((System.AttributeTargets)2432, AllowMultiple = false)] public sealed class FileExtensionsAttribute : System.ComponentModel.DataAnnotations.DataTypeAttribute { public FileExtensionsAttribute() : base(default(System.ComponentModel.DataAnnotations.DataType)) => throw null; @@ -143,6 +156,7 @@ public sealed class FileExtensionsAttribute : System.ComponentModel.DataAnnotati public override string FormatErrorMessage(string name) => throw null; public override bool IsValid(object value) => throw null; } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false)] public sealed class FilterUIHintAttribute : System.Attribute { public System.Collections.Generic.IDictionary ControlParameters { get => throw null; } @@ -158,10 +172,12 @@ public interface IValidatableObject { System.Collections.Generic.IEnumerable Validate(System.ComponentModel.DataAnnotations.ValidationContext validationContext); } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false, Inherited = true)] public sealed class KeyAttribute : System.Attribute { public KeyAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)2432, AllowMultiple = false)] public class MaxLengthAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute { public MaxLengthAttribute() => throw null; @@ -170,11 +186,13 @@ public class MaxLengthAttribute : System.ComponentModel.DataAnnotations.Validati public override bool IsValid(object value) => throw null; public int Length { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false)] public sealed class MetadataTypeAttribute : System.Attribute { public MetadataTypeAttribute(System.Type metadataClassType) => throw null; public System.Type MetadataClassType { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)2432, AllowMultiple = false)] public class MinLengthAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute { public MinLengthAttribute(int length) => throw null; @@ -182,11 +200,13 @@ public class MinLengthAttribute : System.ComponentModel.DataAnnotations.Validati public override bool IsValid(object value) => throw null; public int Length { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)2432, AllowMultiple = false)] public sealed class PhoneAttribute : System.ComponentModel.DataAnnotations.DataTypeAttribute { public PhoneAttribute() : base(default(System.ComponentModel.DataAnnotations.DataType)) => throw null; public override bool IsValid(object value) => throw null; } + [System.AttributeUsage((System.AttributeTargets)2432, AllowMultiple = false)] public class RangeAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute { public bool ConvertValueInInvariantCulture { get => throw null; set { } } @@ -200,6 +220,7 @@ public class RangeAttribute : System.ComponentModel.DataAnnotations.ValidationAt public System.Type OperandType { get => throw null; } public bool ParseLimitsInInvariantCulture { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)2432, AllowMultiple = false)] public class RegularExpressionAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute { public RegularExpressionAttribute(string pattern) => throw null; @@ -209,12 +230,14 @@ public class RegularExpressionAttribute : System.ComponentModel.DataAnnotations. public int MatchTimeoutInMilliseconds { get => throw null; set { } } public string Pattern { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)2432, AllowMultiple = false)] public class RequiredAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute { public bool AllowEmptyStrings { get => throw null; set { } } public RequiredAttribute() => throw null; public override bool IsValid(object value) => throw null; } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false)] public class ScaffoldColumnAttribute : System.Attribute { public ScaffoldColumnAttribute(bool scaffold) => throw null; @@ -222,6 +245,7 @@ public class ScaffoldColumnAttribute : System.Attribute } namespace Schema { + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false)] public class ColumnAttribute : System.Attribute { public ColumnAttribute() => throw null; @@ -230,10 +254,12 @@ public class ColumnAttribute : System.Attribute public int Order { get => throw null; set { } } public string TypeName { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false)] public class ComplexTypeAttribute : System.Attribute { public ComplexTypeAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false)] public class DatabaseGeneratedAttribute : System.Attribute { public DatabaseGeneratedAttribute(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption databaseGeneratedOption) => throw null; @@ -245,20 +271,24 @@ public enum DatabaseGeneratedOption Identity = 1, Computed = 2, } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false)] public class ForeignKeyAttribute : System.Attribute { public ForeignKeyAttribute(string name) => throw null; public string Name { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false)] public class InversePropertyAttribute : System.Attribute { public InversePropertyAttribute(string property) => throw null; public string Property { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)388, AllowMultiple = false)] public class NotMappedAttribute : System.Attribute { public NotMappedAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false)] public class TableAttribute : System.Attribute { public TableAttribute(string name) => throw null; @@ -266,6 +296,7 @@ public class TableAttribute : System.Attribute public string Schema { get => throw null; set { } } } } + [System.AttributeUsage((System.AttributeTargets)2432, AllowMultiple = false)] public class StringLengthAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute { public StringLengthAttribute(int maximumLength) => throw null; @@ -274,10 +305,12 @@ public class StringLengthAttribute : System.ComponentModel.DataAnnotations.Valid public int MaximumLength { get => throw null; } public int MinimumLength { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false, Inherited = true)] public sealed class TimestampAttribute : System.Attribute { public TimestampAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = true)] public class UIHintAttribute : System.Attribute { public System.Collections.Generic.IDictionary ControlParameters { get => throw null; } @@ -289,6 +322,7 @@ public class UIHintAttribute : System.Attribute public string PresentationLayer { get => throw null; } public string UIHint { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)2432, AllowMultiple = false)] public sealed class UrlAttribute : System.ComponentModel.DataAnnotations.DataTypeAttribute { public UrlAttribute() : base(default(System.ComponentModel.DataAnnotations.DataType)) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs index d2dbcebce752..3eb2b7b62a0e 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.Primitives.cs @@ -4,6 +4,7 @@ namespace System { namespace ComponentModel { + [System.AttributeUsage((System.AttributeTargets)32767)] public sealed class BrowsableAttribute : System.Attribute { public bool Browsable { get => throw null; } @@ -15,6 +16,7 @@ public sealed class BrowsableAttribute : System.Attribute public static readonly System.ComponentModel.BrowsableAttribute No; public static readonly System.ComponentModel.BrowsableAttribute Yes; } + [System.AttributeUsage((System.AttributeTargets)32767)] public class CategoryAttribute : System.Attribute { public static System.ComponentModel.CategoryAttribute Action { get => throw null; } @@ -60,6 +62,7 @@ public class ComponentCollection : System.Collections.ReadOnlyCollectionBase public virtual System.ComponentModel.IComponent this[int index] { get => throw null; } public virtual System.ComponentModel.IComponent this[string name] { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)32767)] public class DescriptionAttribute : System.Attribute { public DescriptionAttribute() => throw null; @@ -75,6 +78,7 @@ namespace Design { namespace Serialization { + [System.AttributeUsage((System.AttributeTargets)1028, AllowMultiple = true, Inherited = true)] public sealed class DesignerSerializerAttribute : System.Attribute { public DesignerSerializerAttribute(string serializerTypeName, string baseSerializerTypeName) => throw null; @@ -86,6 +90,7 @@ public sealed class DesignerSerializerAttribute : System.Attribute } } } + [System.AttributeUsage((System.AttributeTargets)1028, AllowMultiple = true, Inherited = true)] public sealed class DesignerAttribute : System.Attribute { public DesignerAttribute(string designerTypeName) => throw null; @@ -99,6 +104,7 @@ public sealed class DesignerAttribute : System.Attribute public override int GetHashCode() => throw null; public override object TypeId { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false, Inherited = true)] public sealed class DesignerCategoryAttribute : System.Attribute { public string Category { get => throw null; } @@ -119,6 +125,7 @@ public enum DesignerSerializationVisibility Visible = 1, Content = 2, } + [System.AttributeUsage((System.AttributeTargets)960)] public sealed class DesignerSerializationVisibilityAttribute : System.Attribute { public static readonly System.ComponentModel.DesignerSerializationVisibilityAttribute Content; @@ -131,6 +138,7 @@ public sealed class DesignerSerializationVisibilityAttribute : System.Attribute public System.ComponentModel.DesignerSerializationVisibility Visibility { get => throw null; } public static readonly System.ComponentModel.DesignerSerializationVisibilityAttribute Visible; } + [System.AttributeUsage((System.AttributeTargets)32767)] public sealed class DesignOnlyAttribute : System.Attribute { public DesignOnlyAttribute(bool isDesignOnly) => throw null; @@ -142,6 +150,7 @@ public sealed class DesignOnlyAttribute : System.Attribute public static readonly System.ComponentModel.DesignOnlyAttribute No; public static readonly System.ComponentModel.DesignOnlyAttribute Yes; } + [System.AttributeUsage((System.AttributeTargets)708)] public class DisplayNameAttribute : System.Attribute { public DisplayNameAttribute() => throw null; @@ -153,6 +162,7 @@ public class DisplayNameAttribute : System.Attribute public override int GetHashCode() => throw null; public override bool IsDefaultAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)32767, AllowMultiple = true, Inherited = true)] public sealed class EditorAttribute : System.Attribute { public EditorAttribute() => throw null; @@ -186,6 +196,7 @@ public interface IContainer : System.IDisposable System.ComponentModel.ComponentCollection Components { get; } void Remove(System.ComponentModel.IComponent component); } + [System.AttributeUsage((System.AttributeTargets)32767)] public sealed class ImmutableObjectAttribute : System.Attribute { public ImmutableObjectAttribute(bool immutable) => throw null; @@ -197,6 +208,7 @@ public sealed class ImmutableObjectAttribute : System.Attribute public static readonly System.ComponentModel.ImmutableObjectAttribute No; public static readonly System.ComponentModel.ImmutableObjectAttribute Yes; } + [System.AttributeUsage((System.AttributeTargets)4)] public sealed class InitializationEventAttribute : System.Attribute { public InitializationEventAttribute(string eventName) => throw null; @@ -236,6 +248,7 @@ public interface ISynchronizeInvoke object Invoke(System.Delegate method, object[] args); bool InvokeRequired { get; } } + [System.AttributeUsage((System.AttributeTargets)32767)] public sealed class LocalizableAttribute : System.Attribute { public LocalizableAttribute(bool isLocalizable) => throw null; @@ -247,6 +260,7 @@ public sealed class LocalizableAttribute : System.Attribute public static readonly System.ComponentModel.LocalizableAttribute No; public static readonly System.ComponentModel.LocalizableAttribute Yes; } + [System.AttributeUsage((System.AttributeTargets)32767)] public sealed class MergablePropertyAttribute : System.Attribute { public bool AllowMerge { get => throw null; } @@ -258,6 +272,7 @@ public sealed class MergablePropertyAttribute : System.Attribute public static readonly System.ComponentModel.MergablePropertyAttribute No; public static readonly System.ComponentModel.MergablePropertyAttribute Yes; } + [System.AttributeUsage((System.AttributeTargets)128)] public sealed class NotifyParentPropertyAttribute : System.Attribute { public NotifyParentPropertyAttribute(bool notifyParent) => throw null; @@ -269,6 +284,7 @@ public sealed class NotifyParentPropertyAttribute : System.Attribute public bool NotifyParent { get => throw null; } public static readonly System.ComponentModel.NotifyParentPropertyAttribute Yes; } + [System.AttributeUsage((System.AttributeTargets)32767)] public sealed class ParenthesizePropertyNameAttribute : System.Attribute { public ParenthesizePropertyNameAttribute() => throw null; @@ -279,6 +295,7 @@ public sealed class ParenthesizePropertyNameAttribute : System.Attribute public override bool IsDefaultAttribute() => throw null; public bool NeedParenthesis { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)32767)] public sealed class ReadOnlyAttribute : System.Attribute { public ReadOnlyAttribute(bool isReadOnly) => throw null; @@ -296,6 +313,7 @@ public enum RefreshProperties All = 1, Repaint = 2, } + [System.AttributeUsage((System.AttributeTargets)32767)] public sealed class RefreshPropertiesAttribute : System.Attribute { public static readonly System.ComponentModel.RefreshPropertiesAttribute All; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs index 17f4792760b1..0b7773473eb2 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ComponentModel.TypeConverter.cs @@ -11,6 +11,7 @@ public class AddingNewEventArgs : System.EventArgs public object NewObject { get => throw null; set { } } } public delegate void AddingNewEventHandler(object sender, System.ComponentModel.AddingNewEventArgs e); + [System.AttributeUsage((System.AttributeTargets)32767)] public sealed class AmbientValueAttribute : System.Attribute { public AmbientValueAttribute(bool value) => throw null; @@ -57,6 +58,7 @@ public class AttributeCollection : System.Collections.ICollection, System.Collec public virtual System.Attribute this[int index] { get => throw null; } public virtual System.Attribute this[System.Type attributeType] { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)128)] public class AttributeProviderAttribute : System.Attribute { public AttributeProviderAttribute(string typeName) => throw null; @@ -72,6 +74,7 @@ public abstract class BaseNumberConverter : System.ComponentModel.TypeConverter public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) => throw null; public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; } + [System.AttributeUsage((System.AttributeTargets)32767)] public sealed class BindableAttribute : System.Attribute { public bool Bindable { get => throw null; } @@ -186,6 +189,7 @@ public class CollectionConverter : System.ComponentModel.TypeConverter public CollectionConverter() => throw null; public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) => throw null; } + [System.AttributeUsage((System.AttributeTargets)4)] public sealed class ComplexBindingPropertiesAttribute : System.Attribute { public ComplexBindingPropertiesAttribute() => throw null; @@ -264,6 +268,7 @@ public abstract class CustomTypeDescriptor : System.ComponentModel.ICustomTypeDe public virtual System.ComponentModel.PropertyDescriptorCollection GetProperties(System.Attribute[] attributes) => throw null; public virtual object GetPropertyOwner(System.ComponentModel.PropertyDescriptor pd) => throw null; } + [System.AttributeUsage((System.AttributeTargets)4)] public sealed class DataObjectAttribute : System.Attribute { public DataObjectAttribute() => throw null; @@ -276,6 +281,7 @@ public sealed class DataObjectAttribute : System.Attribute public override bool IsDefaultAttribute() => throw null; public static readonly System.ComponentModel.DataObjectAttribute NonDataObject; } + [System.AttributeUsage((System.AttributeTargets)128)] public sealed class DataObjectFieldAttribute : System.Attribute { public DataObjectFieldAttribute(bool primaryKey) => throw null; @@ -289,6 +295,7 @@ public sealed class DataObjectFieldAttribute : System.Attribute public int Length { get => throw null; } public bool PrimaryKey { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)64)] public sealed class DataObjectMethodAttribute : System.Attribute { public DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType methodType) => throw null; @@ -337,6 +344,7 @@ public class DecimalConverter : System.ComponentModel.BaseNumberConverter public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; public DecimalConverter() => throw null; } + [System.AttributeUsage((System.AttributeTargets)4)] public sealed class DefaultBindingPropertyAttribute : System.Attribute { public DefaultBindingPropertyAttribute() => throw null; @@ -346,6 +354,7 @@ public sealed class DefaultBindingPropertyAttribute : System.Attribute public override int GetHashCode() => throw null; public string Name { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)4)] public sealed class DefaultEventAttribute : System.Attribute { public DefaultEventAttribute(string name) => throw null; @@ -354,6 +363,7 @@ public sealed class DefaultEventAttribute : System.Attribute public override int GetHashCode() => throw null; public string Name { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)4)] public sealed class DefaultPropertyAttribute : System.Attribute { public DefaultPropertyAttribute(string name) => throw null; @@ -536,6 +546,7 @@ public enum HelpContextType Selection = 2, ToolWindowSelection = 3, } + [System.AttributeUsage((System.AttributeTargets)32767, AllowMultiple = false, Inherited = false)] public sealed class HelpKeywordAttribute : System.Attribute { public HelpKeywordAttribute() => throw null; @@ -805,6 +816,7 @@ public sealed class ContextStack public object this[int level] { get => throw null; } public object this[System.Type type] { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)4, Inherited = false)] public sealed class DefaultSerializationProviderAttribute : System.Attribute { public DefaultSerializationProviderAttribute(string providerTypeName) => throw null; @@ -904,6 +916,7 @@ public class ResolveNameEventArgs : System.EventArgs public object Value { get => throw null; set { } } } public delegate void ResolveNameEventHandler(object sender, System.ComponentModel.Design.Serialization.ResolveNameEventArgs e); + [System.AttributeUsage((System.AttributeTargets)1028, AllowMultiple = true, Inherited = true)] public sealed class RootDesignerSerializerAttribute : System.Attribute { public RootDesignerSerializerAttribute(string serializerTypeName, string baseSerializerTypeName, bool reloadable) => throw null; @@ -1024,6 +1037,7 @@ public enum ViewTechnology Default = 2, } } + [System.AttributeUsage((System.AttributeTargets)1028)] public sealed class DesignTimeVisibleAttribute : System.Attribute { public DesignTimeVisibleAttribute() => throw null; @@ -1111,6 +1125,7 @@ public class ExpandableObjectConverter : System.ComponentModel.TypeConverter public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, System.Attribute[] attributes) => throw null; public override bool GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext context) => throw null; } + [System.AttributeUsage((System.AttributeTargets)32767)] public sealed class ExtenderProvidedPropertyAttribute : System.Attribute { public ExtenderProvidedPropertyAttribute() => throw null; @@ -1230,6 +1245,7 @@ public interface INestedSite : System.IServiceProvider, System.ComponentModel.IS { string FullName { get; } } + [System.AttributeUsage((System.AttributeTargets)896)] public sealed class InheritanceAttribute : System.Attribute { public InheritanceAttribute() => throw null; @@ -1250,6 +1266,7 @@ public enum InheritanceLevel InheritedReadOnly = 2, NotInherited = 3, } + [System.AttributeUsage((System.AttributeTargets)4)] public class InstallerTypeAttribute : System.Attribute { public InstallerTypeAttribute(string typeName) => throw null; @@ -1345,6 +1362,7 @@ public abstract class LicenseProvider protected LicenseProvider() => throw null; public abstract System.ComponentModel.License GetLicense(System.ComponentModel.LicenseContext context, System.Type type, object instance, bool allowExceptions); } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false, Inherited = false)] public sealed class LicenseProviderAttribute : System.Attribute { public LicenseProviderAttribute() => throw null; @@ -1368,6 +1386,7 @@ public class LicFileLicenseProvider : System.ComponentModel.LicenseProvider public override System.ComponentModel.License GetLicense(System.ComponentModel.LicenseContext context, System.Type type, object instance, bool allowExceptions) => throw null; protected virtual bool IsKeyValid(string key, System.Type type) => throw null; } + [System.AttributeUsage((System.AttributeTargets)32767)] public sealed class ListBindableAttribute : System.Attribute { public ListBindableAttribute(bool listBindable) => throw null; @@ -1435,6 +1454,7 @@ public enum ListSortDirection Ascending = 0, Descending = 1, } + [System.AttributeUsage((System.AttributeTargets)4)] public sealed class LookupBindingPropertiesAttribute : System.Attribute { public LookupBindingPropertiesAttribute() => throw null; @@ -1621,6 +1641,7 @@ public class NullableConverter : System.ComponentModel.TypeConverter public System.Type UnderlyingType { get => throw null; } public System.ComponentModel.TypeConverter UnderlyingTypeConverter { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)32767)] public sealed class PasswordPropertyTextAttribute : System.Attribute { public PasswordPropertyTextAttribute() => throw null; @@ -1715,6 +1736,7 @@ public class PropertyDescriptorCollection : System.Collections.ICollection, Syst public virtual System.ComponentModel.PropertyDescriptor this[string name] { get => throw null; } System.Collections.ICollection System.Collections.IDictionary.Values { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)32767)] public class PropertyTabAttribute : System.Attribute { public PropertyTabAttribute() => throw null; @@ -1738,6 +1760,7 @@ public enum PropertyTabScope Document = 2, Component = 3, } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = true)] public sealed class ProvidePropertyAttribute : System.Attribute { public ProvidePropertyAttribute(string propertyName, string receiverTypeName) => throw null; @@ -1748,6 +1771,7 @@ public sealed class ProvidePropertyAttribute : System.Attribute public string ReceiverTypeName { get => throw null; } public override object TypeId { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)128)] public class RecommendedAsConfigurableAttribute : System.Attribute { public RecommendedAsConfigurableAttribute(bool recommendedAsConfigurable) => throw null; @@ -1778,6 +1802,7 @@ public class RefreshEventArgs : System.EventArgs public System.Type TypeChanged { get => throw null; } } public delegate void RefreshEventHandler(System.ComponentModel.RefreshEventArgs e); + [System.AttributeUsage((System.AttributeTargets)4)] public class RunInstallerAttribute : System.Attribute { public RunInstallerAttribute(bool runInstaller) => throw null; @@ -1793,6 +1818,7 @@ public class SByteConverter : System.ComponentModel.BaseNumberConverter { public SByteConverter() => throw null; } + [System.AttributeUsage((System.AttributeTargets)128)] public sealed class SettingsBindableAttribute : System.Attribute { public bool Bindable { get => throw null; } @@ -1834,6 +1860,7 @@ public class TimeSpanConverter : System.ComponentModel.TypeConverter public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) => throw null; public TimeSpanConverter() => throw null; } + [System.AttributeUsage((System.AttributeTargets)32767)] public class ToolboxItemAttribute : System.Attribute { public ToolboxItemAttribute(bool defaultType) => throw null; @@ -1847,6 +1874,7 @@ public class ToolboxItemAttribute : System.Attribute public System.Type ToolboxItemType { get => throw null; } public string ToolboxItemTypeName { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = true, Inherited = true)] public sealed class ToolboxItemFilterAttribute : System.Attribute { public ToolboxItemFilterAttribute(string filterString) => throw null; @@ -2167,6 +2195,7 @@ public class Timer : System.ComponentModel.Component, System.ComponentModel.ISup public void Stop() => throw null; public System.ComponentModel.ISynchronizeInvoke SynchronizingObject { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)32767)] public class TimersDescriptionAttribute : System.ComponentModel.DescriptionAttribute { public TimersDescriptionAttribute(string description) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Data.Common.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Data.Common.cs index 976ccb3a69f8..e9df8ea54f1f 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Data.Common.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Data.Common.cs @@ -747,6 +747,7 @@ public abstract class DbProviderFactory public virtual System.Data.Common.DbParameter CreateParameter() => throw null; protected DbProviderFactory() => throw null; } + [System.AttributeUsage((System.AttributeTargets)128, AllowMultiple = false, Inherited = true)] public sealed class DbProviderSpecificTypePropertyAttribute : System.Attribute { public DbProviderSpecificTypePropertyAttribute(bool isProviderSpecificTypeProperty) => throw null; @@ -1344,6 +1345,7 @@ public enum DataSetDateTime UnspecifiedLocal = 3, Utc = 4, } + [System.AttributeUsage((System.AttributeTargets)32767)] public class DataSysDescriptionAttribute : System.ComponentModel.DescriptionAttribute { public DataSysDescriptionAttribute(string description) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs index 5f4667d35df5..68695d594be5 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Contracts.cs @@ -32,19 +32,23 @@ public static class Contract public static T Result() => throw null; public static T ValueAtReturn(out T value) => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false)] public sealed class ContractAbbreviatorAttribute : System.Attribute { public ContractAbbreviatorAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false)] public sealed class ContractArgumentValidatorAttribute : System.Attribute { public ContractArgumentValidatorAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)5124, AllowMultiple = false, Inherited = false)] public sealed class ContractClassAttribute : System.Attribute { public ContractClassAttribute(System.Type typeContainingContracts) => throw null; public System.Type TypeContainingContracts { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false, Inherited = false)] public sealed class ContractClassForAttribute : System.Attribute { public ContractClassForAttribute(System.Type typeContractsAreFor) => throw null; @@ -71,10 +75,12 @@ public enum ContractFailureKind Assert = 4, Assume = 5, } + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false, Inherited = false)] public sealed class ContractInvariantMethodAttribute : System.Attribute { public ContractInvariantMethodAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)32767, AllowMultiple = true, Inherited = false)] public sealed class ContractOptionAttribute : System.Attribute { public string Category { get => throw null; } @@ -84,24 +90,29 @@ public sealed class ContractOptionAttribute : System.Attribute public string Setting { get => throw null; } public string Value { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)256)] public sealed class ContractPublicPropertyNameAttribute : System.Attribute { public ContractPublicPropertyNameAttribute(string name) => throw null; public string Name { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1)] public sealed class ContractReferenceAssemblyAttribute : System.Attribute { public ContractReferenceAssemblyAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)192, AllowMultiple = false, Inherited = true)] public sealed class ContractRuntimeIgnoredAttribute : System.Attribute { public ContractRuntimeIgnoredAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)237)] public sealed class ContractVerificationAttribute : System.Attribute { public ContractVerificationAttribute(bool value) => throw null; public bool Value { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)6884, AllowMultiple = false, Inherited = true)] public sealed class PureAttribute : System.Attribute { public PureAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs index 8e00f43bcf16..14cf6c198be3 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Process.cs @@ -24,6 +24,7 @@ public class DataReceivedEventArgs : System.EventArgs public string Data { get => throw null; } } public delegate void DataReceivedEventHandler(object sender, System.Diagnostics.DataReceivedEventArgs e); + [System.AttributeUsage((System.AttributeTargets)32767)] public class MonitoringDescriptionAttribute : System.ComponentModel.DescriptionAttribute { public MonitoringDescriptionAttribute(string description) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs index cd0bc6024967..a6a1a0d53035 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.TraceSource.cs @@ -88,6 +88,7 @@ public abstract class Switch protected int SwitchSetting { get => throw null; set { } } public string Value { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)741)] public sealed class SwitchAttribute : System.Attribute { public SwitchAttribute(string switchName, System.Type switchType) => throw null; @@ -96,6 +97,7 @@ public sealed class SwitchAttribute : System.Attribute public string SwitchName { get => throw null; set { } } public System.Type SwitchType { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)4)] public sealed class SwitchLevelAttribute : System.Attribute { public SwitchLevelAttribute(System.Type switchLevelType) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs index 25bdb670c506..fda5a8f585b9 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Diagnostics.Tracing.cs @@ -23,6 +23,7 @@ public enum EventActivityOptions Recursive = 4, Detachable = 8, } + [System.AttributeUsage((System.AttributeTargets)64)] public sealed class EventAttribute : System.Attribute { public System.Diagnostics.Tracing.EventActivityOptions ActivityOptions { get => throw null; set { } } @@ -66,11 +67,13 @@ public class EventCounter : System.Diagnostics.Tracing.DiagnosticCounter public void WriteMetric(double value) => throw null; public void WriteMetric(float value) => throw null; } + [System.AttributeUsage((System.AttributeTargets)12, Inherited = false)] public class EventDataAttribute : System.Attribute { public EventDataAttribute() => throw null; public string Name { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)128)] public class EventFieldAttribute : System.Attribute { public EventFieldAttribute() => throw null; @@ -92,6 +95,7 @@ public enum EventFieldTags { None = 0, } + [System.AttributeUsage((System.AttributeTargets)128)] public class EventIgnoreAttribute : System.Attribute { public EventIgnoreAttribute() => throw null; @@ -220,6 +224,7 @@ protected struct EventData protected void WriteEventWithRelatedActivityId(int eventId, System.Guid relatedActivityId, params object[] args) => throw null; protected unsafe void WriteEventWithRelatedActivityIdCore(int eventId, System.Guid* relatedActivityId, int eventDataCount, System.Diagnostics.Tracing.EventSource.EventData* data) => throw null; } + [System.AttributeUsage((System.AttributeTargets)4)] public sealed class EventSourceAttribute : System.Attribute { public EventSourceAttribute() => throw null; @@ -297,6 +302,7 @@ public class IncrementingPollingCounter : System.Diagnostics.Tracing.DiagnosticC public System.TimeSpan DisplayRateTimeScale { get => throw null; set { } } public override string ToString() => throw null; } + [System.AttributeUsage((System.AttributeTargets)64)] public sealed class NonEventAttribute : System.Attribute { public NonEventAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs index 6360c3eee21a..bd99e1bc2083 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Linq.Expressions.cs @@ -1108,6 +1108,7 @@ public abstract class DebugInfoGenerator protected DebugInfoGenerator() => throw null; public abstract void MarkSequencePoint(System.Linq.Expressions.LambdaExpression method, int ilOffset, System.Linq.Expressions.DebugInfoExpression sequencePoint); } + [System.AttributeUsage((System.AttributeTargets)10636)] public sealed class DynamicAttribute : System.Attribute { public DynamicAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ObjectModel.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ObjectModel.cs index 5435223d6353..20ae2c1ba0bc 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ObjectModel.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.ObjectModel.cs @@ -123,6 +123,7 @@ public class PropertyChangingEventArgs : System.EventArgs public virtual string PropertyName { get => throw null; } } public delegate void PropertyChangingEventHandler(object sender, System.ComponentModel.PropertyChangingEventArgs e); + [System.AttributeUsage((System.AttributeTargets)32767)] public sealed class TypeConverterAttribute : System.Attribute { public string ConverterTypeName { get => throw null; } @@ -133,6 +134,7 @@ public sealed class TypeConverterAttribute : System.Attribute public override bool Equals(object obj) => throw null; public override int GetHashCode() => throw null; } + [System.AttributeUsage((System.AttributeTargets)4, Inherited = true)] public sealed class TypeDescriptionProviderAttribute : System.Attribute { public TypeDescriptionProviderAttribute(string typeName) => throw null; @@ -160,6 +162,7 @@ public interface ICommand } namespace Markup { + [System.AttributeUsage((System.AttributeTargets)1244, AllowMultiple = false, Inherited = true)] public sealed class ValueSerializerAttribute : System.Attribute { public ValueSerializerAttribute(string valueSerializerTypeName) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs index a359bca22a8c..837618660d7d 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.CompilerServices.VisualC.cs @@ -9,10 +9,12 @@ namespace CompilerServices public static class CompilerMarshalOverride { } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = true)] public sealed class CppInlineNamespaceAttribute : System.Attribute { public CppInlineNamespaceAttribute(string dottedName) => throw null; } + [System.AttributeUsage((System.AttributeTargets)8)] public sealed class HasCopySemanticsAttribute : System.Attribute { public HasCopySemanticsAttribute() => throw null; @@ -47,15 +49,18 @@ public static class IsSignUnspecifiedByte public static class IsUdtReturn { } + [System.AttributeUsage((System.AttributeTargets)8, Inherited = true)] public sealed class NativeCppClassAttribute : System.Attribute { public NativeCppClassAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)1052, AllowMultiple = true, Inherited = false)] public sealed class RequiredAttributeAttribute : System.Attribute { public RequiredAttributeAttribute(System.Type requiredContract) => throw null; public System.Type RequiredContract { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)16)] public sealed class ScopelessEnumAttribute : System.Attribute { public ScopelessEnumAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.JavaScript.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.JavaScript.cs index f731e562f02f..46b3eb282654 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.JavaScript.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.JavaScript.cs @@ -12,6 +12,7 @@ public sealed class JSException : System.Exception { public JSException(string msg) => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false, AllowMultiple = false)] public sealed class JSExportAttribute : System.Attribute { public JSExportAttribute() => throw null; @@ -29,6 +30,7 @@ public static class JSHost public static System.Runtime.InteropServices.JavaScript.JSObject GlobalThis { get => throw null; } public static System.Threading.Tasks.Task ImportAsync(string moduleName, string moduleUrl, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false, AllowMultiple = false)] public sealed class JSImportAttribute : System.Attribute { public JSImportAttribute(string functionName) => throw null; @@ -36,6 +38,7 @@ public sealed class JSImportAttribute : System.Attribute public string FunctionName { get => throw null; } public string ModuleName { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)10240, Inherited = false, AllowMultiple = false)] public sealed class JSMarshalAsAttribute : System.Attribute where T : System.Runtime.InteropServices.JavaScript.JSType { public JSMarshalAsAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs index 3b68230ef19f..31116a73a0bc 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.InteropServices.cs @@ -65,11 +65,13 @@ namespace Runtime { namespace CompilerServices { + [System.AttributeUsage((System.AttributeTargets)2304, Inherited = false)] public sealed class IDispatchConstantAttribute : System.Runtime.CompilerServices.CustomConstantAttribute { public IDispatchConstantAttribute() => throw null; public override object Value { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)2304, Inherited = false)] public sealed class IUnknownConstantAttribute : System.Runtime.CompilerServices.CustomConstantAttribute { public IUnknownConstantAttribute() => throw null; @@ -78,6 +80,7 @@ public sealed class IUnknownConstantAttribute : System.Runtime.CompilerServices. } namespace InteropServices { + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false, Inherited = false)] public sealed class AllowReversePInvokeCallsAttribute : System.Attribute { public AllowReversePInvokeCallsAttribute() => throw null; @@ -93,11 +96,13 @@ public struct ArrayWithOffset : System.IEquatable throw null; public static bool operator !=(System.Runtime.InteropServices.ArrayWithOffset a, System.Runtime.InteropServices.ArrayWithOffset b) => throw null; } + [System.AttributeUsage((System.AttributeTargets)1029, Inherited = false)] public sealed class AutomationProxyAttribute : System.Attribute { public AutomationProxyAttribute(bool val) => throw null; public bool Value { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1037, Inherited = false)] public sealed class BestFitMappingAttribute : System.Attribute { public bool BestFitMapping { get => throw null; } @@ -118,6 +123,7 @@ public enum CallingConvention ThisCall = 4, FastCall = 5, } + [System.AttributeUsage((System.AttributeTargets)5, Inherited = false)] public sealed class ClassInterfaceAttribute : System.Attribute { public ClassInterfaceAttribute(short classInterfaceType) => throw null; @@ -140,6 +146,7 @@ public struct CLong : System.IEquatable public override string ToString() => throw null; public nint Value { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1024, Inherited = false)] public sealed class CoClassAttribute : System.Attribute { public System.Type CoClass { get => throw null; } @@ -151,6 +158,7 @@ public static class CollectionsMarshal public static TValue GetValueRefOrAddDefault(System.Collections.Generic.Dictionary dictionary, TKey key, out bool exists) => throw null; public static TValue GetValueRefOrNullRef(System.Collections.Generic.Dictionary dictionary, TKey key) => throw null; } + [System.AttributeUsage((System.AttributeTargets)10624, Inherited = false)] public sealed class ComAliasNameAttribute : System.Attribute { public ComAliasNameAttribute(string alias) => throw null; @@ -176,6 +184,7 @@ public class ComAwareEventInfo : System.Reflection.EventInfo public override System.Type ReflectedType { get => throw null; } public override void RemoveEventHandler(object target, System.Delegate handler) => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class ComCompatibleVersionAttribute : System.Attribute { public int BuildNumber { get => throw null; } @@ -184,15 +193,18 @@ public sealed class ComCompatibleVersionAttribute : System.Attribute public int MinorVersion { get => throw null; } public int RevisionNumber { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)32767, Inherited = false)] public sealed class ComConversionLossAttribute : System.Attribute { public ComConversionLossAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)4, Inherited = false)] public sealed class ComDefaultInterfaceAttribute : System.Attribute { public ComDefaultInterfaceAttribute(System.Type defaultInterface) => throw null; public System.Type Value { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1024, Inherited = false)] public sealed class ComEventInterfaceAttribute : System.Attribute { public ComEventInterfaceAttribute(System.Type SourceInterface, System.Type EventProvider) => throw null; @@ -213,6 +225,7 @@ public class COMException : System.Runtime.InteropServices.ExternalException public COMException(string message, int errorCode) => throw null; public override string ToString() => throw null; } + [System.AttributeUsage((System.AttributeTargets)1028, Inherited = false)] public sealed class ComImportAttribute : System.Attribute { public ComImportAttribute() => throw null; @@ -230,10 +243,12 @@ public enum ComMemberType PropGet = 1, PropSet = 2, } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false)] public sealed class ComRegisterFunctionAttribute : System.Attribute { public ComRegisterFunctionAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)4, Inherited = true)] public sealed class ComSourceInterfacesAttribute : System.Attribute { public ComSourceInterfacesAttribute(string sourceInterfaces) => throw null; @@ -843,6 +858,7 @@ public enum VARKIND VAR_DISPATCH = 3, } } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false)] public sealed class ComUnregisterFunctionAttribute : System.Attribute { public ComUnregisterFunctionAttribute() => throw null; @@ -914,16 +930,19 @@ public enum CustomQueryInterfaceResult NotHandled = 1, Failed = 2, } + [System.AttributeUsage((System.AttributeTargets)2, Inherited = false)] public sealed class DefaultCharSetAttribute : System.Attribute { public System.Runtime.InteropServices.CharSet CharSet { get => throw null; } public DefaultCharSetAttribute(System.Runtime.InteropServices.CharSet charSet) => throw null; } + [System.AttributeUsage((System.AttributeTargets)65, AllowMultiple = false)] public sealed class DefaultDllImportSearchPathsAttribute : System.Attribute { public DefaultDllImportSearchPathsAttribute(System.Runtime.InteropServices.DllImportSearchPath paths) => throw null; public System.Runtime.InteropServices.DllImportSearchPath Paths { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)2048)] public sealed class DefaultParameterValueAttribute : System.Attribute { public DefaultParameterValueAttribute(object value) => throw null; @@ -934,11 +953,13 @@ public sealed class DispatchWrapper public DispatchWrapper(object obj) => throw null; public object WrappedObject { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)960, Inherited = false)] public sealed class DispIdAttribute : System.Attribute { public DispIdAttribute(int dispId) => throw null; public int Value { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false)] public sealed class DllImportAttribute : System.Attribute { public bool BestFitMapping; @@ -964,6 +985,7 @@ public enum DllImportSearchPath System32 = 2048, SafeDirectories = 4096, } + [System.AttributeUsage((System.AttributeTargets)1024, AllowMultiple = false, Inherited = false)] public sealed class DynamicInterfaceCastableImplementationAttribute : System.Attribute { public DynamicInterfaceCastableImplementationAttribute() => throw null; @@ -975,6 +997,7 @@ public sealed class ErrorWrapper public ErrorWrapper(object errorCode) => throw null; public int ErrorCode { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)5149, Inherited = false)] public sealed class GuidAttribute : System.Attribute { public GuidAttribute(string guid) => throw null; @@ -1024,11 +1047,13 @@ public interface IDynamicInterfaceCastable System.RuntimeTypeHandle GetInterfaceImplementation(System.RuntimeTypeHandle interfaceType); bool IsInterfaceImplemented(System.RuntimeTypeHandle interfaceType, bool throwIfNotImplemented); } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class ImportedFromTypeLibAttribute : System.Attribute { public ImportedFromTypeLibAttribute(string tlbFile) => throw null; public string Value { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1024, Inherited = false)] public sealed class InterfaceTypeAttribute : System.Attribute { public InterfaceTypeAttribute(short interfaceType) => throw null; @@ -1049,11 +1074,13 @@ public class InvalidOleVariantTypeException : System.SystemException public InvalidOleVariantTypeException(string message) => throw null; public InvalidOleVariantTypeException(string message, System.Exception inner) => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false)] public sealed class LCIDConversionAttribute : System.Attribute { public LCIDConversionAttribute(int lcid) => throw null; public int Value { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false, Inherited = false)] public sealed class LibraryImportAttribute : System.Attribute { public LibraryImportAttribute(string libraryName) => throw null; @@ -1063,6 +1090,7 @@ public sealed class LibraryImportAttribute : System.Attribute public System.Runtime.InteropServices.StringMarshalling StringMarshalling { get => throw null; set { } } public System.Type StringMarshallingCustomType { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false, AllowMultiple = false)] public sealed class ManagedToNativeComInteropStubAttribute : System.Attribute { public System.Type ClassType { get => throw null; } @@ -1235,6 +1263,7 @@ public static class Marshal public static void ZeroFreeGlobalAllocAnsi(nint s) => throw null; public static void ZeroFreeGlobalAllocUnicode(nint s) => throw null; } + [System.AttributeUsage((System.AttributeTargets)10496, Inherited = false)] public sealed class MarshalAsAttribute : System.Attribute { public System.Runtime.InteropServices.UnmanagedType ArraySubType; @@ -1306,6 +1335,7 @@ public struct ManagedToUnmanagedIn public unsafe ushort* ToUnmanaged() => throw null; } } + [System.AttributeUsage((System.AttributeTargets)10240, AllowMultiple = true)] public sealed class MarshalUsingAttribute : System.Attribute { public int ConstantElementCount { get => throw null; set { } } @@ -1625,11 +1655,13 @@ public enum MessageSendFunction public static void SetMessageSendPendingException(System.Exception exception) => throw null; public unsafe delegate delegate* unmanaged UnhandledExceptionPropagationHandler(System.Exception exception, System.RuntimeMethodHandle lastMethod, out nint context); } + [System.AttributeUsage((System.AttributeTargets)4, Inherited = true, AllowMultiple = false)] public sealed class ObjectiveCTrackedTypeAttribute : System.Attribute { public ObjectiveCTrackedTypeAttribute() => throw null; } } + [System.AttributeUsage((System.AttributeTargets)2048, Inherited = false)] public sealed class OptionalAttribute : System.Attribute { public OptionalAttribute() => throw null; @@ -1658,16 +1690,19 @@ public sealed class PosixSignalRegistration : System.IDisposable public static System.Runtime.InteropServices.PosixSignalRegistration Create(System.Runtime.InteropServices.PosixSignal signal, System.Action handler) => throw null; public void Dispose() => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false)] public sealed class PreserveSigAttribute : System.Attribute { public PreserveSigAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false, AllowMultiple = true)] public sealed class PrimaryInteropAssemblyAttribute : System.Attribute { public PrimaryInteropAssemblyAttribute(int major, int minor) => throw null; public int MajorVersion { get => throw null; } public int MinorVersion { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)4, Inherited = false)] public sealed class ProgIdAttribute : System.Attribute { public ProgIdAttribute(string progId) => throw null; @@ -1714,6 +1749,7 @@ public enum StringMarshalling Utf8 = 1, Utf16 = 2, } + [System.AttributeUsage((System.AttributeTargets)5144, AllowMultiple = false, Inherited = false)] public sealed class TypeIdentifierAttribute : System.Attribute { public TypeIdentifierAttribute() => throw null; @@ -1721,6 +1757,7 @@ public sealed class TypeIdentifierAttribute : System.Attribute public string Identifier { get => throw null; } public string Scope { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false)] public sealed class TypeLibFuncAttribute : System.Attribute { public TypeLibFuncAttribute(short flags) => throw null; @@ -1744,11 +1781,13 @@ public enum TypeLibFuncFlags FReplaceable = 2048, FImmediateBind = 4096, } + [System.AttributeUsage((System.AttributeTargets)1024, Inherited = false)] public sealed class TypeLibImportClassAttribute : System.Attribute { public TypeLibImportClassAttribute(System.Type importClass) => throw null; public string Value { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1052, Inherited = false)] public sealed class TypeLibTypeAttribute : System.Attribute { public TypeLibTypeAttribute(short flags) => throw null; @@ -1773,6 +1812,7 @@ public enum TypeLibTypeFlags FDispatchable = 4096, FReverseBind = 8192, } + [System.AttributeUsage((System.AttributeTargets)256, Inherited = false)] public sealed class TypeLibVarAttribute : System.Attribute { public TypeLibVarAttribute(short flags) => throw null; @@ -1796,6 +1836,7 @@ public enum TypeLibVarFlags FReplaceable = 2048, FImmediateBind = 4096, } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class TypeLibVersionAttribute : System.Attribute { public TypeLibVersionAttribute(int major, int minor) => throw null; @@ -1807,17 +1848,20 @@ public sealed class UnknownWrapper public UnknownWrapper(object obj) => throw null; public object WrappedObject { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false, Inherited = false)] public sealed class UnmanagedCallConvAttribute : System.Attribute { public System.Type[] CallConvs; public UnmanagedCallConvAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false)] public sealed class UnmanagedCallersOnlyAttribute : System.Attribute { public System.Type[] CallConvs; public UnmanagedCallersOnlyAttribute() => throw null; public string EntryPoint; } + [System.AttributeUsage((System.AttributeTargets)4096, AllowMultiple = false, Inherited = false)] public sealed class UnmanagedFunctionPointerAttribute : System.Attribute { public bool BestFitMapping; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs index eb7dc133afd7..02ba58c70c7b 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Loader.cs @@ -10,6 +10,7 @@ public static partial class AssemblyExtensions { public static unsafe bool TryGetRawMetadata(this System.Reflection.Assembly assembly, out byte* blob, out int length) => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = true)] public sealed class MetadataUpdateHandlerAttribute : System.Attribute { public MetadataUpdateHandlerAttribute(System.Type handlerType) => throw null; @@ -26,10 +27,12 @@ namespace Runtime { namespace CompilerServices { + [System.AttributeUsage((System.AttributeTargets)12, AllowMultiple = false)] public sealed class CreateNewOnMetadataUpdateAttribute : System.Attribute { public CreateNewOnMetadataUpdateAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)12, AllowMultiple = false, Inherited = false)] public class MetadataUpdateOriginalTypeAttribute : System.Attribute { public MetadataUpdateOriginalTypeAttribute(System.Type originalType) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs index a03bf2aa7fca..5cb8f373c288 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.Serialization.Primitives.cs @@ -6,6 +6,7 @@ namespace Runtime { namespace Serialization { + [System.AttributeUsage((System.AttributeTargets)12, Inherited = false, AllowMultiple = false)] public sealed class CollectionDataContractAttribute : System.Attribute { public CollectionDataContractAttribute() => throw null; @@ -22,12 +23,14 @@ public sealed class CollectionDataContractAttribute : System.Attribute public string Namespace { get => throw null; set { } } public string ValueName { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)3, Inherited = false, AllowMultiple = true)] public sealed class ContractNamespaceAttribute : System.Attribute { public string ClrNamespace { get => throw null; set { } } public string ContractNamespace { get => throw null; } public ContractNamespaceAttribute(string contractNamespace) => throw null; } + [System.AttributeUsage((System.AttributeTargets)28, Inherited = false, AllowMultiple = false)] public sealed class DataContractAttribute : System.Attribute { public DataContractAttribute() => throw null; @@ -38,6 +41,7 @@ public sealed class DataContractAttribute : System.Attribute public string Name { get => throw null; set { } } public string Namespace { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)384, Inherited = false, AllowMultiple = false)] public sealed class DataMemberAttribute : System.Attribute { public DataMemberAttribute() => throw null; @@ -47,12 +51,14 @@ public sealed class DataMemberAttribute : System.Attribute public string Name { get => throw null; set { } } public int Order { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)256, Inherited = false, AllowMultiple = false)] public sealed class EnumMemberAttribute : System.Attribute { public EnumMemberAttribute() => throw null; public bool IsValueSetExplicitly { get => throw null; } public string Value { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)384, Inherited = false, AllowMultiple = false)] public sealed class IgnoreDataMemberAttribute : System.Attribute { public IgnoreDataMemberAttribute() => throw null; @@ -77,6 +83,7 @@ public interface ISerializationSurrogateProvider2 : System.Runtime.Serialization void GetKnownCustomDataTypes(System.Collections.ObjectModel.Collection customDataTypes); System.Type GetReferencedTypeOnImport(string typeName, string typeNamespace, object customData); } + [System.AttributeUsage((System.AttributeTargets)12, Inherited = true, AllowMultiple = true)] public sealed class KnownTypeAttribute : System.Attribute { public KnownTypeAttribute(string methodName) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.cs index c1bd5c8846cf..d399e0ae98ed 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Runtime.cs @@ -446,6 +446,7 @@ public class AssemblyLoadEventArgs : System.EventArgs } public delegate void AssemblyLoadEventHandler(object sender, System.AssemblyLoadEventArgs args); public delegate void AsyncCallback(System.IAsyncResult ar); + [System.AttributeUsage((System.AttributeTargets)32767, Inherited = true, AllowMultiple = false)] public abstract class Attribute { protected Attribute() => throw null; @@ -507,6 +508,7 @@ public enum AttributeTargets GenericParameter = 16384, All = 32767, } + [System.AttributeUsage((System.AttributeTargets)4, Inherited = true)] public sealed class AttributeUsageAttribute : System.Attribute { public bool AllowMultiple { get => throw null; set { } } @@ -1018,6 +1020,7 @@ public sealed class CharEnumerator : System.ICloneable, System.IDisposable, Syst public bool MoveNext() => throw null; public void Reset() => throw null; } + [System.AttributeUsage((System.AttributeTargets)32767, Inherited = true, AllowMultiple = false)] public sealed class CLSCompliantAttribute : System.Attribute { public CLSCompliantAttribute(bool isCompliant) => throw null; @@ -1027,6 +1030,7 @@ namespace CodeDom { namespace Compiler { + [System.AttributeUsage((System.AttributeTargets)32767, Inherited = false, AllowMultiple = false)] public sealed class GeneratedCodeAttribute : System.Attribute { public GeneratedCodeAttribute(string tool, string version) => throw null; @@ -1537,6 +1541,7 @@ public sealed class ValueCollection : System.Collections.Generic.ICollection(T x, T y); namespace ComponentModel { + [System.AttributeUsage((System.AttributeTargets)32767)] public class DefaultValueAttribute : System.Attribute { public DefaultValueAttribute(bool value) => throw null; @@ -1559,6 +1564,7 @@ public class DefaultValueAttribute : System.Attribute protected void SetValue(object value) => throw null; public virtual object Value { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)6140)] public sealed class EditorBrowsableAttribute : System.Attribute { public EditorBrowsableAttribute() => throw null; @@ -1606,6 +1612,7 @@ public class ContextMarshalException : System.SystemException public ContextMarshalException(string message) => throw null; public ContextMarshalException(string message, System.Exception inner) => throw null; } + [System.AttributeUsage((System.AttributeTargets)256, Inherited = false)] public class ContextStaticAttribute : System.Attribute { public ContextStaticAttribute() => throw null; @@ -2488,29 +2495,35 @@ namespace Diagnostics { namespace CodeAnalysis { + [System.AttributeUsage((System.AttributeTargets)2432, Inherited = false)] public sealed class AllowNullAttribute : System.Attribute { public AllowNullAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)2048, Inherited = false)] public sealed class ConstantExpectedAttribute : System.Attribute { public ConstantExpectedAttribute() => throw null; public object Max { get => throw null; set { } } public object Min { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)2432, Inherited = false)] public sealed class DisallowNullAttribute : System.Attribute { public DisallowNullAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false)] public sealed class DoesNotReturnAttribute : System.Attribute { public DoesNotReturnAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)2048, Inherited = false)] public sealed class DoesNotReturnIfAttribute : System.Attribute { public DoesNotReturnIfAttribute(bool parameterValue) => throw null; public bool ParameterValue { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)28108, Inherited = false)] public sealed class DynamicallyAccessedMembersAttribute : System.Attribute { public DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes memberTypes) => throw null; @@ -2536,6 +2549,7 @@ public enum DynamicallyAccessedMemberTypes NonPublicEvents = 4096, Interfaces = 8192, } + [System.AttributeUsage((System.AttributeTargets)352, AllowMultiple = true, Inherited = false)] public sealed class DynamicDependencyAttribute : System.Attribute { public string AssemblyName { get => throw null; } @@ -2550,26 +2564,31 @@ public sealed class DynamicDependencyAttribute : System.Attribute public System.Type Type { get => throw null; } public string TypeName { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)749, Inherited = false, AllowMultiple = false)] public sealed class ExcludeFromCodeCoverageAttribute : System.Attribute { public ExcludeFromCodeCoverageAttribute() => throw null; public string Justification { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)10624, Inherited = false)] public sealed class MaybeNullAttribute : System.Attribute { public MaybeNullAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)2048, Inherited = false)] public sealed class MaybeNullWhenAttribute : System.Attribute { public MaybeNullWhenAttribute(bool returnValue) => throw null; public bool ReturnValue { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)192, Inherited = false, AllowMultiple = true)] public sealed class MemberNotNullAttribute : System.Attribute { public MemberNotNullAttribute(string member) => throw null; public MemberNotNullAttribute(params string[] members) => throw null; public string[] Members { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)192, Inherited = false, AllowMultiple = true)] public sealed class MemberNotNullWhenAttribute : System.Attribute { public MemberNotNullWhenAttribute(bool returnValue, string member) => throw null; @@ -2577,20 +2596,24 @@ public sealed class MemberNotNullWhenAttribute : System.Attribute public string[] Members { get => throw null; } public bool ReturnValue { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)10624, Inherited = false)] public sealed class NotNullAttribute : System.Attribute { public NotNullAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)10368, AllowMultiple = true, Inherited = false)] public sealed class NotNullIfNotNullAttribute : System.Attribute { public NotNullIfNotNullAttribute(string parameterName) => throw null; public string ParameterName { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)2048, Inherited = false)] public sealed class NotNullWhenAttribute : System.Attribute { public NotNullWhenAttribute(bool returnValue) => throw null; public bool ReturnValue { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)736, Inherited = false, AllowMultiple = false)] public sealed class RequiresAssemblyFilesAttribute : System.Attribute { public RequiresAssemblyFilesAttribute() => throw null; @@ -2598,22 +2621,26 @@ public sealed class RequiresAssemblyFilesAttribute : System.Attribute public string Message { get => throw null; } public string Url { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)100, Inherited = false)] public sealed class RequiresDynamicCodeAttribute : System.Attribute { public RequiresDynamicCodeAttribute(string message) => throw null; public string Message { get => throw null; } public string Url { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)100, Inherited = false)] public sealed class RequiresUnreferencedCodeAttribute : System.Attribute { public RequiresUnreferencedCodeAttribute(string message) => throw null; public string Message { get => throw null; } public string Url { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)32, AllowMultiple = false, Inherited = false)] public sealed class SetsRequiredMembersAttribute : System.Attribute { public SetsRequiredMembersAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)2432, AllowMultiple = false, Inherited = false)] public sealed class StringSyntaxAttribute : System.Attribute { public object[] Arguments { get => throw null; } @@ -2633,6 +2660,7 @@ public sealed class StringSyntaxAttribute : System.Attribute public const string Uri = default; public const string Xml = default; } + [System.AttributeUsage((System.AttributeTargets)32767, Inherited = false, AllowMultiple = true)] public sealed class SuppressMessageAttribute : System.Attribute { public string Category { get => throw null; } @@ -2643,6 +2671,7 @@ public sealed class SuppressMessageAttribute : System.Attribute public string Scope { get => throw null; set { } } public string Target { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)32767, Inherited = false, AllowMultiple = true)] public sealed class UnconditionalSuppressMessageAttribute : System.Attribute { public string Category { get => throw null; } @@ -2653,11 +2682,13 @@ public sealed class UnconditionalSuppressMessageAttribute : System.Attribute public string Scope { get => throw null; set { } } public string Target { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)2240, AllowMultiple = false, Inherited = false)] public sealed class UnscopedRefAttribute : System.Attribute { public UnscopedRefAttribute() => throw null; } } + [System.AttributeUsage((System.AttributeTargets)68, AllowMultiple = true)] public sealed class ConditionalAttribute : System.Attribute { public string ConditionString { get => throw null; } @@ -2732,6 +2763,7 @@ public struct WriteIfInterpolatedStringHandler public static void WriteLineIf(bool condition, string message) => throw null; public static void WriteLineIf(bool condition, string message, string category) => throw null; } + [System.AttributeUsage((System.AttributeTargets)3, AllowMultiple = false)] public sealed class DebuggableAttribute : System.Attribute { public DebuggableAttribute(bool isJITTrackingEnabled, bool isJITOptimizerDisabled) => throw null; @@ -2759,6 +2791,7 @@ public static class Debugger public static void Log(int level, string category, string message) => throw null; public static void NotifyOfCrossThreadDependency() => throw null; } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false)] public sealed class DebuggerBrowsableAttribute : System.Attribute { public DebuggerBrowsableAttribute(System.Diagnostics.DebuggerBrowsableState state) => throw null; @@ -2770,6 +2803,7 @@ public enum DebuggerBrowsableState Collapsed = 2, RootHidden = 3, } + [System.AttributeUsage((System.AttributeTargets)4509, AllowMultiple = true)] public sealed class DebuggerDisplayAttribute : System.Attribute { public DebuggerDisplayAttribute(string value) => throw null; @@ -2779,22 +2813,27 @@ public sealed class DebuggerDisplayAttribute : System.Attribute public string Type { get => throw null; set { } } public string Value { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)224, Inherited = false)] public sealed class DebuggerHiddenAttribute : System.Attribute { public DebuggerHiddenAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)236, Inherited = false)] public sealed class DebuggerNonUserCodeAttribute : System.Attribute { public DebuggerNonUserCodeAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)96, Inherited = false)] public sealed class DebuggerStepperBoundaryAttribute : System.Attribute { public DebuggerStepperBoundaryAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)108, Inherited = false)] public sealed class DebuggerStepThroughAttribute : System.Attribute { public DebuggerStepThroughAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)13, AllowMultiple = true)] public sealed class DebuggerTypeProxyAttribute : System.Attribute { public DebuggerTypeProxyAttribute(string typeName) => throw null; @@ -2803,6 +2842,7 @@ public sealed class DebuggerTypeProxyAttribute : System.Attribute public System.Type Target { get => throw null; set { } } public string TargetTypeName { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)13, AllowMultiple = true)] public sealed class DebuggerVisualizerAttribute : System.Attribute { public DebuggerVisualizerAttribute(string visualizerTypeName) => throw null; @@ -2817,6 +2857,7 @@ public sealed class DebuggerVisualizerAttribute : System.Attribute public string VisualizerObjectSourceTypeName { get => throw null; } public string VisualizerTypeName { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)108, Inherited = false)] public sealed class StackTraceHiddenAttribute : System.Attribute { public StackTraceHiddenAttribute() => throw null; @@ -3269,6 +3310,7 @@ public class FileStyleUriParser : System.UriParser { public FileStyleUriParser() => throw null; } + [System.AttributeUsage((System.AttributeTargets)16, Inherited = false)] public class FlagsAttribute : System.Attribute { public FlagsAttribute() => throw null; @@ -6528,6 +6570,7 @@ public enum LoaderOptimization MultiDomainHost = 3, DisallowBindings = 4, } + [System.AttributeUsage((System.AttributeTargets)64)] public sealed class LoaderOptimizationAttribute : System.Attribute { public LoaderOptimizationAttribute(byte value) => throw null; @@ -6808,6 +6851,7 @@ public struct ModuleHandle : System.IEquatable public System.RuntimeTypeHandle ResolveTypeHandle(int typeToken) => throw null; public System.RuntimeTypeHandle ResolveTypeHandle(int typeToken, System.RuntimeTypeHandle[] typeInstantiationContext, System.RuntimeTypeHandle[] methodInstantiationContext) => throw null; } + [System.AttributeUsage((System.AttributeTargets)64)] public sealed class MTAThreadAttribute : System.Attribute { public MTAThreadAttribute() => throw null; @@ -6858,6 +6902,7 @@ public class NewsStyleUriParser : System.UriParser { public NewsStyleUriParser() => throw null; } + [System.AttributeUsage((System.AttributeTargets)256, Inherited = false)] public sealed class NonSerializedAttribute : System.Attribute { public NonSerializedAttribute() => throw null; @@ -7259,6 +7304,7 @@ public class ObjectDisposedException : System.InvalidOperationException public static void ThrowIf(bool condition, object instance) => throw null; public static void ThrowIf(bool condition, System.Type type) => throw null; } + [System.AttributeUsage((System.AttributeTargets)6140, Inherited = false)] public sealed class ObsoleteAttribute : System.Attribute { public ObsoleteAttribute() => throw null; @@ -7325,6 +7371,7 @@ public class OverflowException : System.ArithmeticException public OverflowException(string message) => throw null; public OverflowException(string message, System.Exception innerException) => throw null; } + [System.AttributeUsage((System.AttributeTargets)2048, Inherited = true, AllowMultiple = false)] public sealed class ParamArrayAttribute : System.Attribute { public ParamArrayAttribute() => throw null; @@ -7531,17 +7578,20 @@ public abstract class Assembly : System.Reflection.ICustomAttributeProvider, Sys public override string ToString() => throw null; public static System.Reflection.Assembly UnsafeLoadFrom(string assemblyFile) => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyAlgorithmIdAttribute : System.Attribute { public uint AlgorithmId { get => throw null; } public AssemblyAlgorithmIdAttribute(System.Configuration.Assemblies.AssemblyHashAlgorithm algorithmId) => throw null; public AssemblyAlgorithmIdAttribute(uint algorithmId) => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyCompanyAttribute : System.Attribute { public string Company { get => throw null; } public AssemblyCompanyAttribute(string company) => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyConfigurationAttribute : System.Attribute { public string Configuration { get => throw null; } @@ -7552,36 +7602,43 @@ public enum AssemblyContentType Default = 0, WindowsRuntime = 1, } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyCopyrightAttribute : System.Attribute { public string Copyright { get => throw null; } public AssemblyCopyrightAttribute(string copyright) => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyCultureAttribute : System.Attribute { public AssemblyCultureAttribute(string culture) => throw null; public string Culture { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyDefaultAliasAttribute : System.Attribute { public AssemblyDefaultAliasAttribute(string defaultAlias) => throw null; public string DefaultAlias { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyDelaySignAttribute : System.Attribute { public AssemblyDelaySignAttribute(bool delaySign) => throw null; public bool DelaySign { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyDescriptionAttribute : System.Attribute { public AssemblyDescriptionAttribute(string description) => throw null; public string Description { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyFileVersionAttribute : System.Attribute { public AssemblyFileVersionAttribute(string version) => throw null; public string Version { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyFlagsAttribute : System.Attribute { public int AssemblyFlags { get => throw null; } @@ -7590,21 +7647,25 @@ public sealed class AssemblyFlagsAttribute : System.Attribute public AssemblyFlagsAttribute(uint flags) => throw null; public uint Flags { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyInformationalVersionAttribute : System.Attribute { public AssemblyInformationalVersionAttribute(string informationalVersion) => throw null; public string InformationalVersion { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyKeyFileAttribute : System.Attribute { public AssemblyKeyFileAttribute(string keyFile) => throw null; public string KeyFile { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyKeyNameAttribute : System.Attribute { public AssemblyKeyNameAttribute(string keyName) => throw null; public string KeyName { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = true, Inherited = false)] public sealed class AssemblyMetadataAttribute : System.Attribute { public AssemblyMetadataAttribute(string key, string value) => throw null; @@ -7653,27 +7714,32 @@ public class AssemblyNameProxy : System.MarshalByRefObject public AssemblyNameProxy() => throw null; public System.Reflection.AssemblyName GetAssemblyName(string assemblyFile) => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyProductAttribute : System.Attribute { public AssemblyProductAttribute(string product) => throw null; public string Product { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false, AllowMultiple = false)] public sealed class AssemblySignatureKeyAttribute : System.Attribute { public string Countersignature { get => throw null; } public AssemblySignatureKeyAttribute(string publicKey, string countersignature) => throw null; public string PublicKey { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyTitleAttribute : System.Attribute { public AssemblyTitleAttribute(string title) => throw null; public string Title { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyTrademarkAttribute : System.Attribute { public AssemblyTrademarkAttribute(string trademark) => throw null; public string Trademark { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyVersionAttribute : System.Attribute { public AssemblyVersionAttribute(string version) => throw null; @@ -7825,6 +7891,7 @@ public struct CustomAttributeTypedArgument : System.IEquatable throw null; public object Value { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1036)] public sealed class DefaultMemberAttribute : System.Attribute { public DefaultMemberAttribute(string memberName) => throw null; @@ -8255,12 +8322,14 @@ public enum NullabilityState NotNull = 1, Nullable = 2, } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = false, Inherited = false)] public sealed class ObfuscateAssemblyAttribute : System.Attribute { public bool AssemblyIsPrivate { get => throw null; } public ObfuscateAssemblyAttribute(bool assemblyIsPrivate) => throw null; public bool StripAfterObfuscation { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)8157, AllowMultiple = true, Inherited = false)] public sealed class ObfuscationAttribute : System.Attribute { public bool ApplyToMembers { get => throw null; set { } } @@ -8615,6 +8684,7 @@ public class MissingSatelliteAssemblyException : System.SystemException public MissingSatelliteAssemblyException(string message, string cultureName) => throw null; public string CultureName { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = false)] public sealed class NeutralResourcesLanguageAttribute : System.Attribute { public NeutralResourcesLanguageAttribute(string cultureName) => throw null; @@ -8678,6 +8748,7 @@ public class ResourceSet : System.IDisposable, System.Collections.IEnumerable public virtual string GetString(string name, bool ignoreCase) => throw null; protected virtual void ReadResources() => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = false)] public sealed class SatelliteContractVersionAttribute : System.Attribute { public SatelliteContractVersionAttribute(string version) => throw null; @@ -8697,6 +8768,7 @@ public sealed class AmbiguousImplementationException : System.Exception public AmbiguousImplementationException(string message) => throw null; public AmbiguousImplementationException(string message, System.Exception innerException) => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class AssemblyTargetedPatchBandAttribute : System.Attribute { public AssemblyTargetedPatchBandAttribute(string targetedPatchBand) => throw null; @@ -8704,6 +8776,7 @@ public sealed class AssemblyTargetedPatchBandAttribute : System.Attribute } namespace CompilerServices { + [System.AttributeUsage((System.AttributeTargets)256)] public sealed class AccessedThroughPropertyAttribute : System.Attribute { public AccessedThroughPropertyAttribute(string propertyName) => throw null; @@ -8717,15 +8790,18 @@ public struct AsyncIteratorMethodBuilder public static System.Runtime.CompilerServices.AsyncIteratorMethodBuilder Create() => throw null; public void MoveNext(ref TStateMachine stateMachine) where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false, AllowMultiple = false)] public sealed class AsyncIteratorStateMachineAttribute : System.Runtime.CompilerServices.StateMachineAttribute { public AsyncIteratorStateMachineAttribute(System.Type stateMachineType) : base(default(System.Type)) => throw null; } + [System.AttributeUsage((System.AttributeTargets)5212, Inherited = false, AllowMultiple = false)] public sealed class AsyncMethodBuilderAttribute : System.Attribute { public System.Type BuilderType { get => throw null; } public AsyncMethodBuilderAttribute(System.Type builderType) => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false, AllowMultiple = false)] public sealed class AsyncStateMachineAttribute : System.Runtime.CompilerServices.StateMachineAttribute { public AsyncStateMachineAttribute(System.Type stateMachineType) : base(default(System.Type)) => throw null; @@ -8808,19 +8884,23 @@ public class CallConvThiscall { public CallConvThiscall() => throw null; } + [System.AttributeUsage((System.AttributeTargets)2048, AllowMultiple = false, Inherited = false)] public sealed class CallerArgumentExpressionAttribute : System.Attribute { public CallerArgumentExpressionAttribute(string parameterName) => throw null; public string ParameterName { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)2048, Inherited = false)] public sealed class CallerFilePathAttribute : System.Attribute { public CallerFilePathAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)2048, Inherited = false)] public sealed class CallerLineNumberAttribute : System.Attribute { public CallerLineNumberAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)2048, Inherited = false)] public sealed class CallerMemberNameAttribute : System.Attribute { public CallerMemberNameAttribute() => throw null; @@ -8830,12 +8910,14 @@ public enum CompilationRelaxations { NoStringInterning = 8, } + [System.AttributeUsage((System.AttributeTargets)71)] public class CompilationRelaxationsAttribute : System.Attribute { public int CompilationRelaxations { get => throw null; } public CompilationRelaxationsAttribute(int relaxations) => throw null; public CompilationRelaxationsAttribute(System.Runtime.CompilerServices.CompilationRelaxations relaxations) => throw null; } + [System.AttributeUsage((System.AttributeTargets)32767, AllowMultiple = true, Inherited = false)] public sealed class CompilerFeatureRequiredAttribute : System.Attribute { public CompilerFeatureRequiredAttribute(string featureName) => throw null; @@ -8844,10 +8926,12 @@ public sealed class CompilerFeatureRequiredAttribute : System.Attribute public const string RefStructs = default; public const string RequiredMembers = default; } + [System.AttributeUsage((System.AttributeTargets)32767, Inherited = true)] public sealed class CompilerGeneratedAttribute : System.Attribute { public CompilerGeneratedAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)4)] public class CompilerGlobalScopeAttribute : System.Attribute { public CompilerGlobalScopeAttribute() => throw null; @@ -8927,22 +9011,26 @@ public struct ConfiguredValueTaskAwaiter : System.Runtime.CompilerServices.ICrit } public System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable.ConfiguredValueTaskAwaiter GetAwaiter() => throw null; } + [System.AttributeUsage((System.AttributeTargets)2304, Inherited = false)] public abstract class CustomConstantAttribute : System.Attribute { protected CustomConstantAttribute() => throw null; public abstract object Value { get; } } + [System.AttributeUsage((System.AttributeTargets)2304, Inherited = false)] public sealed class DateTimeConstantAttribute : System.Runtime.CompilerServices.CustomConstantAttribute { public DateTimeConstantAttribute(long ticks) => throw null; public override object Value { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)2304, Inherited = false)] public sealed class DecimalConstantAttribute : System.Attribute { public DecimalConstantAttribute(byte scale, byte sign, int hi, int mid, int low) => throw null; public DecimalConstantAttribute(byte scale, byte sign, uint hi, uint mid, uint low) => throw null; public decimal Value { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1)] public sealed class DefaultDependencyAttribute : System.Attribute { public DefaultDependencyAttribute(System.Runtime.CompilerServices.LoadHint loadHintArgument) => throw null; @@ -8966,36 +9054,44 @@ public struct DefaultInterpolatedStringHandler public override string ToString() => throw null; public string ToStringAndClear() => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = true)] public sealed class DependencyAttribute : System.Attribute { public DependencyAttribute(string dependentAssemblyArgument, System.Runtime.CompilerServices.LoadHint loadHintArgument) => throw null; public string DependentAssembly { get => throw null; } public System.Runtime.CompilerServices.LoadHint LoadHint { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = false, Inherited = false)] public sealed class DisablePrivateReflectionAttribute : System.Attribute { public DisablePrivateReflectionAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false, AllowMultiple = false)] public sealed class DisableRuntimeMarshallingAttribute : System.Attribute { public DisableRuntimeMarshallingAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)32767)] public class DiscardableAttribute : System.Attribute { public DiscardableAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)2048, Inherited = false)] public sealed class EnumeratorCancellationAttribute : System.Attribute { public EnumeratorCancellationAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)69)] public sealed class ExtensionAttribute : System.Attribute { public ExtensionAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)256)] public sealed class FixedAddressValueTypeAttribute : System.Attribute { public FixedAddressValueTypeAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)256, Inherited = false)] public sealed class FixedBufferAttribute : System.Attribute { public FixedBufferAttribute(System.Type elementType, int length) => throw null; @@ -9015,6 +9111,7 @@ public interface ICriticalNotifyCompletion : System.Runtime.CompilerServices.INo { void UnsafeOnCompleted(System.Action continuation); } + [System.AttributeUsage((System.AttributeTargets)128, Inherited = true)] public sealed class IndexerNameAttribute : System.Attribute { public IndexerNameAttribute(string indexerName) => throw null; @@ -9023,22 +9120,26 @@ public interface INotifyCompletion { void OnCompleted(System.Action continuation); } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = true, Inherited = false)] public sealed class InternalsVisibleToAttribute : System.Attribute { public bool AllInternalsVisible { get => throw null; set { } } public string AssemblyName { get => throw null; } public InternalsVisibleToAttribute(string assemblyName) => throw null; } + [System.AttributeUsage((System.AttributeTargets)2048, AllowMultiple = false, Inherited = false)] public sealed class InterpolatedStringHandlerArgumentAttribute : System.Attribute { public string[] Arguments { get => throw null; } public InterpolatedStringHandlerArgumentAttribute(string argument) => throw null; public InterpolatedStringHandlerArgumentAttribute(params string[] arguments) => throw null; } + [System.AttributeUsage((System.AttributeTargets)12, AllowMultiple = false, Inherited = false)] public sealed class InterpolatedStringHandlerAttribute : System.Attribute { public InterpolatedStringHandlerAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)8)] public sealed class IsByRefLikeAttribute : System.Attribute { public IsByRefLikeAttribute() => throw null; @@ -9049,6 +9150,7 @@ public static class IsConst public static class IsExternalInit { } + [System.AttributeUsage((System.AttributeTargets)32767, Inherited = false)] public sealed class IsReadOnlyAttribute : System.Attribute { public IsReadOnlyAttribute() => throw null; @@ -9060,6 +9162,7 @@ public interface IStrongBox public static class IsVolatile { } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false, AllowMultiple = false)] public sealed class IteratorStateMachineAttribute : System.Runtime.CompilerServices.StateMachineAttribute { public IteratorStateMachineAttribute(System.Type stateMachineType) : base(default(System.Type)) => throw null; @@ -9082,6 +9185,7 @@ public enum MethodCodeType OPTIL = 2, Runtime = 3, } + [System.AttributeUsage((System.AttributeTargets)96, Inherited = false)] public sealed class MethodImplAttribute : System.Attribute { public MethodImplAttribute() => throw null; @@ -9103,6 +9207,7 @@ public enum MethodImplOptions AggressiveOptimization = 512, InternalCall = 4096, } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false)] public sealed class ModuleInitializerAttribute : System.Attribute { public ModuleInitializerAttribute() => throw null; @@ -9129,20 +9234,24 @@ public struct PoolingAsyncValueTaskMethodBuilder public void Start(ref TStateMachine stateMachine) where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine => throw null; public System.Threading.Tasks.ValueTask Task { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false, Inherited = false)] public sealed class PreserveBaseOverridesAttribute : System.Attribute { public PreserveBaseOverridesAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = false)] public sealed class ReferenceAssemblyAttribute : System.Attribute { public ReferenceAssemblyAttribute() => throw null; public ReferenceAssemblyAttribute(string description) => throw null; public string Description { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)396, AllowMultiple = false, Inherited = false)] public sealed class RequiredMemberAttribute : System.Attribute { public RequiredMemberAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false, AllowMultiple = false)] public sealed class RuntimeCompatibilityAttribute : System.Attribute { public RuntimeCompatibilityAttribute() => throw null; @@ -9194,19 +9303,23 @@ public sealed class RuntimeWrappedException : System.Exception public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) => throw null; public object WrappedException { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1774, Inherited = false)] public sealed class SkipLocalsInitAttribute : System.Attribute { public SkipLocalsInitAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)972)] public sealed class SpecialNameAttribute : System.Attribute { public SpecialNameAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false, AllowMultiple = false)] public class StateMachineAttribute : System.Attribute { public StateMachineAttribute(System.Type stateMachineType) => throw null; public System.Type StateMachineType { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, Inherited = false)] public sealed class StringFreezingAttribute : System.Attribute { public StringFreezingAttribute() => throw null; @@ -9218,6 +9331,7 @@ public class StrongBox : System.Runtime.CompilerServices.IStrongBox public T Value; object System.Runtime.CompilerServices.IStrongBox.Value { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)3)] public sealed class SuppressIldasmAttribute : System.Attribute { public SuppressIldasmAttribute() => throw null; @@ -9247,16 +9361,19 @@ public struct TaskAwaiter : System.Runtime.CompilerServices.ICriticalNo public void OnCompleted(System.Action continuation) => throw null; public void UnsafeOnCompleted(System.Action continuation) => throw null; } + [System.AttributeUsage((System.AttributeTargets)11148)] public sealed class TupleElementNamesAttribute : System.Attribute { public TupleElementNamesAttribute(string[] transformNames) => throw null; public System.Collections.Generic.IList TransformNames { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)5148, Inherited = false, AllowMultiple = false)] public sealed class TypeForwardedFromAttribute : System.Attribute { public string AssemblyFullName { get => throw null; } public TypeForwardedFromAttribute(string assemblyFullName) => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = true, Inherited = false)] public sealed class TypeForwardedToAttribute : System.Attribute { public TypeForwardedToAttribute(System.Type destination) => throw null; @@ -9307,6 +9424,7 @@ public static class Unsafe public static void WriteUnaligned(ref byte destination, T value) => throw null; public static unsafe void WriteUnaligned(void* destination, T value) => throw null; } + [System.AttributeUsage((System.AttributeTargets)8)] public sealed class UnsafeValueTypeAttribute : System.Attribute { public UnsafeValueTypeAttribute() => throw null; @@ -9356,10 +9474,12 @@ public abstract class CriticalFinalizerObject { protected CriticalFinalizerObject() => throw null; } + [System.AttributeUsage((System.AttributeTargets)96, Inherited = false)] public sealed class PrePrepareMethodAttribute : System.Attribute { public PrePrepareMethodAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)1133, Inherited = false)] public sealed class ReliabilityContractAttribute : System.Attribute { public System.Runtime.ConstrainedExecution.Cer Cer { get => throw null; } @@ -9396,6 +9516,7 @@ public class FirstChanceExceptionEventArgs : System.EventArgs public FirstChanceExceptionEventArgs(System.Exception exception) => throw null; public System.Exception Exception { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false, Inherited = false)] public sealed class HandleProcessCorruptedStateExceptionsAttribute : System.Attribute { public HandleProcessCorruptedStateExceptionsAttribute() => throw null; @@ -9441,6 +9562,7 @@ public enum CharSet Unicode = 3, Auto = 4, } + [System.AttributeUsage((System.AttributeTargets)5597, Inherited = false)] public sealed class ComVisibleAttribute : System.Attribute { public ComVisibleAttribute(bool visibility) => throw null; @@ -9469,6 +9591,7 @@ public class ExternalException : System.SystemException public virtual int ErrorCode { get => throw null; } public override string ToString() => throw null; } + [System.AttributeUsage((System.AttributeTargets)256, Inherited = false)] public sealed class FieldOffsetAttribute : System.Attribute { public FieldOffsetAttribute(int offset) => throw null; @@ -9499,6 +9622,7 @@ public enum GCHandleType Normal = 2, Pinned = 3, } + [System.AttributeUsage((System.AttributeTargets)2048, Inherited = false)] public sealed class InAttribute : System.Attribute { public InAttribute() => throw null; @@ -9511,10 +9635,12 @@ public enum LayoutKind } namespace Marshalling { + [System.AttributeUsage((System.AttributeTargets)12)] public sealed class ContiguousCollectionMarshallerAttribute : System.Attribute { public ContiguousCollectionMarshallerAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)12, AllowMultiple = true)] public sealed class CustomMarshallerAttribute : System.Attribute { public CustomMarshallerAttribute(System.Type managedType, System.Runtime.InteropServices.Marshalling.MarshalMode marshalMode, System.Type marshallerType) => throw null; @@ -9538,6 +9664,7 @@ public enum MarshalMode ElementRef = 8, ElementOut = 9, } + [System.AttributeUsage((System.AttributeTargets)4124)] public sealed class NativeMarshallingAttribute : System.Attribute { public NativeMarshallingAttribute(System.Type nativeType) => throw null; @@ -9599,6 +9726,7 @@ public struct OSPlatform : System.IEquatable throw null; public static System.Runtime.InteropServices.OSPlatform Windows { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)2048, Inherited = false)] public sealed class OutAttribute : System.Attribute { public OutAttribute() => throw null; @@ -9644,6 +9772,7 @@ public abstract class SafeHandle : System.Runtime.ConstrainedExecution.CriticalF protected void SetHandle(nint handle) => throw null; public void SetHandleAsInvalid() => throw null; } + [System.AttributeUsage((System.AttributeTargets)12, Inherited = false)] public sealed class StructLayoutAttribute : System.Attribute { public System.Runtime.InteropServices.CharSet CharSet; @@ -9653,6 +9782,7 @@ public sealed class StructLayoutAttribute : System.Attribute public int Size; public System.Runtime.InteropServices.LayoutKind Value { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false)] public sealed class SuppressGCTransitionAttribute : System.Attribute { public SuppressGCTransitionAttribute() => throw null; @@ -9761,22 +9891,27 @@ public interface ISerializable { void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context); } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false)] public sealed class OnDeserializedAttribute : System.Attribute { public OnDeserializedAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false)] public sealed class OnDeserializingAttribute : System.Attribute { public OnDeserializingAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false)] public sealed class OnSerializedAttribute : System.Attribute { public OnSerializedAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)64, Inherited = false)] public sealed class OnSerializingAttribute : System.Attribute { public OnSerializingAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)256, Inherited = false)] public sealed class OptionalFieldAttribute : System.Attribute { public OptionalFieldAttribute() => throw null; @@ -9878,6 +10013,7 @@ public enum StreamingContextStates All = 255, } } + [System.AttributeUsage((System.AttributeTargets)96, AllowMultiple = false, Inherited = false)] public sealed class TargetedPatchingOptOutAttribute : System.Attribute { public TargetedPatchingOptOutAttribute(string reason) => throw null; @@ -9885,6 +10021,7 @@ public sealed class TargetedPatchingOptOutAttribute : System.Attribute } namespace Versioning { + [System.AttributeUsage((System.AttributeTargets)5887, AllowMultiple = false, Inherited = false)] public sealed class ComponentGuaranteesAttribute : System.Attribute { public ComponentGuaranteesAttribute(System.Runtime.Versioning.ComponentGuaranteesOptions guarantees) => throw null; @@ -9914,6 +10051,7 @@ public sealed class FrameworkName : System.IEquatable throw null; public System.Version Version { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)2047, AllowMultiple = true, Inherited = false)] public sealed class ObsoletedOSPlatformAttribute : System.Runtime.Versioning.OSPlatformAttribute { public ObsoletedOSPlatformAttribute(string platformName) => throw null; @@ -9925,6 +10063,7 @@ public abstract class OSPlatformAttribute : System.Attribute { public string PlatformName { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)6143, Inherited = false)] public sealed class RequiresPreviewFeaturesAttribute : System.Attribute { public RequiresPreviewFeaturesAttribute() => throw null; @@ -9932,6 +10071,7 @@ public sealed class RequiresPreviewFeaturesAttribute : System.Attribute public string Message { get => throw null; } public string Url { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)224, Inherited = false)] public sealed class ResourceConsumptionAttribute : System.Attribute { public System.Runtime.Versioning.ResourceScope ConsumptionScope { get => throw null; } @@ -9939,6 +10079,7 @@ public sealed class ResourceConsumptionAttribute : System.Attribute public ResourceConsumptionAttribute(System.Runtime.Versioning.ResourceScope resourceScope, System.Runtime.Versioning.ResourceScope consumptionScope) => throw null; public System.Runtime.Versioning.ResourceScope ResourceScope { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)480, Inherited = false)] public sealed class ResourceExposureAttribute : System.Attribute { public ResourceExposureAttribute(System.Runtime.Versioning.ResourceScope exposureLevel) => throw null; @@ -9955,30 +10096,36 @@ public enum ResourceScope Private = 16, Assembly = 32, } + [System.AttributeUsage((System.AttributeTargets)2047, AllowMultiple = true, Inherited = false)] public sealed class SupportedOSPlatformAttribute : System.Runtime.Versioning.OSPlatformAttribute { public SupportedOSPlatformAttribute(string platformName) => throw null; } + [System.AttributeUsage((System.AttributeTargets)448, AllowMultiple = true, Inherited = false)] public sealed class SupportedOSPlatformGuardAttribute : System.Runtime.Versioning.OSPlatformAttribute { public SupportedOSPlatformGuardAttribute(string platformName) => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = false, Inherited = false)] public sealed class TargetFrameworkAttribute : System.Attribute { public TargetFrameworkAttribute(string frameworkName) => throw null; public string FrameworkDisplayName { get => throw null; set { } } public string FrameworkName { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = false, Inherited = false)] public sealed class TargetPlatformAttribute : System.Runtime.Versioning.OSPlatformAttribute { public TargetPlatformAttribute(string platformName) => throw null; } + [System.AttributeUsage((System.AttributeTargets)2047, AllowMultiple = true, Inherited = false)] public sealed class UnsupportedOSPlatformAttribute : System.Runtime.Versioning.OSPlatformAttribute { public UnsupportedOSPlatformAttribute(string platformName) => throw null; public UnsupportedOSPlatformAttribute(string platformName, string message) => throw null; public string Message { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)448, AllowMultiple = true, Inherited = false)] public sealed class UnsupportedOSPlatformGuardAttribute : System.Runtime.Versioning.OSPlatformAttribute { public UnsupportedOSPlatformGuardAttribute(string platformName) => throw null; @@ -10167,6 +10314,7 @@ public struct SByte : System.Numerics.IAdditionOperators, S } namespace Security { + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = false, Inherited = false)] public sealed class AllowPartiallyTrustedCallersAttribute : System.Attribute { public AllowPartiallyTrustedCallersAttribute() => throw null; @@ -10211,6 +10359,7 @@ public enum PartialTrustVisibilityLevel } namespace Permissions { + [System.AttributeUsage((System.AttributeTargets)109, AllowMultiple = true, Inherited = false)] public abstract class CodeAccessSecurityAttribute : System.Security.Permissions.SecurityAttribute { protected CodeAccessSecurityAttribute(System.Security.Permissions.SecurityAction action) : base(default(System.Security.Permissions.SecurityAction)) => throw null; @@ -10232,6 +10381,7 @@ public enum SecurityAction RequestOptional = 9, RequestRefuse = 10, } + [System.AttributeUsage((System.AttributeTargets)109, AllowMultiple = true, Inherited = false)] public abstract class SecurityAttribute : System.Attribute { public System.Security.Permissions.SecurityAction Action { get => throw null; set { } } @@ -10239,6 +10389,7 @@ public abstract class SecurityAttribute : System.Attribute protected SecurityAttribute(System.Security.Permissions.SecurityAction action) => throw null; public bool Unrestricted { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)109, AllowMultiple = true, Inherited = false)] public sealed class SecurityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute { public bool Assertion { get => throw null; set { } } @@ -10347,6 +10498,7 @@ public enum TokenImpersonationLevel Delegation = 4, } } + [System.AttributeUsage((System.AttributeTargets)5501, AllowMultiple = false, Inherited = false)] public sealed class SecurityCriticalAttribute : System.Attribute { public SecurityCriticalAttribute() => throw null; @@ -10402,6 +10554,7 @@ public class SecurityException : System.SystemException public override string ToString() => throw null; public string Url { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = false)] public sealed class SecurityRulesAttribute : System.Attribute { public SecurityRulesAttribute(System.Security.SecurityRuleSet ruleSet) => throw null; @@ -10414,22 +10567,27 @@ public enum SecurityRuleSet : byte Level1 = 1, Level2 = 2, } + [System.AttributeUsage((System.AttributeTargets)5500, AllowMultiple = false, Inherited = false)] public sealed class SecuritySafeCriticalAttribute : System.Attribute { public SecuritySafeCriticalAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)1, AllowMultiple = false, Inherited = false)] public sealed class SecurityTransparentAttribute : System.Attribute { public SecurityTransparentAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)5501, AllowMultiple = false, Inherited = false)] public sealed class SecurityTreatAsSafeAttribute : System.Attribute { public SecurityTreatAsSafeAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)5188, AllowMultiple = true, Inherited = false)] public sealed class SuppressUnmanagedCodeSecurityAttribute : System.Attribute { public SuppressUnmanagedCodeSecurityAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)2, AllowMultiple = true, Inherited = false)] public sealed class UnverifiableCodeAttribute : System.Attribute { public UnverifiableCodeAttribute() => throw null; @@ -10442,6 +10600,7 @@ public class VerificationException : System.SystemException public VerificationException(string message, System.Exception innerException) => throw null; } } + [System.AttributeUsage((System.AttributeTargets)4124, Inherited = false)] public sealed class SerializableAttribute : System.Attribute { public SerializableAttribute() => throw null; @@ -10675,6 +10834,7 @@ public sealed class StackOverflowException : System.SystemException public StackOverflowException(string message) => throw null; public StackOverflowException(string message, System.Exception innerException) => throw null; } + [System.AttributeUsage((System.AttributeTargets)64)] public sealed class STAThreadAttribute : System.Attribute { public STAThreadAttribute() => throw null; @@ -11998,6 +12158,7 @@ public static partial class WaitHandleExtensions public static void SetSafeWaitHandle(this System.Threading.WaitHandle waitHandle, Microsoft.Win32.SafeHandles.SafeWaitHandle value) => throw null; } } + [System.AttributeUsage((System.AttributeTargets)256, Inherited = false)] public class ThreadStaticAttribute : System.Attribute { public ThreadStaticAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Json.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Json.cs index c82449571d9e..cc9925e61482 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Json.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.Json.cs @@ -501,6 +501,7 @@ public abstract class JsonAttribute : System.Attribute { protected JsonAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)32, AllowMultiple = false)] public sealed class JsonConstructorAttribute : System.Text.Json.Serialization.JsonAttribute { public JsonConstructorAttribute() => throw null; @@ -519,6 +520,7 @@ public abstract class JsonConverter : System.Text.Json.Serialization.JsonConv public abstract void Write(System.Text.Json.Utf8JsonWriter writer, T value, System.Text.Json.JsonSerializerOptions options); public virtual void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, T value, System.Text.Json.JsonSerializerOptions options) => throw null; } + [System.AttributeUsage((System.AttributeTargets)1436, AllowMultiple = false)] public class JsonConverterAttribute : System.Text.Json.Serialization.JsonAttribute { public System.Type ConverterType { get => throw null; } @@ -531,6 +533,7 @@ public abstract class JsonConverterFactory : System.Text.Json.Serialization.Json public abstract System.Text.Json.Serialization.JsonConverter CreateConverter(System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options); protected JsonConverterFactory() => throw null; } + [System.AttributeUsage((System.AttributeTargets)1028, AllowMultiple = true, Inherited = false)] public class JsonDerivedTypeAttribute : System.Text.Json.Serialization.JsonAttribute { public JsonDerivedTypeAttribute(System.Type derivedType) => throw null; @@ -539,10 +542,12 @@ public class JsonDerivedTypeAttribute : System.Text.Json.Serialization.JsonAttri public System.Type DerivedType { get => throw null; } public object TypeDiscriminator { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false)] public sealed class JsonExtensionDataAttribute : System.Text.Json.Serialization.JsonAttribute { public JsonExtensionDataAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false)] public sealed class JsonIgnoreAttribute : System.Text.Json.Serialization.JsonAttribute { public System.Text.Json.Serialization.JsonIgnoreCondition Condition { get => throw null; set { } } @@ -555,6 +560,7 @@ public enum JsonIgnoreCondition WhenWritingDefault = 2, WhenWritingNull = 3, } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false)] public sealed class JsonIncludeAttribute : System.Text.Json.Serialization.JsonAttribute { public JsonIncludeAttribute() => throw null; @@ -572,11 +578,13 @@ public enum JsonNumberHandling WriteAsString = 2, AllowNamedFloatingPointLiterals = 4, } + [System.AttributeUsage((System.AttributeTargets)396, AllowMultiple = false)] public sealed class JsonNumberHandlingAttribute : System.Text.Json.Serialization.JsonAttribute { public JsonNumberHandlingAttribute(System.Text.Json.Serialization.JsonNumberHandling handling) => throw null; public System.Text.Json.Serialization.JsonNumberHandling Handling { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1028, AllowMultiple = false, Inherited = false)] public sealed class JsonPolymorphicAttribute : System.Text.Json.Serialization.JsonAttribute { public JsonPolymorphicAttribute() => throw null; @@ -584,20 +592,24 @@ public sealed class JsonPolymorphicAttribute : System.Text.Json.Serialization.Js public string TypeDiscriminatorPropertyName { get => throw null; set { } } public System.Text.Json.Serialization.JsonUnknownDerivedTypeHandling UnknownDerivedTypeHandling { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false)] public sealed class JsonPropertyNameAttribute : System.Text.Json.Serialization.JsonAttribute { public JsonPropertyNameAttribute(string name) => throw null; public string Name { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false)] public sealed class JsonPropertyOrderAttribute : System.Text.Json.Serialization.JsonAttribute { public JsonPropertyOrderAttribute(int order) => throw null; public int Order { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)384, AllowMultiple = false)] public sealed class JsonRequiredAttribute : System.Text.Json.Serialization.JsonAttribute { public JsonRequiredAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = true)] public sealed class JsonSerializableAttribute : System.Text.Json.Serialization.JsonAttribute { public JsonSerializableAttribute(System.Type type) => throw null; @@ -619,6 +631,7 @@ public enum JsonSourceGenerationMode Metadata = 1, Serialization = 2, } + [System.AttributeUsage((System.AttributeTargets)4, AllowMultiple = false)] public sealed class JsonSourceGenerationOptionsAttribute : System.Text.Json.Serialization.JsonAttribute { public JsonSourceGenerationOptionsAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs index 235693df8aa3..18f601ea3ed2 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Text.RegularExpressions.cs @@ -43,6 +43,7 @@ public class CaptureCollection : System.Collections.Generic.ICollection throw null; } public System.Text.RegularExpressions.Capture this[int i] { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)64, AllowMultiple = false, Inherited = false)] public sealed class GeneratedRegexAttribute : System.Attribute { public GeneratedRegexAttribute(string pattern) => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs index 0b4e91673711..8b06ae6c2264 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.ReaderWriter.cs @@ -879,10 +879,12 @@ public interface IXmlSerializable void ReadXml(System.Xml.XmlReader reader); void WriteXml(System.Xml.XmlWriter writer); } + [System.AttributeUsage((System.AttributeTargets)10624, AllowMultiple = false)] public class XmlAnyAttributeAttribute : System.Attribute { public XmlAnyAttributeAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)10624, AllowMultiple = true)] public class XmlAnyElementAttribute : System.Attribute { public XmlAnyElementAttribute() => throw null; @@ -892,6 +894,7 @@ public class XmlAnyElementAttribute : System.Attribute public string Namespace { get => throw null; set { } } public int Order { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)10624)] public class XmlAttributeAttribute : System.Attribute { public string AttributeName { get => throw null; set { } } @@ -904,6 +907,7 @@ public class XmlAttributeAttribute : System.Attribute public string Namespace { get => throw null; set { } } public System.Type Type { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)10624, AllowMultiple = true)] public class XmlElementAttribute : System.Attribute { public XmlElementAttribute() => throw null; @@ -918,20 +922,24 @@ public class XmlElementAttribute : System.Attribute public int Order { get => throw null; set { } } public System.Type Type { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)256)] public class XmlEnumAttribute : System.Attribute { public XmlEnumAttribute() => throw null; public XmlEnumAttribute(string name) => throw null; public string Name { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)10624)] public class XmlIgnoreAttribute : System.Attribute { public XmlIgnoreAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)10624, AllowMultiple = false)] public class XmlNamespaceDeclarationsAttribute : System.Attribute { public XmlNamespaceDeclarationsAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)9244)] public class XmlRootAttribute : System.Attribute { public XmlRootAttribute() => throw null; @@ -941,6 +949,7 @@ public class XmlRootAttribute : System.Attribute public bool IsNullable { get => throw null; set { } } public string Namespace { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)1036)] public sealed class XmlSchemaProviderAttribute : System.Attribute { public XmlSchemaProviderAttribute(string methodName) => throw null; @@ -956,6 +965,7 @@ public class XmlSerializerNamespaces public XmlSerializerNamespaces(System.Xml.XmlQualifiedName[] namespaces) => throw null; public System.Xml.XmlQualifiedName[] ToArray() => throw null; } + [System.AttributeUsage((System.AttributeTargets)10624)] public class XmlTextAttribute : System.Attribute { public XmlTextAttribute() => throw null; diff --git a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs index 63df5eb2ca04..0d57ef76deb4 100644 --- a/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs +++ b/csharp/ql/test/resources/stubs/_frameworks/Microsoft.NETCore.App/System.Xml.XmlSerializer.cs @@ -54,6 +54,7 @@ public interface IXmlTextParser public abstract class SchemaImporter { } + [System.AttributeUsage((System.AttributeTargets)10624)] public class SoapAttributeAttribute : System.Attribute { public string AttributeName { get => throw null; set { } } @@ -81,6 +82,7 @@ public class SoapAttributes public bool SoapIgnore { get => throw null; set { } } public System.Xml.Serialization.SoapTypeAttribute SoapType { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)10624)] public class SoapElementAttribute : System.Attribute { public SoapElementAttribute() => throw null; @@ -89,16 +91,19 @@ public class SoapElementAttribute : System.Attribute public string ElementName { get => throw null; set { } } public bool IsNullable { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)256)] public class SoapEnumAttribute : System.Attribute { public SoapEnumAttribute() => throw null; public SoapEnumAttribute(string name) => throw null; public string Name { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)10624)] public class SoapIgnoreAttribute : System.Attribute { public SoapIgnoreAttribute() => throw null; } + [System.AttributeUsage((System.AttributeTargets)1100, AllowMultiple = true)] public class SoapIncludeAttribute : System.Attribute { public SoapIncludeAttribute(System.Type type) => throw null; @@ -125,6 +130,7 @@ public class SoapSchemaMember public string MemberName { get => throw null; set { } } public System.Xml.XmlQualifiedName MemberType { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)1052)] public class SoapTypeAttribute : System.Attribute { public SoapTypeAttribute() => throw null; @@ -152,6 +158,7 @@ public class XmlAnyElementAttributes : System.Collections.CollectionBase public void Remove(System.Xml.Serialization.XmlAnyElementAttribute attribute) => throw null; public System.Xml.Serialization.XmlAnyElementAttribute this[int index] { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)10624, AllowMultiple = false)] public class XmlArrayAttribute : System.Attribute { public XmlArrayAttribute() => throw null; @@ -162,6 +169,7 @@ public class XmlArrayAttribute : System.Attribute public string Namespace { get => throw null; set { } } public int Order { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)10624, AllowMultiple = true)] public class XmlArrayItemAttribute : System.Attribute { public XmlArrayItemAttribute() => throw null; @@ -223,6 +231,7 @@ public class XmlAttributes public System.Xml.Serialization.XmlTextAttribute XmlText { get => throw null; set { } } public System.Xml.Serialization.XmlTypeAttribute XmlType { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)10624, AllowMultiple = false)] public class XmlChoiceIdentifierAttribute : System.Attribute { public XmlChoiceIdentifierAttribute() => throw null; @@ -256,6 +265,7 @@ public class XmlElementEventArgs : System.EventArgs public object ObjectBeingDeserialized { get => throw null; } } public delegate void XmlElementEventHandler(object sender, System.Xml.Serialization.XmlElementEventArgs e); + [System.AttributeUsage((System.AttributeTargets)1100, AllowMultiple = true)] public class XmlIncludeAttribute : System.Attribute { public XmlIncludeAttribute(System.Type type) => throw null; @@ -635,6 +645,7 @@ public class XmlSerializer public event System.Xml.Serialization.XmlNodeEventHandler UnknownNode; public event System.Xml.Serialization.UnreferencedObjectEventHandler UnreferencedObject; } + [System.AttributeUsage((System.AttributeTargets)1052, AllowMultiple = false)] public sealed class XmlSerializerAssemblyAttribute : System.Attribute { public string AssemblyName { get => throw null; set { } } @@ -666,6 +677,7 @@ public abstract class XmlSerializerImplementation public virtual System.Collections.Hashtable WriteMethods { get => throw null; } public virtual System.Xml.Serialization.XmlSerializationWriter Writer { get => throw null; } } + [System.AttributeUsage((System.AttributeTargets)1)] public sealed class XmlSerializerVersionAttribute : System.Attribute { public XmlSerializerVersionAttribute() => throw null; @@ -675,6 +687,7 @@ public sealed class XmlSerializerVersionAttribute : System.Attribute public System.Type Type { get => throw null; set { } } public string Version { get => throw null; set { } } } + [System.AttributeUsage((System.AttributeTargets)1052)] public class XmlTypeAttribute : System.Attribute { public bool AnonymousType { get => throw null; set { } }