Skip to content

Commit 1e5d947

Browse files
committed
code refactor
1 parent ca7b2e2 commit 1e5d947

33 files changed

+1491
-1368
lines changed

.editorconfig

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
[*.{asax,ascx,aspx,axaml,c,c++,cc,cginc,compute,cp,cpp,cs,cshtml,css,cu,cuh,cxx,h,hh,hlsl,hlsli,hlslinc,hpp,htm,html,hxx,inc,inl,ino,ipp,js,jsx,master,mpp,mq4,mq5,mqh,paml,razor,skin,tpp,ts,tsx,usf,ush,vb,xaml,xamlx,xoml}]
2+
indent_style = space
3+
indent_size = 4
4+
tab_width = 4
5+
6+
[*.{appxmanifest,axml,build,config,csproj,dbml,discomap,dtd,json,jsproj,lsproj,njsproj,nuspec,proj,props,resjson,resw,resx,StyleCop,targets,tasks,vbproj,xml,xsd}]
7+
indent_style = space
8+
indent_size = 2
9+
tab_width = 2
10+
11+
# Code files
12+
[*.{cs,vb}]
13+
dotnet_diagnostic.CA1001.severity = warning
14+
dotnet_diagnostic.CA1009.severity = warning
15+
dotnet_diagnostic.CA1016.severity = warning
16+
dotnet_diagnostic.CA1033.severity = warning
17+
dotnet_diagnostic.CA1049.severity = warning
18+
dotnet_diagnostic.CA1060.severity = warning
19+
dotnet_diagnostic.CA1061.severity = warning
20+
dotnet_diagnostic.CA1063.severity = warning
21+
dotnet_diagnostic.CA1065.severity = warning
22+
dotnet_diagnostic.CA1301.severity = warning
23+
dotnet_diagnostic.CA1303.severity = none
24+
dotnet_diagnostic.CA1400.severity = warning
25+
dotnet_diagnostic.CA1401.severity = warning
26+
dotnet_diagnostic.CA1403.severity = warning
27+
dotnet_diagnostic.CA1404.severity = warning
28+
dotnet_diagnostic.CA1405.severity = warning
29+
dotnet_diagnostic.CA1410.severity = warning
30+
dotnet_diagnostic.CA1415.severity = warning
31+
dotnet_diagnostic.CA1821.severity = warning
32+
dotnet_diagnostic.CA1900.severity = warning
33+
dotnet_diagnostic.CA1901.severity = warning
34+
dotnet_diagnostic.CA2002.severity = warning
35+
dotnet_diagnostic.CA2006.severity = warning
36+
dotnet_diagnostic.CA2007.severity = none
37+
dotnet_diagnostic.CA2100.severity = warning
38+
dotnet_diagnostic.CA2101.severity = warning
39+
dotnet_diagnostic.CA2108.severity = warning
40+
dotnet_diagnostic.CA2111.severity = warning
41+
dotnet_diagnostic.CA2112.severity = warning
42+
dotnet_diagnostic.CA2114.severity = warning
43+
dotnet_diagnostic.CA2116.severity = warning
44+
dotnet_diagnostic.CA2117.severity = warning
45+
dotnet_diagnostic.CA2122.severity = warning
46+
dotnet_diagnostic.CA2123.severity = warning
47+
dotnet_diagnostic.CA2124.severity = warning
48+
dotnet_diagnostic.CA2126.severity = warning
49+
dotnet_diagnostic.CA2131.severity = warning
50+
dotnet_diagnostic.CA2132.severity = warning
51+
dotnet_diagnostic.CA2133.severity = warning
52+
dotnet_diagnostic.CA2134.severity = warning
53+
dotnet_diagnostic.CA2137.severity = warning
54+
dotnet_diagnostic.CA2138.severity = warning
55+
dotnet_diagnostic.CA2140.severity = warning
56+
dotnet_diagnostic.CA2141.severity = warning
57+
dotnet_diagnostic.CA2146.severity = warning
58+
dotnet_diagnostic.CA2147.severity = warning
59+
dotnet_diagnostic.CA2149.severity = warning
60+
dotnet_diagnostic.CA2200.severity = warning
61+
dotnet_diagnostic.CA2202.severity = warning
62+
dotnet_diagnostic.CA2207.severity = warning
63+
dotnet_diagnostic.CA2212.severity = warning
64+
dotnet_diagnostic.CA2213.severity = warning
65+
dotnet_diagnostic.CA2214.severity = warning
66+
dotnet_diagnostic.CA2216.severity = warning
67+
dotnet_diagnostic.CA2220.severity = warning
68+
dotnet_diagnostic.CA2229.severity = warning
69+
dotnet_diagnostic.CA2231.severity = warning
70+
dotnet_diagnostic.CA2232.severity = warning
71+
dotnet_diagnostic.CA2235.severity = warning
72+
dotnet_diagnostic.CA2236.severity = warning
73+
dotnet_diagnostic.CA2237.severity = warning
74+
dotnet_diagnostic.CA2238.severity = warning
75+
dotnet_diagnostic.CA2240.severity = warning
76+
dotnet_diagnostic.CA2241.severity = warning
77+
dotnet_diagnostic.CA2242.severity = warning
78+
79+
dotnet_diagnostic.IDE0001.severity = none
80+
dotnet_diagnostic.IDE0003.severity = none
81+
82+
dotnet_diagnostic.SA1117.severity = none
83+
dotnet_diagnostic.SA1118.severity = none
84+
dotnet_diagnostic.SA1124.severity = none
85+
dotnet_diagnostic.SA1127.severity = none
86+
dotnet_diagnostic.SA1128.severity = none
87+
dotnet_diagnostic.SA1413.severity = none
88+
dotnet_diagnostic.SA1615.severity = none
89+
dotnet_diagnostic.SA1616.severity = none
90+
dotnet_diagnostic.SA1649.severity = none
91+
dotnet_diagnostic.SA1652.severity = none
92+
93+
[*]
94+
# Microsoft .NET properties
95+
csharp_new_line_before_members_in_object_initializers = false
96+
csharp_preferred_modifier_order = public, protected, internal, private, static, new, abstract, virtual, override, sealed, readonly, extern, unsafe, volatile, async:suggestion
97+
csharp_style_var_for_built_in_types = false:suggestion
98+
csharp_using_directive_placement = inside_namespace:silent
99+
100+
dotnet_naming_rule.private_constants_rule.severity = warning
101+
dotnet_naming_rule.private_constants_rule.style = upper_camel_case_style
102+
dotnet_naming_rule.private_constants_rule.symbols = private_constants_symbols
103+
dotnet_naming_rule.private_instance_fields_rule.severity = warning
104+
dotnet_naming_rule.private_instance_fields_rule.style = lower_camel_case_style
105+
dotnet_naming_rule.private_instance_fields_rule.symbols = private_instance_fields_symbols
106+
dotnet_naming_rule.private_static_fields_rule.severity = warning
107+
dotnet_naming_rule.private_static_fields_rule.style = lower_camel_case_style
108+
dotnet_naming_rule.private_static_fields_rule.symbols = private_static_fields_symbols
109+
dotnet_naming_rule.private_static_readonly_rule.severity = warning
110+
dotnet_naming_rule.private_static_readonly_rule.style = upper_camel_case_style
111+
dotnet_naming_rule.private_static_readonly_rule.symbols = private_static_readonly_symbols
112+
dotnet_naming_style.lower_camel_case_style.capitalization = camel_case
113+
dotnet_naming_style.upper_camel_case_style.capitalization = pascal_case
114+
dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities = private
115+
dotnet_naming_symbols.private_constants_symbols.applicable_kinds = field
116+
dotnet_naming_symbols.private_constants_symbols.required_modifiers = const
117+
dotnet_naming_symbols.private_instance_fields_symbols.applicable_accessibilities = private
118+
dotnet_naming_symbols.private_instance_fields_symbols.applicable_kinds = field
119+
dotnet_naming_symbols.private_static_fields_symbols.applicable_accessibilities = private
120+
dotnet_naming_symbols.private_static_fields_symbols.applicable_kinds = field
121+
dotnet_naming_symbols.private_static_fields_symbols.required_modifiers = static
122+
dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities = private
123+
dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds = field
124+
dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = static,readonly
125+
dotnet_separate_import_directive_groups = true
126+
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:suggestion
127+
dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary:suggestion
128+
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:suggestion
129+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
130+
dotnet_style_predefined_type_for_member_access = true:suggestion
131+
dotnet_style_qualification_for_event = true:suggestion
132+
dotnet_style_qualification_for_field = true:suggestion
133+
dotnet_style_qualification_for_method = true:suggestion
134+
dotnet_style_qualification_for_property = true:suggestion
135+
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
136+
137+

