Skip to content

Commit 984f63d

Browse files
dotnet8 upgrade (#39)
* upgraded to dotnet8 * added maui app for dotnet8 * corrected bootstrap icon link * upgraded bootstrap and bootstrap icon packages * changed background color to app's green * began work on maui image assets
1 parent 70f149f commit 984f63d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1270
-346
lines changed

src/.editorconfig

+158-79
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,169 @@
1-
# Rules in this file were initially inferred by Visual Studio IntelliCode from the S:\src\gh\jk\tip-calc\src codebase based on best match to current usage at 11/9/2021
2-
# You can modify the rules from these initially generated values to suit your own policies
3-
# You can learn more about editorconfig here: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
4-
[*.cs]
5-
1+
# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
2+
# better ref located at: https://kent-boogaart.com/blog/editorconfig-reference-for-c-developers
63

7-
#Core editorconfig formatting - indentation
4+
# -- All Files ------------------------------------------ #
85

9-
#use soft tabs (spaces) for indentation
6+
[*]
107
indent_style = space
118

12-
#Formatting - new line options
9+
# -- .NET Files ----------------------------------------- #
10+
11+
[*.{cs,csx,vb,vbx}]
12+
charset = utf-8-bom
13+
end_of_line = crlf
14+
indent_size = 4
15+
insert_final_newline = true
16+
trim_trailing_whitespace = true
17+
18+
[*.{cs,vb}]
19+
# Organize usings and namespaces
20+
dotnet_sort_system_directives_first = true
21+
csharp_style_namespace_declarations = file_scoped:suggestion
22+
23+
# this. and me. preferences
24+
dotnet_style_qualification_for_event = true:warning
25+
dotnet_style_qualification_for_field = true:warning
26+
dotnet_style_qualification_for_method = true:warning
27+
dotnet_style_qualification_for_property = true:warning
28+
29+
# Parentheses preferences
30+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning
31+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion
32+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
33+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
34+
35+
# Language keywords instead of framework type names for type references
36+
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
37+
dotnet_style_predefined_type_for_member_access = true:warning
38+
39+
# null check preferences
40+
dotnet_style_coalesce_expression = true:warning
41+
dotnet_style_null_propagation = true:warning
42+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
43+
44+
dotnet_style_collection_initializer = true:warning
45+
dotnet_style_explicit_tuple_names = true:warning
46+
dotnet_style_object_initializer = true:warning
47+
dotnet_style_prefer_auto_properties = true:warning
48+
dotnet_style_prefer_conditional_expression_over_assignment = true:warning
49+
dotnet_style_prefer_conditional_expression_over_return = true:warning
50+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
51+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
52+
dotnet_style_readonly_field = true:warning
53+
dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning
54+
55+
# -- .NET Naming Conventions ---------------------------- #
56+
57+
dotnet_naming_symbols.private_field_symbol.applicable_kinds = field
58+
dotnet_naming_symbols.private_field_symbol.applicable_accessibilities = private
59+
dotnet_naming_style.private_field_style.capitalization = camel_case
60+
dotnet_naming_rule.private_fields_are_camel_case.severity = warning
61+
dotnet_naming_rule.private_fields_are_camel_case.symbols = private_field_symbol
62+
dotnet_naming_rule.private_fields_are_camel_case.style = private_field_style
63+
64+
dotnet_naming_symbols.non_private_field_symbol.applicable_kinds = field
65+
dotnet_naming_symbols.non_private_field_symbol.applicable_accessibilities = public,internal,friend,protected,protected_internal,protected_friend
66+
dotnet_naming_style.non_private_field_style.capitalization = pascal_case
67+
dotnet_naming_rule.non_private_fields_are_pascal_case.severity = warning
68+
dotnet_naming_rule.non_private_fields_are_pascal_case.symbols = non_private_field_symbol
69+
dotnet_naming_rule.non_private_fields_are_pascal_case.style = non_private_field_style
70+
71+
dotnet_naming_symbols.parameter_symbol.applicable_kinds = parameter
72+
dotnet_naming_style.parameter_style.capitalization = camel_case
73+
dotnet_naming_rule.parameters_are_camel_case.severity = warning
74+
dotnet_naming_rule.parameters_are_camel_case.symbols = parameter_symbol
75+
dotnet_naming_rule.parameters_are_camel_case.style = parameter_style
76+
77+
dotnet_naming_symbols.non_interface_type_symbol.applicable_kinds = class,struct,enum,delegate
78+
dotnet_naming_style.non_interface_type_style.capitalization = pascal_case
79+
dotnet_naming_rule.non_interface_types_are_pascal_case.severity = warning
80+
dotnet_naming_rule.non_interface_types_are_pascal_case.symbols = non_interface_type_symbol
81+
dotnet_naming_rule.non_interface_types_are_pascal_case.style = non_interface_type_style
82+
83+
dotnet_naming_symbols.interface_type_symbol.applicable_kinds = interface
84+
dotnet_naming_style.interface_type_style.capitalization = pascal_case
85+
dotnet_naming_style.interface_type_style.required_prefix = I
86+
dotnet_naming_rule.interface_types_must_be_prefixed_with_I.severity = warning
87+
dotnet_naming_rule.interface_types_must_be_prefixed_with_I.symbols = interface_type_symbol
88+
dotnet_naming_rule.interface_types_must_be_prefixed_with_I.style = interface_type_style
89+
90+
dotnet_naming_symbols.member_symbol.applicable_kinds = method,property,event
91+
dotnet_naming_style.member_style.capitalization = pascal_case
92+
dotnet_naming_rule.members_are_pascal_case.severity = warning
93+
dotnet_naming_rule.members_are_pascal_case.symbols = member_symbol
94+
dotnet_naming_rule.members_are_pascal_case.style = member_style
95+
96+
# -- C# Files ------------------------------------------- #
1397

14-
#require members of object intializers to be on separate lines
98+
[*.cs]
99+
# var preferences
100+
csharp_style_var_elsewhere = true:warning
101+
csharp_style_var_for_built_in_types = true:warning
102+
csharp_style_var_when_type_is_apparent = true:warning
103+
104+
# Expression-bodied members
105+
csharp_style_expression_bodied_accessors = true:warning
106+
csharp_style_expression_bodied_constructors = false:warning
107+
csharp_style_expression_bodied_indexers = true:warning
108+
csharp_style_expression_bodied_methods = true:warning
109+
csharp_style_expression_bodied_operators = true:warning
110+
csharp_style_expression_bodied_properties = true:warning
111+
112+
# Pattern matching preferences
113+
csharp_style_pattern_matching_over_as_with_null_check = true:warning
114+
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
115+
116+
# Null-checking preferences
117+
csharp_style_throw_expression = true:warning
118+
csharp_style_conditional_delegate_call = true:warning
119+
120+
# Expression-level preferences
121+
csharp_prefer_braces = true:warning
122+
csharp_prefer_simple_default_expression = true:warning
123+
csharp_style_deconstructed_variable_declaration = true:warning
124+
csharp_style_inlined_variable_declaration = true:warning
125+
csharp_style_pattern_local_over_anonymous_function = false:suggestion
126+
127+
# Indentation preferences
128+
csharp_indent_block_contents = true
129+
csharp_indent_braces = false
130+
csharp_indent_case_contents = true
131+
csharp_indent_labels = flush_left
132+
csharp_indent_switch_labels = true
133+
134+
# New line preferences
135+
csharp_new_line_before_catch = true
136+
csharp_new_line_before_else = true
137+
csharp_new_line_before_finally = true
138+
csharp_new_line_before_members_in_anonymous_types = true
15139
csharp_new_line_before_members_in_object_initializers = true
140+
csharp_new_line_before_open_brace = all
141+
csharp_new_line_between_query_expression_clauses = true
16142

17-
#Formatting - organize using options
18-
19-
#do not place System.* using directives before other using directives
20-
dotnet_sort_system_directives_first = false
21-
22-
#Formatting - spacing options
143+
# Wrapping preferences
144+
csharp_preserve_single_line_blocks = true
145+
csharp_preserve_single_line_statements = false
23146

24-
#require a space after a keyword in a control flow statement such as a for loop
147+
# Space preferences
148+
csharp_space_after_cast = false
149+
csharp_space_after_colon_in_inheritance_clause = true
150+
csharp_space_after_comma = true
151+
csharp_space_after_dot = false
25152
csharp_space_after_keywords_in_control_flow_statements = true
26-
#do not place space characters after the opening parenthesis and before the closing parenthesis of a method call
153+
csharp_space_after_semicolon_in_for_statement = true
154+
csharp_space_around_binary_operators = before_and_after
155+
csharp_space_around_declaration_statements = do_not_ignore
156+
csharp_space_before_colon_in_inheritance_clause = true
157+
csharp_space_before_comma = false
158+
csharp_space_before_dot = false
159+
csharp_space_before_open_square_brackets = false
160+
csharp_space_before_semicolon_in_for_statement = false
161+
csharp_space_between_empty_square_brackets = false
162+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
163+
csharp_space_between_method_call_name_and_opening_parenthesis = false
27164
csharp_space_between_method_call_parameter_list_parentheses = false
28-
#place a space character after the opening parenthesis and before the closing parenthesis of a method declaration parameter list.
165+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
166+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
29167
csharp_space_between_method_declaration_parameter_list_parentheses = false
30-
31-
#Formatting - wrapping options
32-
33-
#leave code block on single line
34-
csharp_preserve_single_line_blocks = true
35-
36-
#Style - Code block preferences
37-
38-
#prefer curly braces even for one line of code
39-
csharp_prefer_braces = true:suggestion
40-
41-
#Style - expression bodied member options
42-
43-
#prefer expression-bodied members for accessors
44-
csharp_style_expression_bodied_accessors = true:suggestion
45-
#prefer block bodies for methods
46-
csharp_style_expression_bodied_methods = false:suggestion
47-
#prefer expression-bodied members for properties
48-
csharp_style_expression_bodied_properties = true:suggestion
49-
50-
#Style - expression level options
51-
52-
#prefer out variables to be declared inline in the argument list of a method call when possible
53-
csharp_style_inlined_variable_declaration = true:suggestion
54-
#prefer the language keyword for member access expressions, instead of the type name, for types that have a keyword to represent them
55-
dotnet_style_predefined_type_for_member_access = true:suggestion
56-
57-
#Style - Expression-level preferences
58-
59-
#prefer objects to be initialized using object initializers when possible
60-
dotnet_style_object_initializer = true:suggestion
61-
62-
#Style - implicit and explicit types
63-
64-
#prefer var over explicit type in all cases, unless overridden by another code style rule
65-
csharp_style_var_elsewhere = true:suggestion
66-
#prefer var when the type is already mentioned on the right-hand side of a declaration expression
67-
csharp_style_var_when_type_is_apparent = true:suggestion
68-
69-
#Style - language keyword and framework type options
70-
71-
#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
72-
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
73-
74-
#Style - modifier options
75-
76-
#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.
77-
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
78-
79-
#Style - Modifier preferences
80-
81-
#when this rule is set to a list of modifiers, prefer the specified ordering.
82-
csharp_preferred_modifier_order = public,protected,private,static,async,override:suggestion
83-
84-
#Style - qualification options
85-
86-
#prefer fields to be prefaced with this. in C# or Me. in Visual Basic
87-
dotnet_style_qualification_for_field = true:suggestion
88-
#prefer properties to be prefaced with this. in C# or Me. in Visual Basic
89-
dotnet_style_qualification_for_property = true:suggestion
90-
csharp_style_namespace_declarations=file_scoped:silent
168+
csharp_space_between_parentheses = none
169+
csharp_space_between_square_brackets = false

src/JK.TipCalc.Common.Tests/JK.TipCalc.Common.Tests.csproj

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<IsPackable>false</IsPackable>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
12-
<PackageReference Include="xunit" Version="2.4.2" />
13-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
11+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
12+
<PackageReference Include="xunit" Version="2.7.0" />
13+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
1414
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1515
<PrivateAssets>all</PrivateAssets>
1616
</PackageReference>
17-
<PackageReference Include="coverlet.collector" Version="3.2.0">
17+
<PackageReference Include="coverlet.collector" Version="6.0.2">
1818
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1919
<PrivateAssets>all</PrivateAssets>
2020
</PackageReference>

src/JK.TipCalc.Common/Components/TipCalculator.razor

-8
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@ else
3535
</tr>
3636
</thead>
3737
<tbody>
38-
@* @foreach (var calc in this.ViewModel.Tips.Items)
39-
{
40-
<tr>
41-
<td class="text-start">@($"{calc.Percent}")%</td>
42-
<td class="text-end">$@($"{calc.TipAmount:##0.00}")</td>
43-
<td class="text-end">$@($"{calc.Total:##0.00}")</td>
44-
</tr>
45-
}*@
4638
@for (int i = 0; i < this.ViewModel.Tips.Items.Count - 1; i++)
4739
{
4840
var calc = this.ViewModel.Tips.Items[i];

src/JK.TipCalc.Common/JK.TipCalc.Common.csproj

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@
33
<PropertyGroup>
44
<AssemblyName>JK.TipCalc.Common</AssemblyName>
55
<RootNamespace>JK.TipCalc.Common</RootNamespace>
6-
<TargetFramework>net7.0</TargetFramework>
6+
<TargetFramework>net8.0</TargetFramework>
77
<Nullable>enable</Nullable>
88
<ImplicitUsings>enable</ImplicitUsings>
99
</PropertyGroup>
10-
11-
10+
1211
<ItemGroup>
1312
<SupportedPlatform Include="browser" />
1413
</ItemGroup>
1514

1615
<ItemGroup>
17-
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.0" />
16+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.3" />
1817
</ItemGroup>
1918

2019
</Project>

src/JK.TipCalc.Common/libman.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
"defaultProvider": "cdnjs",
44
"libraries": [
55
{
6-
"library": "bootstrap@5.2.3",
6+
"library": "bootstrap@5.3.3",
77
"destination": "wwwroot/lib/bootstrap/",
88
"files": [
99
"css/bootstrap.min.css",
1010
"js/bootstrap.bundle.min.js"
1111
]
1212
},
1313
{
14-
"library": "bootstrap-icons@1.10.2",
14+
"library": "bootstrap-icons@1.11.3",
1515
"destination": "wwwroot/lib/bootstrap-icons/",
1616
"files": [
1717
"bootstrap-icons.svg",

src/JK.TipCalc.Common/wwwroot/css/JK.TipCalc.Common.css

-14
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,8 @@ table.table tr th {
2828
color: #fff;
2929
}
3030

31-
tr#custom-tip-row {
32-
background: rgba(var(--theme-rgb), 0.3);
33-
}
34-
3531
@media (prefers-color-scheme: dark) {
3632
body {
3733
background: #111;
38-
color: #fff;
39-
}
40-
41-
table.table tr td {
42-
color: #fff !important;
43-
}
44-
45-
.input-group-text {
46-
background-color: #333333;
47-
color: #ddd;
4834
}
4935
}

0 commit comments

Comments
 (0)