Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
153d275
Rewrote GitCredentialHandler
Gijsreyn Sep 11, 2025
5f1c214
Update handler
Gijsreyn Sep 11, 2025
11847bb
Rewrote repository handler
Gijsreyn Sep 12, 2025
38947f0
Rewrite Unity part
Gijsreyn Sep 12, 2025
e11e786
Moved folders
Gijsreyn Sep 12, 2025
0032fc3
Add tests
Gijsreyn Sep 12, 2025
83a982b
Finished writing structure
Gijsreyn Sep 12, 2025
aa655d2
Add pipeline file
Gijsreyn Sep 12, 2025
73c32f9
Update contributing
Gijsreyn Sep 12, 2025
fe1eb93
Update bicepconfig.json
Gijsreyn Sep 12, 2025
f321514
Fix speling
Gijsreyn Sep 12, 2025
6b2ccac
Fix pipeline
Gijsreyn Sep 12, 2025
3d1bc4c
Fix pipeline
Gijsreyn Sep 12, 2025
a450b78
fix pipline
Gijsreyn Sep 12, 2025
01e0ba1
Work on Linux
Gijsreyn Sep 12, 2025
1c7a84c
Dont install PS
Gijsreyn Sep 12, 2025
21770f1
Move section for publishing
Gijsreyn Sep 12, 2025
41baf30
Move section for publishing
Gijsreyn Sep 12, 2025
ebf1b56
Move section for publishing
Gijsreyn Sep 12, 2025
0fb0b1e
Update log
Gijsreyn Sep 12, 2025
315fd61
Add JUnit result file package
Gijsreyn Sep 12, 2025
ebdbe6e
Output artifact
Gijsreyn Sep 12, 2025
2e36319
Fix up path
Gijsreyn Sep 12, 2025
02594da
Use githublogger
Gijsreyn Sep 12, 2025
6cc72dc
Use build script
Gijsreyn Sep 12, 2025
52c34f3
Add GitHubLogger
Gijsreyn Sep 12, 2025
3e4e316
Use Linux agent
Gijsreyn Sep 12, 2025
4cc09b3
Use Linux agent
Gijsreyn Sep 12, 2025
bce5cc1
Use Linux agent
Gijsreyn Sep 12, 2025
57dcaae
Add Linux support
Gijsreyn Sep 12, 2025
9337e5c
Determine path different
Gijsreyn Sep 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 81 additions & 17 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,81 @@
acr
avm
bicepdatabricksstorage
metastore
sku
tls
Decompiled
Acqu
Gijsreyn
IDatabricks
ILogger
abfss
dfs
Linq
mycontainer
mystorageaccount

