diff --git a/.editorconfig b/.editorconfig
index 111416e..7c9ca24 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -18,6 +18,7 @@ indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
+dotnet_diagnostic.CS1591.severity = none
# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,msbuildproj}]
@@ -66,7 +67,7 @@ dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case
# Constants are PascalCase
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
-dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style
+dotnet_naming_rule.constants_should_be_pascal_case.style = non_private_static_field_style
dotnet_naming_symbols.constants.applicable_kinds = field, local
dotnet_naming_symbols.constants.required_modifiers = const
@@ -76,7 +77,7 @@ dotnet_naming_style.constant_style.capitalization = pascal_case
# Static fields are camelCase
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
-dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style
+dotnet_naming_rule.static_fields_should_be_camel_case.style = camel_case_style
dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static
@@ -86,7 +87,7 @@ dotnet_naming_style.static_field_style.capitalization = camel_case
# Instance fields are camelCase
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
-dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
+dotnet_naming_rule.instance_fields_should_be_camel_case.style = camel_case_style
dotnet_naming_symbols.instance_fields.applicable_kinds = field
@@ -104,7 +105,7 @@ dotnet_naming_style.camel_case_style.capitalization = camel_case
# Local functions are PascalCase
dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions
-dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style
+dotnet_naming_rule.local_functions_should_be_pascal_case.style = non_private_static_field_style
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
@@ -113,11 +114,26 @@ dotnet_naming_style.local_function_style.capitalization = pascal_case
# By default, name items with PascalCase
dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members
-dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style
+dotnet_naming_rule.members_should_be_pascal_case.style = non_private_static_field_style
dotnet_naming_symbols.all_members.applicable_kinds = *
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
+dotnet_style_operator_placement_when_wrapping = beginning_of_line
+tab_width = 4
+end_of_line = crlf
+dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
+dotnet_style_prefer_auto_properties = true:silent
+dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
+dotnet_style_prefer_conditional_expression_over_assignment = true:silent
+dotnet_style_prefer_conditional_expression_over_return = true:silent
+dotnet_style_prefer_inferred_tuple_names = true:suggestion
+dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
+dotnet_style_prefer_compound_assignment = true:suggestion
+dotnet_style_prefer_collection_expression = true:suggestion
+dotnet_style_namespace_match_folder = true:suggestion
+dotnet_style_prefer_simplified_interpolation = true:suggestion
+dotnet_diagnostic.CA1001.severity = warning
# CSharp code style settings:
[*.cs]
@@ -166,6 +182,18 @@ dotnet_diagnostic.SA1130.severity = silent
# IDE1006: Naming Styles - StyleCop handles these for us
dotnet_diagnostic.IDE1006.severity = none
+csharp_using_directive_placement = inside_namespace:warning
+csharp_prefer_simple_using_statement = true:suggestion
+csharp_style_namespace_declarations = file_scoped:warning
+csharp_style_prefer_method_group_conversion = true:silent
+csharp_style_prefer_top_level_statements = false:silent
+csharp_style_expression_bodied_lambdas = true:silent
+csharp_style_expression_bodied_local_functions = false:silent
+csharp_style_prefer_primary_constructors = true:suggestion
+csharp_style_prefer_null_check_over_type_check = true:suggestion
+csharp_prefer_simple_default_expression = true:suggestion
+csharp_style_prefer_local_over_anonymous_function = true:suggestion
+csharp_style_prefer_index_operator = true:suggestion
[*.sln]
indent_style = tab
diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml
deleted file mode 100644
index dcec561..0000000
--- a/.github/workflows/dotnet-core.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-name: .NET Core
-
-on:
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v2
- - name: Setup .NET
- uses: actions/setup-dotnet@v1
- with:
- dotnet-version: 5.0.x
- - name: Install dependencies
- run: dotnet restore
- - name: Build
- run: dotnet build --configuration Release --no-restore
- - name: Test
- run: dotnet test --no-restore --verbosity normal
- - name: Publish
- uses: brandedoutcast/publish-nuget@v2.5.5
- with:
- PROJECT_FILE_PATH: "OfxNet/OfxNet.csproj"
- NUGET_KEY: ${{secrets.NUGET_APIKEY}}
diff --git a/.github/workflows/ofxnet-pr.yml b/.github/workflows/ofxnet-pr.yml
new file mode 100644
index 0000000..79176d1
--- /dev/null
+++ b/.github/workflows/ofxnet-pr.yml
@@ -0,0 +1,26 @@
+name: OFX.NET PR
+
+on:
+ pull_request:
+ branches: [ "main" ]
+
+env:
+ TreatWarningsAsErrors: true
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: '8.x'
+ - name: Restore dependencies
+ run: dotnet restore
+ - name: Build
+ run: dotnet build --configuration Release --no-restore
+ - name: Test
+ run: dotnet test --configuration Release --no-build
diff --git a/BankingTools.sln b/BankingTools.sln
index d84d1c5..33d48be 100644
--- a/BankingTools.sln
+++ b/BankingTools.sln
@@ -3,18 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32014.148
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OfxNet", "OfxNet\OfxNet.csproj", "{FB4B0B05-D087-464A-B03C-7B512AE0735D}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OfxNet", "src\OfxNet\OfxNet.csproj", "{FB4B0B05-D087-464A-B03C-7B512AE0735D}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OfxNet.UnitTests", "OfxNet.UnitTests\OfxNet.UnitTests.csproj", "{4DBA4695-02D6-49C2-810A-DE8DFE7B70EB}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OfxNet.UnitTests", "test\OfxNet.UnitTests\OfxNet.UnitTests.csproj", "{4DBA4695-02D6-49C2-810A-DE8DFE7B70EB}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OfxNet.IntegrationTests", "OfxNet.IntegrationTests\OfxNet.IntegrationTests.csproj", "{1A1F0950-9156-44A0-BFE8-4E5B001F9A84}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OfxNet.IntegrationTests", "test\OfxNet.IntegrationTests\OfxNet.IntegrationTests.csproj", "{1A1F0950-9156-44A0-BFE8-4E5B001F9A84}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9820D1F4-882C-4CF1-8E02-71939CE4B3A7}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
- .github\workflows\dotnet-core.yml = .github\workflows\dotnet-core.yml
+ Directory.Build.props = Directory.Build.props
.github\workflows\dotnet.yml = .github\workflows\dotnet.yml
LICENSE = LICENSE
+ .github\workflows\ofxnet-pr.yml = .github\workflows\ofxnet-pr.yml
README.md = README.md
EndProjectSection
EndProject
diff --git a/Directory.Build.props b/Directory.Build.props
index e25422c..f0b3690 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,5 +1,18 @@
+ net7.0
+ enable
+ enable
+ 1.0.0.0
+ 1.0.0.0
+ 1.0.1.0
+ latest
+ true
true
+ true
+ x64
+ en-GB
+ Jim Dale
+ true
-
+
\ No newline at end of file
diff --git a/OfxNet.IntegrationTests/OfxDocumentTests.cs b/OfxNet.IntegrationTests/OfxDocumentTests.cs
deleted file mode 100644
index 51b08ef..0000000
--- a/OfxNet.IntegrationTests/OfxDocumentTests.cs
+++ /dev/null
@@ -1,95 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-namespace OfxNet.IntegrationTests
-{
- [TestClass]
- public class OfxDocumentTests
- {
- public static IEnumerable