Skip to content

Commit e4b02e3

Browse files
committed
Add .net core and asp.net core stubs
1 parent 0f18fd6 commit e4b02e3

File tree

238 files changed

+92137
-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.

238 files changed

+92137
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// semmle-extractor-options: --load-sources-from-project:../../../resources/stubs/frameworks/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj
2+
// semmle-extractor-options: /nostdlib
3+
// semmle-extractor-options: /noconfig
4+
5+
namespace Test
6+
{
7+
public class Class1
8+
{
9+
}
10+
}

csharp/ql/test/query-tests/Stubs/References/files.expected

Lines changed: 233 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import csharp
2+
3+
from File f
4+
where f.fromSource()
5+
select f
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
obj/
2+
bin/
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// This file contains auto-generated code.
2+
3+
namespace Microsoft
4+
{
5+
namespace AspNetCore
6+
{
7+
namespace Antiforgery
8+
{
9+
// Generated from `Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions` in `Microsoft.AspNetCore.Antiforgery, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60`
10+
public class AntiforgeryOptions
11+
{
12+
public AntiforgeryOptions() => throw null;
13+
public Microsoft.AspNetCore.Http.CookieBuilder Cookie { get => throw null; set => throw null; }
14+
public static string DefaultCookiePrefix;
15+
public string FormFieldName { get => throw null; set => throw null; }
16+
public string HeaderName { get => throw null; set => throw null; }
17+
public bool SuppressXFrameOptionsHeader { get => throw null; set => throw null; }
18+
}
19+
20+
// Generated from `Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet` in `Microsoft.AspNetCore.Antiforgery, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60`
21+
public class AntiforgeryTokenSet
22+
{
23+
public AntiforgeryTokenSet(string requestToken, string cookieToken, string formFieldName, string headerName) => throw null;
24+
public string CookieToken { get => throw null; }
25+
public string FormFieldName { get => throw null; }
26+
public string HeaderName { get => throw null; }
27+
public string RequestToken { get => throw null; }
28+
}
29+
30+
// Generated from `Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException` in `Microsoft.AspNetCore.Antiforgery, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60`
31+
public class AntiforgeryValidationException : System.Exception
32+
{
33+
public AntiforgeryValidationException(string message, System.Exception innerException) => throw null;
34+
public AntiforgeryValidationException(string message) => throw null;
35+
}
36+
37+
// Generated from `Microsoft.AspNetCore.Antiforgery.IAntiforgery` in `Microsoft.AspNetCore.Antiforgery, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60`
38+
public interface IAntiforgery
39+
{
40+
Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet GetAndStoreTokens(Microsoft.AspNetCore.Http.HttpContext httpContext);
41+
Microsoft.AspNetCore.Antiforgery.AntiforgeryTokenSet GetTokens(Microsoft.AspNetCore.Http.HttpContext httpContext);
42+
System.Threading.Tasks.Task<bool> IsRequestValidAsync(Microsoft.AspNetCore.Http.HttpContext httpContext);
43+
void SetCookieTokenAndHeader(Microsoft.AspNetCore.Http.HttpContext httpContext);
44+
System.Threading.Tasks.Task ValidateRequestAsync(Microsoft.AspNetCore.Http.HttpContext httpContext);
45+
}
46+
47+
// Generated from `Microsoft.AspNetCore.Antiforgery.IAntiforgeryAdditionalDataProvider` in `Microsoft.AspNetCore.Antiforgery, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60`
48+
public interface IAntiforgeryAdditionalDataProvider
49+
{
50+
string GetAdditionalData(Microsoft.AspNetCore.Http.HttpContext context);
51+
bool ValidateAdditionalData(Microsoft.AspNetCore.Http.HttpContext context, string additionalData);
52+
}
53+
54+
}
55+
}
56+
namespace Extensions
57+
{
58+
namespace DependencyInjection
59+
{
60+
// Generated from `Microsoft.Extensions.DependencyInjection.AntiforgeryServiceCollectionExtensions` in `Microsoft.AspNetCore.Antiforgery, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60`
61+
public static class AntiforgeryServiceCollectionExtensions
62+
{
63+
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAntiforgery(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions> setupAction) => throw null;
64+
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAntiforgery(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) => throw null;
65+
}
66+
67+
}
68+
}
69+
}
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>net5.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>

0 commit comments

Comments
 (0)