abcdef
abfss
Acqu
acr
adls
amazonaws
aqs
autotermination
avm
bicepdatabricksstorage
BIGQUERY
Buil
buildtransitive
chatmode
chatmodes
codebases
contentfiles
Contoso
cred
dapi
Decompiled
DELTASHARING
dfs
dns
gcp
gcs
ghp
Gijsreyn
gitlab
glpat
GVzd
hci
hema
IDatabricks
IDictionary
ILogger
IUser
jdbc
keyvault
kvp
Linq
metastore
mkdirs
Moq
mydatabase
mydb
mycontainer
myorg
myorganization
myproject
myserver
mystorageaccount
MYSQL
nameof
OAuth
POSTGRESQL
Privcipal
QUJDREU
RAAS
SALESFORCE
SERVICENOW
sku
sqldb
SQLDW
sqs
ssl
tatus
tcp
TERADATA
testuser
THandler
TProps
trx
tls
Updateable
Utc
vscode
XRlcw
xunit
TModel
dpkg
20 changes: 10 additions & 10 deletions .github/actions/spelling/expect/generic_terms.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
acrdbtextension
aws
azurecr
bitbucket
github
LASTEXITCODE
linux
osx
ubuntu
westeurope
acrdbtextension
aws
azurecr
bitbucket
github
LASTEXITCODE
linux
osx
ubuntu
westeurope
winget
58 changes: 31 additions & 27 deletions .github/actions/spelling/expect/software.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
Abfss
Acl
ADLS
autoscale
Autotermination
bicepconfig
bicepparam
DBFS
dbt
dotnet
markdownlint
Mkdirs
nologo
Rpc
Sku
sln
sourcing
ssh
TDatabricks
TIdentifiers
TResource
tsv
typeof
utf
workflows
workspaces
winget
Abfss
Acl
ADLS
autoscale
Autotermination
bicepconfig
bicepparam
DBFS
dbt
dotnet
markdownlint
Mkdirs
nologo
Rpc
Sku
sln
sourcing
ssh
TDatabricks
TIdentifiers
TResource
tsv
typeof
utf
workflows
workspaces
winget
Serilog
Entra
LINQ
mcp
4 changes: 2 additions & 2 deletions .github/actions/spelling/expect/usernames.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Gijs
Reijn
Gijs
Reijn
83 changes: 83 additions & 0 deletions .github/chatmodes/csharp-dotnet-janitor.chatmode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
description: 'Perform janitorial tasks on C#/.NET code including cleanup, modernization, and tech debt remediation.'
tools: ['changes', 'codebase', 'editFiles', 'extensions', 'fetch', 'findTestFiles', 'githubRepo', 'new', 'openSimpleBrowser', 'problems', 'runCommands', 'runTasks', 'runTests', 'search', 'searchResults', 'terminalLastCommand', 'terminalSelection', 'testFailure', 'usages', 'vscodeAPI', 'microsoft.docs.mcp', 'github']
---
# C#/.NET Janitor

Perform janitorial tasks on C#/.NET codebases. Focus on code cleanup, modernization, and technical debt remediation.

## Core Tasks

### Code Modernization

- Update to latest C# language features and syntax patterns
- Replace obsolete APIs with modern alternatives
- Convert to nullable reference types where appropriate
- Apply pattern matching and switch expressions
- Use collection expressions and primary constructors

### Code Quality

- Remove unused usings, variables, and members
- Fix naming convention violations (PascalCase, camelCase)
- Simplify LINQ expressions and method chains
- Apply consistent formatting and indentation
- Resolve compiler warnings and static analysis issues

### Performance Optimization

- Replace inefficient collection operations
- Use `StringBuilder` for string concatenation
- Apply `async`/`await` patterns correctly
- Optimize memory allocations and boxing
- Use `Span<T>` and `Memory<T>` where beneficial

### Test Coverage

- Identify missing test coverage
- Add unit tests for public APIs
- Create integration tests for critical workflows
- Apply AAA (Arrange, Act, Assert) pattern consistently
- Use FluentAssertions for readable assertions

### Documentation

- Add XML documentation comments
- Update README files and inline comments
- Document public APIs and complex algorithms
- Add code examples for usage patterns

## Documentation Resources

Use `microsoft.docs.mcp` tool to:

- Look up current .NET best practices and patterns
- Find official Microsoft documentation for APIs
- Verify modern syntax and recommended approaches
- Research performance optimization techniques
- Check migration guides for deprecated features

Query examples:

- "C# nullable reference types best practices"
- ".NET performance optimization patterns"
- "async await guidelines C#"
- "LINQ performance considerations"

## Execution Rules

1. **Validate Changes**: Run tests after each modification
2. **Incremental Updates**: Make small, focused changes
3. **Preserve Behavior**: Maintain existing functionality
4. **Follow Conventions**: Apply consistent coding standards
5. **Safety First**: Backup before major refactoring

## Analysis Order

1. Scan for compiler warnings and errors
2. Identify deprecated/obsolete usage
3. Check test coverage gaps
4. Review performance bottlenecks
5. Assess documentation completeness

