diff --git a/.editorconfig b/.editorconfig index d800b05..93a6807 100644 --- a/.editorconfig +++ b/.editorconfig @@ -81,14 +81,14 @@ csharp_style_var_for_built_in_types = false csharp_style_var_when_type_is_apparent = true # Expression-bodied members -csharp_style_expression_bodied_accessors = when_on_single_line -csharp_style_expression_bodied_constructors = true -csharp_style_expression_bodied_indexers = true -csharp_style_expression_bodied_lambdas = true -csharp_style_expression_bodied_local_functions = true -csharp_style_expression_bodied_methods = true -csharp_style_expression_bodied_operators = false -csharp_style_expression_bodied_properties = when_on_single_line +csharp_style_expression_bodied_accessors = when_on_single_line:silent +csharp_style_expression_bodied_constructors = true:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_local_functions = true:silent +csharp_style_expression_bodied_methods = true:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = when_on_single_line:silent # Pattern matching preferences csharp_style_pattern_matching_over_as_with_null_check = true:silent @@ -108,15 +108,15 @@ csharp_style_prefer_readonly_struct = true csharp_style_prefer_readonly_struct_member = true # Code-block preferences -csharp_prefer_braces = true +csharp_prefer_braces = true:silent csharp_prefer_simple_using_statement = true:silent -csharp_style_namespace_declarations = file_scoped -csharp_style_prefer_method_group_conversion = true -csharp_style_prefer_primary_constructors = true -csharp_style_prefer_top_level_statements = true +csharp_style_namespace_declarations = file_scoped:silent +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_primary_constructors = true:suggestion +csharp_style_prefer_top_level_statements = true:silent # Expression-level preferences -csharp_prefer_simple_default_expression = true +csharp_prefer_simple_default_expression = true:suggestion csharp_style_deconstructed_variable_declaration = true:silent csharp_style_implicit_object_creation_when_type_is_apparent = true:silent csharp_style_inlined_variable_declaration = true:silent @@ -131,7 +131,7 @@ csharp_style_unused_value_assignment_preference = discard_variable csharp_style_unused_value_expression_statement_preference = discard_variable # 'using' directive preferences -csharp_using_directive_placement = outside_namespace +csharp_using_directive_placement = outside_namespace:silent # New line preferences csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true @@ -228,3 +228,25 @@ dotnet_naming_style.begins_with_i.required_prefix = I dotnet_naming_style.begins_with_i.required_suffix = dotnet_naming_style.begins_with_i.word_separator = dotnet_naming_style.begins_with_i.capitalization = pascal_case + +[*.{cs,vb}] +dotnet_style_operator_placement_when_wrapping = beginning_of_line +tab_width = 4 +indent_size = 4 +end_of_line = crlf +dotnet_style_coalesce_expression = true:silent +dotnet_style_null_propagation = true:silent +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_object_initializer = true:silent +dotnet_style_prefer_collection_expression = true:suggestion +dotnet_style_collection_initializer = true:silent +dotnet_style_prefer_simplified_boolean_expressions = true:silent +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +dotnet_style_explicit_tuple_names = true:silent +dotnet_style_prefer_inferred_tuple_names = true:silent +dotnet_style_prefer_inferred_anonymous_type_member_names = true:silent +dotnet_style_prefer_compound_assignment = true:suggestion +dotnet_style_prefer_simplified_interpolation = true:suggestion +dotnet_style_namespace_match_folder = true:suggestion \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index eea75dd..b3a8028 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,7 +18,7 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: | - 7.0.x + 8.0.x 6.0.x - name: Restore dependencies run: dotnet restore @@ -44,7 +44,7 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: | - 7.0.x + 8.0.x 6.0.x - name: Restore dependencies run: dotnet restore diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index c37ff51..75afe91 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -18,7 +18,7 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: | - 7.0.x + 8.0.x 6.0.x - name: Restore dependencies run: dotnet restore diff --git a/.github/workflows/master_pr.yml b/.github/workflows/master_pr.yml index a0c6be2..ac20a6f 100644 --- a/.github/workflows/master_pr.yml +++ b/.github/workflows/master_pr.yml @@ -17,7 +17,7 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: | - 7.0.x + 8.0.x 6.0.x - name: Restore dependencies run: dotnet restore diff --git a/Epoch.net.Test/Epoch.net.Test.csproj b/Epoch.net.Test/Epoch.net.Test.csproj index b022234..9502cab 100644 --- a/Epoch.net.Test/Epoch.net.Test.csproj +++ b/Epoch.net.Test/Epoch.net.Test.csproj @@ -1,7 +1,7 @@  - net7.0;net6.0;net48;netstandard2.0 + net8.0;net7.0;net6.0;net48;netstandard2.0 false diff --git a/Epoch.net/Epoch.net.csproj b/Epoch.net/Epoch.net.csproj index 756926b..13db317 100644 --- a/Epoch.net/Epoch.net.csproj +++ b/Epoch.net/Epoch.net.csproj @@ -11,7 +11,7 @@ Implements a simple set of helpers to handle EPOCH timestamps in .NET - net7.0;net6.0;net48;netstandard2.0 + net8.0;net7.0;net6.0;net48;netstandard2.0 diff --git a/Epoch.net/EpochTime.cs b/Epoch.net/EpochTime.cs index 3057e7f..8bf1707 100644 --- a/Epoch.net/EpochTime.cs +++ b/Epoch.net/EpochTime.cs @@ -50,7 +50,7 @@ public sealed class EpochTime /// Creates a new instance of with a given rawEpoch /// /// The number of seconds from 1970-01-01T00:00:00 - public EpochTime(int rawEpoch) => this.Epoch = rawEpoch; + public EpochTime(int rawEpoch) => Epoch = rawEpoch; /// /// Creates a new instance of with the given