Repository: davidfowl/uController
Branch: main
Commit: a144fb1b276e
Files: 47
Total size: 427.6 KB
Directory structure:
gitextract_a4yt5j7o/
├── .gitattributes
├── .github/
│ └── workflows/
│ └── ci.yaml
├── .gitignore
├── .vscode/
│ ├── launch.json
│ ├── settings.json
│ └── tasks.json
├── Directory.Build.props
├── GeneratedOutput/
│ └── RouteBuilderExtensions.g.cs
├── README.md
├── nuget.config
├── samples/
│ ├── .vscode/
│ │ ├── launch.json
│ │ └── tasks.json
│ ├── MapTodos.cs
│ ├── Program.cs
│ ├── Sample.csproj
│ ├── Wrapper.cs
│ └── appsettings.json
├── src/
│ └── uController.SourceGenerator/
│ ├── AnalyzerReleases.Shipped.md
│ ├── AnalyzerReleases.Unshipped.md
│ ├── AwaitableInfo.cs
│ ├── CodeGenerationTypes.cs
│ ├── HttpModel.cs
│ ├── MinimalCodeGenerator.cs
│ ├── Reflection/
│ │ ├── MetadataLoadContext.cs
│ │ ├── RoslynAssembly.cs
│ │ ├── RoslynConstructorInfo.cs
│ │ ├── RoslynCustomAttributeData.cs
│ │ ├── RoslynExtensions.cs
│ │ ├── RoslynFieldInfo.cs
│ │ ├── RoslynMemberInfo.cs
│ │ ├── RoslynMethodInfo.cs
│ │ ├── RoslynParameterInfo.cs
│ │ ├── RoslynPropertyInfo.cs
│ │ ├── RoslynType.cs
│ │ └── SharedUtilities.cs
│ ├── ReflectionExtensions.cs
│ ├── RoutePattern.cs
│ ├── WellKnownTypes.cs
│ ├── uController.SourceGenerator.csproj
│ └── uControllerGenerator.cs
├── test/
│ └── uController.SourceGenerator.Tests/
│ ├── IntegrationTests.cs
│ ├── SharedTypes.cs
│ ├── SourceKey.cs
│ ├── Usings.cs
│ └── uController.SourceGenerator.Tests.csproj
├── uController.sln
└── version.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.jpg binary
*.png binary
*.gif binary
*.cs text=auto diff=csharp
*.vb text=auto
*.resx text=auto
*.c text=auto
*.cpp text=auto
*.cxx text=auto
*.h text=auto
*.hxx text=auto
*.py text=auto
*.rb text=auto
*.java text=auto
*.html text=auto
*.htm text=auto
*.css text=auto
*.scss text=auto
*.sass text=auto
*.less text=auto
*.js text=auto
*.lisp text=auto
*.clj text=auto
*.sql text=auto
*.php text=auto
*.lua text=auto
*.m text=auto
*.asm text=auto
*.erl text=auto
*.fs text=auto
*.fsx text=auto
*.hs text=auto
*.csproj text=auto
*.vbproj text=auto
*.fsproj text=auto
*.dbproj text=auto
*.sln text=auto eol=crlf
*.sh eol=lf
================================================
FILE: .github/workflows/ci.yaml
================================================
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-quality: 'ga'
- uses: aarnott/nbgv@v0.4.0
with:
setAllVars: true
- name: dotnet build
run: dotnet build uController.sln -c Release
- name: dotnet test
run: dotnet test uController.sln -c Release --no-build
- name: dotnet pack
run: dotnet pack uController.sln -c Release --no-build --include-source --include-symbols
- name: setup nuget
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: NuGet/setup-nuget@v1.0.5
with:
nuget-version: latest
- name: Set API key
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: nuget setapikey ${{ secrets.FEEDZ_TOKEN }} -Config nuget.config -Source https://f.feedz.io/davidfowl/ucontroller/nuget/index.json
- name: Set symbols API key
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: nuget setapikey ${{ secrets.FEEDZ_TOKEN }} -Config nuget.config -Source https://f.feedz.io/davidfowl/ucontroller/symbols
- name: push packages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: dotnet nuget push **/*.nupkg -s https://f.feedz.io/davidfowl/ucontroller/nuget/index.json -ss https://f.feedz.io/davidfowl/ucontroller/symbols --skip-duplicate
================================================
FILE: .gitignore
================================================
[Oo]bj/
[Bb]in/
TestResults/
.nuget/
*.sln.ide/
_ReSharper.*/
.idea/
packages/
artifacts/
PublishProfiles/
.vs/
*.user
*.suo
*.cache
*.docstates
_ReSharper.*
nuget.exe
*net45.csproj
*net451.csproj
*k10.csproj
*.psess
*.vsp
*.pidb
*.userprefs
*DS_Store
*.ncrunchsolution
*.*sdf
*.ipch
*.swp
*~
.build/
.testPublish/
launchSettings.json
BenchmarkDotNet.Artifacts/
BDN.Generated/
binaries/
global.json
korebuild-lock.txt
================================================
FILE: .vscode/launch.json
================================================
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/test/uController.SourceGenerator.Tests/bin/Debug/net7.0/uController.SourceGenerator.Tests.dll",
"args": [],
"cwd": "${workspaceFolder}/test/uController.SourceGenerator.Tests",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}
================================================
FILE: .vscode/settings.json
================================================
{
"dotnet.defaultSolution": "uController.sln"
}
================================================
FILE: .vscode/tasks.json
================================================
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/test/uController.SourceGenerator.Tests/uController.SourceGenerator.Tests.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/test/uController.SourceGenerator.Tests/uController.SourceGenerator.Tests.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/test/uController.SourceGenerator.Tests/uController.SourceGenerator.Tests.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
================================================
FILE: Directory.Build.props
================================================
false
$(NoWarn);NU5105
https://github.com/davidfowl/uController
https://github.com/davidfowl/uController
https://github.com/davidfowl/uController/releases
MIT
git
cloud API REST microservice web
================================================
FILE: GeneratedOutput/RouteBuilderExtensions.g.cs
================================================
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
#if NET7_0_OR_GREATER
using System.Diagnostics;
using System.Reflection;
using Microsoft.AspNetCore.Routing.Patterns;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Primitives;
using MetadataPopulator = System.Action;
using RequestDelegateFactoryFunc = System.Func;
namespace Microsoft.AspNetCore.Builder
{
internal record SourceKey(string Path, int Line);
}
internal static class GeneratedRouteBuilderExtensions
{
private static readonly string[] GetVerb = new[] { HttpMethods.Get };
private static readonly string[] PostVerb = new[] { HttpMethods.Post };
private static readonly string[] PutVerb = new[] { HttpMethods.Put };
private static readonly string[] DeleteVerb = new[] { HttpMethods.Delete };
private static readonly string[] PatchVerb = new[] { HttpMethods.Patch };
private class GenericThunks
{
public static readonly System.Collections.Generic.Dictionary<(string, int), (MetadataPopulator, RequestDelegateFactoryFunc)> map = new()
{
[(@"C:\dev\git\uController\samples\Program.cs", 19)] = (
(del, builder) =>
{
builder.Metadata.Add(new SourceKey(@"C:\dev\git\uController\samples\Program.cs", 19));
builder.Metadata.Add(ResponseTypeMetadata.Create("application/json", typeof(T)));
},
(del, builder) =>
{
var handler = (System.Func)del;
EndpointFilterDelegate filteredInvocation = null;
if (builder.FilterFactories.Count > 0)
{
filteredInvocation = BuildFilterDelegate(ic =>
{
if (ic.HttpContext.Response.StatusCode == 400)
{
return System.Threading.Tasks.ValueTask.FromResult