Apply changes systematically, testing after each modification.
87 changes: 87 additions & 0 deletions .github/instructions/csharp.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
description: 'Guidelines for building C# applications'
applyTo: '**/*.cs'
---

# C# Development

## C# Instructions
- Always use the latest version C#, currently C# 13 features.
- Write clear and concise comments for each function.

## General Instructions
- Make only high confidence suggestions when reviewing code changes.
- Write code with good maintainability practices, including comments on why certain design decisions were made.
- Handle edge cases and write clear exception handling.
- For libraries or external dependencies, mention their usage and purpose in comments.

## Naming Conventions

- Follow PascalCase for component names, method names, and public members.
- Use camelCase for private fields and local variables.
- Prefix interface names with "I" (e.g., IUserService).

## Formatting

- Apply code-formatting style defined in `.editorconfig`.
- Prefer file-scoped namespace declarations and single-line using directives.
- Insert a newline before the opening curly brace of any code block (e.g., after `if`, `for`, `while`, `foreach`, `using`, `try`, etc.).
- Ensure that the final return statement of a method is on its own line.
- Use pattern matching and switch expressions wherever possible.
- Use `nameof` instead of string literals when referring to member names.
- Ensure that XML doc comments are created for any public APIs. When applicable, include `<example>` and `<code>` documentation in the comments.

## Project Setup and Structure

- Guide users through creating a new .NET project with the appropriate templates.
- Explain the purpose of each generated file and folder to build understanding of the project structure.
- Demonstrate how to organize code using feature folders or domain-driven design principles.
- Show proper separation of concerns with models, services, and data access layers.
- Explain the Program.cs and configuration system in ASP.NET Core 9 including environment-specific settings.

## Nullable Reference Types

- Declare variables non-nullable, and check for `null` at entry points.
- Always use `is null` or `is not null` instead of `== null` or `!= null`.
- Trust the C# null annotations and don't add null checks when the type system says a value cannot be null.

## Validation and Error Handling

- Guide the implementation of model validation using data annotations and FluentValidation.
- Explain the validation pipeline and how to customize validation responses.
- Demonstrate a global exception handling strategy using middleware.
- Show how to create consistent error responses across the API.
- Explain problem details (RFC 7807) implementation for standardized error responses.

## Logging and Monitoring

- Guide the implementation of structured logging using Serilog or other providers.
- Explain the logging levels and when to use each.

## Testing

- Always include test cases for critical paths of the application.
- Guide users through creating unit tests.
- Do not emit "Act", "Arrange" or "Assert" comments.
- Copy existing style in nearby files for test method names and capitalization.
- Explain integration testing approaches for API endpoints.
- Demonstrate how to mock dependencies for effective testing.
- Show how to test authentication and authorization logic.
- Explain test-driven development principles as applied to API development.

## Performance Optimization

- Guide users on implementing caching strategies (in-memory, distributed, response caching).
- Explain asynchronous programming patterns and why they matter for API performance.
- Demonstrate pagination, filtering, and sorting for large data sets.
- Show how to implement compression and other performance optimizations.
- Explain how to measure and benchmark API performance.

## Deployment and DevOps

- Guide users through containerizing their API using .NET's built-in container support (`dotnet publish --os linux --arch x64 -p:PublishProfile=DefaultContainer`).
- Explain the differences between manual Dockerfile creation and .NET's container publishing features.
- Explain CI/CD pipelines for NET applications.
- Demonstrate deployment to Azure App Service, Azure Container Apps, or other hosting options.
- Show how to implement health checks and readiness probes.
- Explain environment-specific configurations for different deployment stages.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
pull_request:
branches: [ main ]
push:
branches: [ main ]

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json

- name: Install required PowerShell modules
shell: pwsh
run: |
Install-PSResource -Name ChangelogManagement -Scope CurrentUser -Repository PSGallery -TrustRepository

- name: Run build script
shell: pwsh
run: |
./build.ps1 -Configuration Release -Clean -Test -Verbose
Loading
Loading