Skip to content

Commit d00ff96

Browse files
committed
C#: Update .NET and ASP.NET stubs.
1 parent 82f5a02 commit d00ff96

File tree

59 files changed

+929
-929
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+929
-929
lines changed

csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Antiforgery.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class AntiforgeryOptions
1010
{
1111
public Microsoft.AspNetCore.Http.CookieBuilder Cookie { get => throw null; set { } }
1212
public AntiforgeryOptions() => throw null;
13-
public static string DefaultCookiePrefix;
13+
public static readonly string DefaultCookiePrefix;
1414
public string FormFieldName { get => throw null; set { } }
1515
public string HeaderName { get => throw null; set { } }
1616
public bool SuppressXFrameOptionsHeader { get => throw null; set { } }

csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.Cookies.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ public class ChunkingCookieManager : Microsoft.AspNetCore.Authentication.Cookies
2020
}
2121
public static class CookieAuthenticationDefaults
2222
{
23-
public static Microsoft.AspNetCore.Http.PathString AccessDeniedPath;
23+
public static readonly Microsoft.AspNetCore.Http.PathString AccessDeniedPath;
2424
public const string AuthenticationScheme = default;
25-
public static string CookiePrefix;
26-
public static Microsoft.AspNetCore.Http.PathString LoginPath;
27-
public static Microsoft.AspNetCore.Http.PathString LogoutPath;
28-
public static string ReturnUrlParameter;
25+
public static readonly string CookiePrefix;
26+
public static readonly Microsoft.AspNetCore.Http.PathString LoginPath;
27+
public static readonly Microsoft.AspNetCore.Http.PathString LogoutPath;
28+
public static readonly string ReturnUrlParameter;
2929
}
3030
public class CookieAuthenticationEvents
3131
{

csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Authentication.OAuth.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public class OAuthChallengeProperties : Microsoft.AspNetCore.Authentication.Auth
7474
public OAuthChallengeProperties(System.Collections.Generic.IDictionary<string, string> items) => throw null;
7575
public OAuthChallengeProperties(System.Collections.Generic.IDictionary<string, string> items, System.Collections.Generic.IDictionary<string, object> parameters) => throw null;
7676
public System.Collections.Generic.ICollection<string> Scope { get => throw null; set { } }
77-
public static string ScopeKey;
77+
public static readonly string ScopeKey;
7878
public virtual void SetScope(params string[] scopes) => throw null;
7979
}
8080
public class OAuthCodeExchangeContext
@@ -86,10 +86,10 @@ public class OAuthCodeExchangeContext
8686
}
8787
public static class OAuthConstants
8888
{
89-
public static string CodeChallengeKey;
90-
public static string CodeChallengeMethodKey;
91-
public static string CodeChallengeMethodS256;
92-
public static string CodeVerifierKey;
89+
public static readonly string CodeChallengeKey;
90+
public static readonly string CodeChallengeMethodKey;
91+
public static readonly string CodeChallengeMethodS256;
92+
public static readonly string CodeVerifierKey;
9393
}
9494
public class OAuthCreatingTicketContext : Microsoft.AspNetCore.Authentication.ResultContext<Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions>
9595
{
@@ -107,7 +107,7 @@ public class OAuthCreatingTicketContext : Microsoft.AspNetCore.Authentication.Re
107107
}
108108
public static class OAuthDefaults
109109
{
110-
public static string DisplayName;
110+
public static readonly string DisplayName;
111111
}
112112
public class OAuthEvents : Microsoft.AspNetCore.Authentication.RemoteAuthenticationEvents
113113
{

csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.Forms.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ public sealed class ValidationMessageStore
8181
public sealed class ValidationRequestedEventArgs : System.EventArgs
8282
{
8383
public ValidationRequestedEventArgs() => throw null;
84-
public static Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs Empty;
84+
public static readonly Microsoft.AspNetCore.Components.Forms.ValidationRequestedEventArgs Empty;
8585
}
8686
public sealed class ValidationStateChangedEventArgs : System.EventArgs
8787
{
8888
public ValidationStateChangedEventArgs() => throw null;
89-
public static Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs Empty;
89+
public static readonly Microsoft.AspNetCore.Components.Forms.ValidationStateChangedEventArgs Empty;
9090
}
9191
}
9292
}

csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Components.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,16 @@ public abstract class ErrorBoundaryBase : Microsoft.AspNetCore.Components.Compon
189189
public struct EventCallback
190190
{
191191
public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) => throw null;
192-
public static Microsoft.AspNetCore.Components.EventCallback Empty;
193-
public static Microsoft.AspNetCore.Components.EventCallbackFactory Factory;
192+
public static readonly Microsoft.AspNetCore.Components.EventCallback Empty;
193+
public static readonly Microsoft.AspNetCore.Components.EventCallbackFactory Factory;
194194
public bool HasDelegate { get => throw null; }
195195
public System.Threading.Tasks.Task InvokeAsync(object arg) => throw null;
196196
public System.Threading.Tasks.Task InvokeAsync() => throw null;
197197
}
198198
public struct EventCallback<TValue>
199199
{
200200
public EventCallback(Microsoft.AspNetCore.Components.IHandleEvent receiver, System.MulticastDelegate @delegate) => throw null;
201-
public static Microsoft.AspNetCore.Components.EventCallback<TValue> Empty;
201+
public static readonly Microsoft.AspNetCore.Components.EventCallback<TValue> Empty;
202202
public bool HasDelegate { get => throw null; }
203203
public System.Threading.Tasks.Task InvokeAsync(TValue arg) => throw null;
204204
public System.Threading.Tasks.Task InvokeAsync() => throw null;
@@ -297,7 +297,7 @@ public static partial class EventCallbackFactoryEventArgsExtensions
297297
public struct EventCallbackWorkItem
298298
{
299299
public EventCallbackWorkItem(System.MulticastDelegate @delegate) => throw null;
300-
public static Microsoft.AspNetCore.Components.EventCallbackWorkItem Empty;
300+
public static readonly Microsoft.AspNetCore.Components.EventCallbackWorkItem Empty;
301301
public System.Threading.Tasks.Task InvokeAsync(object arg) => throw null;
302302
}
303303
public sealed class EventHandlerAttribute : System.Attribute
@@ -543,9 +543,9 @@ public struct ArrayBuilderSegment<T> : System.Collections.Generic.IEnumerable<T>
543543
}
544544
public struct ArrayRange<T>
545545
{
546-
public T[] Array;
546+
public readonly T[] Array;
547547
public Microsoft.AspNetCore.Components.RenderTree.ArrayRange<T> Clone() => throw null;
548-
public int Count;
548+
public readonly int Count;
549549
public ArrayRange(T[] array, int count) => throw null;
550550
}
551551
public class EventFieldInfo
@@ -585,16 +585,16 @@ public abstract class Renderer : System.IAsyncDisposable, System.IDisposable
585585
}
586586
public struct RenderTreeDiff
587587
{
588-
public int ComponentId;
589-
public Microsoft.AspNetCore.Components.RenderTree.ArrayBuilderSegment<Microsoft.AspNetCore.Components.RenderTree.RenderTreeEdit> Edits;
588+
public readonly int ComponentId;
589+
public readonly Microsoft.AspNetCore.Components.RenderTree.ArrayBuilderSegment<Microsoft.AspNetCore.Components.RenderTree.RenderTreeEdit> Edits;
590590
}
591591
public struct RenderTreeEdit
592592
{
593-
public int MoveToSiblingIndex;
594-
public int ReferenceFrameIndex;
595-
public string RemovedAttributeName;
596-
public int SiblingIndex;
597-
public Microsoft.AspNetCore.Components.RenderTree.RenderTreeEditType Type;
593+
public readonly int MoveToSiblingIndex;
594+
public readonly int ReferenceFrameIndex;
595+
public readonly string RemovedAttributeName;
596+
public readonly int SiblingIndex;
597+
public readonly Microsoft.AspNetCore.Components.RenderTree.RenderTreeEditType Type;
598598
}
599599
public enum RenderTreeEditType
600600
{

csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Cors.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ namespace Infrastructure
3939
{
4040
public static class CorsConstants
4141
{
42-
public static string AccessControlAllowCredentials;
43-
public static string AccessControlAllowHeaders;
44-
public static string AccessControlAllowMethods;
45-
public static string AccessControlAllowOrigin;
46-
public static string AccessControlExposeHeaders;
47-
public static string AccessControlMaxAge;
48-
public static string AccessControlRequestHeaders;
49-
public static string AccessControlRequestMethod;
50-
public static string AnyOrigin;
51-
public static string Origin;
52-
public static string PreflightHttpMethod;
42+
public static readonly string AccessControlAllowCredentials;
43+
public static readonly string AccessControlAllowHeaders;
44+
public static readonly string AccessControlAllowMethods;
45+
public static readonly string AccessControlAllowOrigin;
46+
public static readonly string AccessControlExposeHeaders;
47+
public static readonly string AccessControlMaxAge;
48+
public static readonly string AccessControlRequestHeaders;
49+
public static readonly string AccessControlRequestMethod;
50+
public static readonly string AnyOrigin;
51+
public static readonly string Origin;
52+
public static readonly string PreflightHttpMethod;
5353
}
5454
public class CorsMiddleware
5555
{

csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Hosting.Abstractions.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ namespace Hosting
88
{
99
public static class EnvironmentName
1010
{
11-
public static string Development;
12-
public static string Production;
13-
public static string Staging;
11+
public static readonly string Development;
12+
public static readonly string Production;
13+
public static readonly string Staging;
1414
}
1515
public static partial class HostingAbstractionsWebHostBuilderExtensions
1616
{
@@ -106,21 +106,21 @@ public class WebHostBuilderContext
106106
}
107107
public static class WebHostDefaults
108108
{
109-
public static string ApplicationKey;
110-
public static string CaptureStartupErrorsKey;
111-
public static string ContentRootKey;
112-
public static string DetailedErrorsKey;
113-
public static string EnvironmentKey;
114-
public static string HostingStartupAssembliesKey;
115-
public static string HostingStartupExcludeAssembliesKey;
116-
public static string PreferHostingUrlsKey;
117-
public static string PreventHostingStartupKey;
118-
public static string ServerUrlsKey;
119-
public static string ShutdownTimeoutKey;
120-
public static string StartupAssemblyKey;
121-
public static string StaticWebAssetsKey;
122-
public static string SuppressStatusMessagesKey;
123-
public static string WebRootKey;
109+
public static readonly string ApplicationKey;
110+
public static readonly string CaptureStartupErrorsKey;
111+
public static readonly string ContentRootKey;
112+
public static readonly string DetailedErrorsKey;
113+
public static readonly string EnvironmentKey;
114+
public static readonly string HostingStartupAssembliesKey;
115+
public static readonly string HostingStartupExcludeAssembliesKey;
116+
public static readonly string PreferHostingUrlsKey;
117+
public static readonly string PreventHostingStartupKey;
118+
public static readonly string ServerUrlsKey;
119+
public static readonly string ShutdownTimeoutKey;
120+
public static readonly string StartupAssemblyKey;
121+
public static readonly string StaticWebAssetsKey;
122+
public static readonly string SuppressStatusMessagesKey;
123+
public static readonly string WebRootKey;
124124
}
125125
}
126126
}

csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Html.Abstractions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ public class HtmlFormattableString : Microsoft.AspNetCore.Html.IHtmlContent
4141
public class HtmlString : Microsoft.AspNetCore.Html.IHtmlContent
4242
{
4343
public HtmlString(string value) => throw null;
44-
public static Microsoft.AspNetCore.Html.HtmlString Empty;
45-
public static Microsoft.AspNetCore.Html.HtmlString NewLine;
44+
public static readonly Microsoft.AspNetCore.Html.HtmlString Empty;
45+
public static readonly Microsoft.AspNetCore.Html.HtmlString NewLine;
4646
public override string ToString() => throw null;
4747
public string Value { get => throw null; }
4848
public void WriteTo(System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder) => throw null;

csharp/ql/test/resources/stubs/_frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.Http.Abstractions.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public sealed class EndpointMetadataCollection : System.Collections.Generic.IEnu
190190
public int Count { get => throw null; }
191191
public EndpointMetadataCollection(System.Collections.Generic.IEnumerable<object> items) => throw null;
192192
public EndpointMetadataCollection(params object[] items) => throw null;
193-
public static Microsoft.AspNetCore.Http.EndpointMetadataCollection Empty;
193+
public static readonly Microsoft.AspNetCore.Http.EndpointMetadataCollection Empty;
194194
public struct Enumerator : System.IDisposable, System.Collections.Generic.IEnumerator<object>, System.Collections.IEnumerator
195195
{
196196
public object Current { get => throw null; }
@@ -220,7 +220,7 @@ public interface IRouteValuesFeature
220220
public struct FragmentString : System.IEquatable<Microsoft.AspNetCore.Http.FragmentString>
221221
{
222222
public FragmentString(string value) => throw null;
223-
public static Microsoft.AspNetCore.Http.FragmentString Empty;
223+
public static readonly Microsoft.AspNetCore.Http.FragmentString Empty;
224224
public bool Equals(Microsoft.AspNetCore.Http.FragmentString other) => throw null;
225225
public override bool Equals(object obj) => throw null;
226226
public static Microsoft.AspNetCore.Http.FragmentString FromUriComponent(string uriComponent) => throw null;
@@ -277,12 +277,12 @@ public abstract class HttpContext
277277
}
278278
public static class HttpMethods
279279
{
280-
public static string Connect;
281-
public static string Delete;
280+
public static readonly string Connect;
281+
public static readonly string Delete;
282282
public static bool Equals(string methodA, string methodB) => throw null;
283-
public static string Get;
283+
public static readonly string Get;
284284
public static string GetCanonicalizedValue(string method) => throw null;
285-
public static string Head;
285+
public static readonly string Head;
286286
public static bool IsConnect(string method) => throw null;
287287
public static bool IsDelete(string method) => throw null;
288288
public static bool IsGet(string method) => throw null;
@@ -292,20 +292,20 @@ public static class HttpMethods
292292
public static bool IsPost(string method) => throw null;
293293
public static bool IsPut(string method) => throw null;
294294
public static bool IsTrace(string method) => throw null;
295-
public static string Options;
296-
public static string Patch;
297-
public static string Post;
298-
public static string Put;
299-
public static string Trace;
295+
public static readonly string Options;
296+
public static readonly string Patch;
297+
public static readonly string Post;
298+
public static readonly string Put;
299+
public static readonly string Trace;
300300
}
301301
public static class HttpProtocol
302302
{
303303
public static string GetHttpProtocol(System.Version version) => throw null;
304-
public static string Http09;
305-
public static string Http10;
306-
public static string Http11;
307-
public static string Http2;
308-
public static string Http3;
304+
public static readonly string Http09;
305+
public static readonly string Http10;
306+
public static readonly string Http11;
307+
public static readonly string Http2;
308+
public static readonly string Http3;
309309
public static bool IsHttp09(string protocol) => throw null;
310310
public static bool IsHttp10(string protocol) => throw null;
311311
public static bool IsHttp11(string protocol) => throw null;
@@ -504,7 +504,7 @@ public struct PathString : System.IEquatable<Microsoft.AspNetCore.Http.PathStrin
504504
public Microsoft.AspNetCore.Http.PathString Add(Microsoft.AspNetCore.Http.PathString other) => throw null;
505505
public string Add(Microsoft.AspNetCore.Http.QueryString other) => throw null;
506506
public PathString(string value) => throw null;
507-
public static Microsoft.AspNetCore.Http.PathString Empty;
507+
public static readonly Microsoft.AspNetCore.Http.PathString Empty;
508508
public bool Equals(Microsoft.AspNetCore.Http.PathString other) => throw null;
509509
public bool Equals(Microsoft.AspNetCore.Http.PathString other, System.StringComparison comparisonType) => throw null;
510510
public override bool Equals(object obj) => throw null;
@@ -545,7 +545,7 @@ public struct QueryString : System.IEquatable<Microsoft.AspNetCore.Http.QueryStr
545545
public static Microsoft.AspNetCore.Http.QueryString Create(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string>> parameters) => throw null;
546546
public static Microsoft.AspNetCore.Http.QueryString Create(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, Microsoft.Extensions.Primitives.StringValues>> parameters) => throw null;
547547
public QueryString(string value) => throw null;
548-
public static Microsoft.AspNetCore.Http.QueryString Empty;
548+
public static readonly Microsoft.AspNetCore.Http.QueryString Empty;
549549
public bool Equals(Microsoft.AspNetCore.Http.QueryString other) => throw null;
550550
public override bool Equals(object obj) => throw null;
551551
public static Microsoft.AspNetCore.Http.QueryString FromUriComponent(string uriComponent) => throw null;

0 commit comments

Comments
 (0)