Skip to content

Commit b9b892a

Browse files
committed
C#: Add ASP.NET stubs.
1 parent faf8766 commit b9b892a

File tree

137 files changed

+26914
-0
lines changed

Some content is hidden

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

137 files changed

+26914
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
// This file contains auto-generated code.
2+
// Generated from `Microsoft.AspNetCore.Antiforgery, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60`.
3+
namespace Microsoft
4+
{
5+
namespace AspNetCore
6+
{
7+
namespace Antiforgery
8+
{
9+
public class AntiforgeryOptions
10+
{
11+
public Microsoft.AspNetCore.Http.CookieBuilder Cookie { get => throw null; set { } }
12+
public AntiforgeryOptions() => throw null;
13+
public static readonly string DefaultCookiePrefix;
14+
public string FormFieldName { get => throw null; set { } }
15+
public string HeaderName { get => throw null; set { } }
16+
public bool SuppressXFrameOptionsHeader { get => throw null; set { } }
17+
}
18+
public class AntiforgeryTokenSet
19+
{
20+
public string CookieToken { get => throw null; }
21+
public AntiforgeryTokenSet(string requestToken, string cookieToken, string formFieldName, string headerName) => throw null;
22+
public string FormFieldName { get => throw null; }
23+
public string HeaderName { get => throw null; }
24+
public string RequestToken { get => throw null; }
25+
}
26+
public class AntiforgeryValidationException : System.Exception
27+
{
28+
public AntiforgeryValidationException(string message) => throw null;
29+
public AntiforgeryValidationException(string message, System.Exception innerException) => throw null;
30+
}
31+
public interface IAntiforgery
32+
{
33+
Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet GetAndStoreTokens(Microsoft.AspNetCore.Http.HttpContext httpContext);
34+
Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet GetTokens(Microsoft.AspNetCore.Http.HttpContext httpContext);
35+
System.Threading.Tasks.Task<bool> IsRequestValidAsync(Microsoft.AspNetCore.Http.HttpContext httpContext);
36+
void SetCookieTokenAndHeader(Microsoft.AspNetCore.Http.HttpContext httpContext);
37+
System.Threading.Tasks.Task ValidateRequestAsync(Microsoft.AspNetCore.Http.HttpContext httpContext);
38+
}
39+
public interface IAntiforgeryAdditionalDataProvider
40+
{
41+
string GetAdditionalData(Microsoft.AspNetCore.Http.HttpContext context);
42+
bool ValidateAdditionalData(Microsoft.AspNetCore.Http.HttpContext context, string additionalData);
43+
}
44+
[System.AttributeUsage((System.AttributeTargets)68)]
45+
public class RequireAntiforgeryTokenAttribute : System.Attribute, Microsoft.AspNetCore.Antiforgery.IAntiforgeryMetadata
46+
{
47+
public RequireAntiforgeryTokenAttribute(bool required = default(bool)) => throw null;
48+
public bool RequiresValidation { get => throw null; }
49+
}
50+
}
51+
namespace Builder
52+
{
53+
public static partial class AntiforgeryApplicationBuilderExtensions
54+
{
55+
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseAntiforgery(this Microsoft.AspNetCore.Builder.IApplicationBuilder builder) => throw null;
56+
}
57+
}
58+
}
59+
namespace Extensions
60+
{
61+
namespace DependencyInjection
62+
{
63+
public static partial class AntiforgeryServiceCollectionExtensions
64+
{
65+
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAntiforgery(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null;
66+
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAntiforgery(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions> setupAction) => throw null;
67+
}
68+
}
69+
}
70+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>net8.0</TargetFramework>
4+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
5+
<OutputPath>bin\</OutputPath>
6+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<ProjectReference Include="../Microsoft.NETCore.App/Microsoft.NETCore.App.csproj" />
11+
</ItemGroup>
12+
</Project>

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

Lines changed: 194 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// This file contains auto-generated code.
2+
// Generated from `Microsoft.AspNetCore.Authentication.BearerToken, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60`.
3+
namespace Microsoft
4+
{
5+
namespace AspNetCore
6+
{
7+
namespace Authentication
8+
{
9+
namespace BearerToken
10+
{
11+
public sealed class AccessTokenResponse
12+
{
13+
public string AccessToken { get => throw null; set { } }
14+
public AccessTokenResponse() => throw null;
15+
public long ExpiresIn { get => throw null; set { } }
16+
public string RefreshToken { get => throw null; set { } }
17+
public string TokenType { get => throw null; }
18+
}
19+
public static class BearerTokenDefaults
20+
{
21+
public const string AuthenticationScheme = default;
22+
}
23+
public class BearerTokenEvents
24+
{
25+
public BearerTokenEvents() => throw null;
26+
public virtual System.Threading.Tasks.Task MessageReceivedAsync(Microsoft.AspNetCore.Authentication.BearerToken.MessageReceivedContext context) => throw null;
27+
public System.Func<Microsoft.AspNetCore.Authentication.BearerToken.MessageReceivedContext, System.Threading.Tasks.Task> OnMessageReceived { get => throw null; set { } }
28+
}
29+
public sealed class BearerTokenOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions
30+
{
31+
public System.TimeSpan BearerTokenExpiration { get => throw null; set { } }
32+
public Microsoft.AspNetCore.Authentication.ISecureDataFormat<Microsoft.AspNetCore.Authentication.AuthenticationTicket> BearerTokenProtector { get => throw null; set { } }
33+
public BearerTokenOptions() => throw null;
34+
public Microsoft.AspNetCore.Authentication.BearerToken.BearerTokenEvents Events { get => throw null; set { } }
35+
public System.TimeSpan RefreshTokenExpiration { get => throw null; set { } }
36+
public Microsoft.AspNetCore.Authentication.ISecureDataFormat<Microsoft.AspNetCore.Authentication.AuthenticationTicket> RefreshTokenProtector { get => throw null; set { } }
37+
}
38+
public class MessageReceivedContext : Microsoft.AspNetCore.Authentication.ResultContext<Microsoft.AspNetCore.Authentication.BearerToken.BearerTokenOptions>
39+
{
40+
public MessageReceivedContext(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, Microsoft.AspNetCore.Authentication.BearerToken.BearerTokenOptions options) : base(default(Microsoft.AspNetCore.Http.HttpContext), default(Microsoft.AspNetCore.Authentication.AuthenticationScheme), default(Microsoft.AspNetCore.Authentication.BearerToken.BearerTokenOptions)) => throw null;
41+
public string Token { get => throw null; set { } }
42+
}
43+
}
44+
}
45+
}
46+
namespace Extensions
47+
{
48+
namespace DependencyInjection
49+
{
50+
public static partial class BearerTokenExtensions
51+
{
52+
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddBearerToken(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder) => throw null;
53+
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddBearerToken(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme) => throw null;
54+
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddBearerToken(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, System.Action<Microsoft.AspNetCore.Authentication.BearerToken.BearerTokenOptions> configure) => throw null;
55+
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddBearerToken(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, string authenticationScheme, System.Action<Microsoft.AspNetCore.Authentication.BearerToken.BearerTokenOptions> configure) => throw null;
56+
}
57+
}
58+
}
59+
}

0 commit comments

Comments
 (0)