Skip to content

Commit 4368219

Browse files
committed
Initial commit
0 parents  commit 4368219

25 files changed

+1597
-0
lines changed

.editorconfig

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# Don't use tabs for indentation.
5+
[*]
6+
indent_style = space
7+
8+
[*.cs]
9+
indent_style = space
10+
indent_size = 4
11+
insert_final_newline = true
12+
charset = utf-8-bom
13+
14+
# Formatting - new line options
15+
16+
# place else statements on a new line
17+
csharp_new_line_before_else = true
18+
# require members of object intializers to be on separate lines
19+
csharp_new_line_before_members_in_object_initializers = true
20+
# require braces to be on a new line for methods, object_collection_array_initializers, types, and control_blocks (also known as "Allman" style)
21+
csharp_new_line_before_open_brace = methods, object_collection_array_initializers, types, control_blocks
22+
23+
# Formatting - organize using options
24+
25+
# do not place System.* using directives before other using directives
26+
dotnet_sort_system_directives_first = true
27+
28+
# Formatting - spacing options
29+
30+
# require NO space between a cast and the value
31+
csharp_space_after_cast = false
32+
# require a space before the colon for bases or interfaces in a type declaration
33+
csharp_space_after_colon_in_inheritance_clause = true
34+
# require a space after a keyword in a control flow statement such as a for loop
35+
csharp_space_after_keywords_in_control_flow_statements = true
36+
# require a space before the colon for bases or interfaces in a type declaration
37+
csharp_space_before_colon_in_inheritance_clause = true
38+
# remove space within empty argument list parentheses
39+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
40+
# remove space between method call name and opening parenthesis
41+
csharp_space_between_method_call_name_and_opening_parenthesis = false
42+
# do not place space characters after the opening parenthesis and before the closing parenthesis of a method call
43+
csharp_space_between_method_call_parameter_list_parentheses = false
44+
# remove space within empty parameter list parentheses for a method declaration
45+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
46+
# place a space character after the opening parenthesis and before the closing parenthesis of a method declaration parameter list.
47+
csharp_space_between_method_declaration_parameter_list_parentheses = false
48+
49+
# Formatting - wrapping options
50+
51+
# leave code block on single line
52+
csharp_preserve_single_line_blocks = true
53+
54+
# Style - Code block preferences
55+
56+
# prefer curly braces even for one line of code
57+
csharp_prefer_braces = true:suggestion
58+
59+
# Style - expression bodied member options
60+
61+
# prefer expression-bodied members for methods
62+
csharp_style_expression_bodied_methods = true:suggestion
63+
# prefer expression-bodied members for properties
64+
csharp_style_expression_bodied_properties = true:suggestion
65+
66+
# Style - expression level options
67+
68+
# prefer out variables to be declared inline in the argument list of a method call when possible
69+
csharp_style_inlined_variable_declaration = true:suggestion
70+
71+
# Style - Expression-level preferences
72+
73+
# prefer default over default(T)
74+
csharp_prefer_simple_default_expression = true:suggestion
75+
# prefer objects to be initialized using object initializers when possible
76+
dotnet_style_object_initializer = true:suggestion
77+
78+
# Style - language keyword and framework type options
79+
80+
# prefer the language keyword for local variables, method parameters, and class members, instead of the type name, for types that have a keyword to represent them
81+
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
82+
83+
# Style - modifier options
84+
85+
# prefer accessibility modifiers to be declared except for public interface members. This will currently not differ from always and will act as future proofing for if C# adds default interface methods.
86+
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
87+
88+
# Style - Modifier preferences
89+
90+
# when this rule is set to a list of modifiers, prefer the specified ordering.
91+
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:warning
92+
93+
# Style - Pattern matching
94+
95+
# prefer pattern matching instead of is expression with type casts
96+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
97+
98+
# Style - qualification options
99+
100+
# prefer methods not to be prefaced with this. or Me. in Visual Basic
101+
dotnet_style_qualification_for_method = false:suggestion
102+
103+
# static fields should have s_ prefix
104+
dotnet_naming_rule.static_fields_should_have_prefix.severity = warning
105+
dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
106+
dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
107+
dotnet_naming_symbols.static_fields.applicable_kinds = field
108+
dotnet_naming_symbols.static_fields.required_modifiers = static
109+
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, protected, private_protected
110+
dotnet_naming_style.static_prefix_style.required_prefix = s_
111+
dotnet_naming_style.static_prefix_style.capitalization = camel_case
112+
113+
# name all constant fields using PascalCase
114+
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning
115+
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
116+
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
117+
dotnet_naming_symbols.constant_fields.applicable_kinds = field
118+
dotnet_naming_symbols.constant_fields.required_modifiers = const
119+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
120+
121+
# IDE0005: Remove unnecessary imports
122+
dotnet_diagnostic.IDE0005.severity = warning
123+
124+
# CA1014: Mark assemblies with CLSCompliant
125+
dotnet_diagnostic.CA1014.severity = none
126+
127+
# CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
128+
dotnet_diagnostic.CA1824.severity = none
129+
130+
# CA1062: Validate arguments of public methods
131+
dotnet_diagnostic.CA1062.severity = none