.github/workflows/dotnetcore.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: build
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ${{ matrix.os }}
9+
10+
strategy:
11+
matrix:
12+
os: [macOS-latest, ubuntu-latest, windows-latest]
13+
steps:
14+
- name: Setup .NET Core 3.1
15+
uses: actions/setup-dotnet@v1
16+
with:
17+
dotnet-version: '3.1.x'
18+
- name: Setup .NET 5.0
19+
uses: actions/setup-dotnet@v1
20+
with:
21+
dotnet-version: '5.0.x'
22+
- name: Setup .NET 6.0
23+
uses: actions/setup-dotnet@v1
24+
with:
25+
dotnet-version: '6.0.x'
26+
- name: Checkout
27+
uses: actions/checkout@v2
28+
- name: Build with dotnet for .NET CORE 3.1
29+
run: dotnet build ./src/ZNetCS.AspNetCore.Authentication.Basic/ZNetCS.AspNetCore.Authentication.Basic.csproj --configuration Release --framework netcoreapp3.1
30+
- name: Build with dotnet for .NET 5.0
31+
run: dotnet build ./src/ZNetCS.AspNetCore.Authentication.Basic/ZNetCS.AspNetCore.Authentication.Basic.csproj --configuration Release --framework net5.0
32+
- name: Build with dotnet for .NET 6.0
33+
run: dotnet build ./src/ZNetCS.AspNetCore.Authentication.Basic/ZNetCS.AspNetCore.Authentication.Basic.csproj --configuration Release --framework net6.0
34+
- name: Test with dotnet for .NET CORE 3.1
35+
run: dotnet test ./test/ZNetCS.AspNetCore.Authentication.BasicTests/ZNetCS.AspNetCore.Authentication.BasicTests.csproj --framework netcoreapp3.1
36+
- name: Test with dotnet for .NET 5.0
37+
run: dotnet test ./test/ZNetCS.AspNetCore.Authentication.BasicTests/ZNetCS.AspNetCore.Authentication.BasicTests.csproj --framework net5.0
38+
- name: Test with dotnet for .NET 6.0
39+
run: dotnet test ./test/ZNetCS.AspNetCore.Authentication.BasicTests/ZNetCS.AspNetCore.Authentication.BasicTests.csproj --framework net6.0

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ PublishScripts/
152152

153153
# NuGet Packages
154154
*.nupkg
155+
*.snupkg
155156
# The packages folder can be ignored because of Package Restore
156157
**/packages/*
157158
# except build/, which is used as an MSBuild target.
@@ -250,3 +251,4 @@ paket-files/
250251
# JetBrains Rider
251252
.idea/
252253
*.sln.iml
254+

CommonRuleSet.ruleset

Lines changed: 0 additions & 90 deletions
This file was deleted.

0 commit comments

Comments
 (0)