.gitattrbutes

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
## Set Git attributes for paths including line ending
2+
## normalization, diff behavior, etc.
3+
##
4+
## Get latest from `dotnet new gitattributes`
5+
6+
# Auto detect text files and perform LF normalization
7+
* text=auto
8+
9+
#
10+
# The above will handle all files NOT found below
11+
#
12+
13+
*.cs text diff=csharp
14+
*.cshtml text diff=html
15+
*.csx text diff=csharp
16+
*.sln text eol=crlf
17+
18+
# Content below from: https://github.com/gitattributes/gitattributes/blob/master/Common.gitattributes
19+
20+
# Documents
21+
*.bibtex text diff=bibtex
22+
*.doc diff=astextplain
23+
*.DOC diff=astextplain
24+
*.docx diff=astextplain
25+
*.DOCX diff=astextplain
26+
*.dot diff=astextplain
27+
*.DOT diff=astextplain
28+
*.pdf diff=astextplain
29+
*.PDF diff=astextplain
30+
*.rtf diff=astextplain
31+
*.RTF diff=astextplain
32+
*.md text diff=markdown
33+
*.mdx text diff=markdown
34+
*.tex text diff=tex
35+
*.adoc text
36+
*.textile text
37+
*.mustache text
38+
# Per RFC 4180, .csv should be CRLF
39+
*.csv text eol=crlf
40+
*.tab text
41+
*.tsv text
42+
*.txt text
43+
*.sql text
44+
*.epub diff=astextplain
45+
46+
# Graphics
47+
*.png binary
48+
*.jpg binary
49+
*.jpeg binary
50+
*.gif binary
51+
*.tif binary
52+
*.tiff binary
53+
*.ico binary
54+
# SVG treated as text by default.
55+
*.svg text
56+
# If you want to treat it as binary,
57+
# use the following line instead.
58+
# *.svg binary
59+
*.eps binary
60+
61+
# Scripts
62+
# Force Unix scripts to always use lf line endings so that if a repo is accessed
63+
# in Unix via a file share from Windows, the scripts will work
64+
*.bash text eol=lf
65+
*.fish text eol=lf
66+
*.ksh text eol=lf
67+
*.sh text eol=lf
68+
*.zsh text eol=lf
69+
# Likewise, force cmd and batch scripts to always use crlf
70+
*.bat text eol=crlf
71+
*.cmd text eol=crlf
72+
73+
# Serialization
74+
*.json text
75+
*.toml text
76+
*.xml text
77+
*.yaml text
78+
*.yml text
79+
80+
# Archives
81+
*.7z binary
82+
*.bz binary
83+
*.bz2 binary
84+
*.bzip2 binary
85+
*.gz binary
86+
*.lz binary
87+
*.lzma binary
88+
*.rar binary
89+
*.tar binary
90+
*.taz binary
91+
*.tbz binary
92+
*.tbz2 binary
93+
*.tgz binary
94+
*.tlz binary
95+
*.txz binary
96+
*.xz binary
97+
*.Z binary
98+
*.zip binary
99+
*.zst binary
100+
101+
# Text files where line endings should be preserved
102+
*.patch -text
103+
104+
# Exclude files from exporting
105+
.gitattributes export-ignore
106+
.gitignore export-ignore
107+
.gitkeep export-ignore

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Continuous Integration
2+
on:
3+
push:
4+
branches:
5+
- "main"
6+
- "release/*"
7+
paths-ignore:
8+
- 'docs/**'
9+
pull_request:
10+
paths-ignore:
11+
- 'docs/**'
12+
13+
env:
14+
TreatWarningsAsErrors: true
15+
16+
jobs:
17+
build:
18+
name: Build
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os: [ubuntu-latest, windows-latest, macos-latest]
23+
configuration: [debug, release]
24+
25+
runs-on: ${{ matrix.os }}
26+
27+
steps:
28+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Setup .NET
33+
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
34+
with:
35+
global-json-file: global.json
36+
37+
- name: Restore
38+
run: dotnet restore
39+
40+
- name: Build
41+
run: dotnet build --no-restore --configuration ${{ matrix.configuration }} -bl:artifacts/log/build.binlog
42+
43+
- name: Test
44+
run: dotnet test --no-build --configuration ${{ matrix.configuration }} -bl:artifacts/log/test.binlog
45+
46+
- name: Upload Results
47+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
48+
with:
49+
name: ${{ matrix.os }}_${{ matrix.configuration }}
50+
path: |
51+
./artifacts/bin/**/*
52+
./artifacts/log/**/*
53+
if-no-files-found: error

0 commit comments

Comments
 (0)