diff --git a/.vs/ProjectEvaluation/refactorthis.metadata.v9.bin b/.vs/ProjectEvaluation/refactorthis.metadata.v9.bin new file mode 100644 index 0000000..08fb5dc Binary files /dev/null and b/.vs/ProjectEvaluation/refactorthis.metadata.v9.bin differ diff --git a/.vs/ProjectEvaluation/refactorthis.projects.v9.bin b/.vs/ProjectEvaluation/refactorthis.projects.v9.bin new file mode 100644 index 0000000..40ffed1 Binary files /dev/null and b/.vs/ProjectEvaluation/refactorthis.projects.v9.bin differ diff --git a/.vs/ProjectEvaluation/refactorthis.strings.v9.bin b/.vs/ProjectEvaluation/refactorthis.strings.v9.bin new file mode 100644 index 0000000..6d454ba Binary files /dev/null and b/.vs/ProjectEvaluation/refactorthis.strings.v9.bin differ diff --git a/.vs/RefactorThis/CopilotIndices/17.14.698.11175/CodeChunks.db b/.vs/RefactorThis/CopilotIndices/17.14.698.11175/CodeChunks.db new file mode 100644 index 0000000..aa5d6e1 Binary files /dev/null and b/.vs/RefactorThis/CopilotIndices/17.14.698.11175/CodeChunks.db differ diff --git a/.vs/RefactorThis/CopilotIndices/17.14.698.11175/CodeChunks.db-shm b/.vs/RefactorThis/CopilotIndices/17.14.698.11175/CodeChunks.db-shm new file mode 100644 index 0000000..f7f7b5c Binary files /dev/null and b/.vs/RefactorThis/CopilotIndices/17.14.698.11175/CodeChunks.db-shm differ diff --git a/.vs/RefactorThis/CopilotIndices/17.14.698.11175/CodeChunks.db-wal b/.vs/RefactorThis/CopilotIndices/17.14.698.11175/CodeChunks.db-wal new file mode 100644 index 0000000..99386a6 Binary files /dev/null and b/.vs/RefactorThis/CopilotIndices/17.14.698.11175/CodeChunks.db-wal differ diff --git a/.vs/RefactorThis/CopilotIndices/17.14.698.11175/SemanticSymbols.db b/.vs/RefactorThis/CopilotIndices/17.14.698.11175/SemanticSymbols.db new file mode 100644 index 0000000..330f6d0 Binary files /dev/null and b/.vs/RefactorThis/CopilotIndices/17.14.698.11175/SemanticSymbols.db differ diff --git a/.vs/RefactorThis/CopilotIndices/17.14.698.11175/SemanticSymbols.db-shm b/.vs/RefactorThis/CopilotIndices/17.14.698.11175/SemanticSymbols.db-shm new file mode 100644 index 0000000..3b99498 Binary files /dev/null and b/.vs/RefactorThis/CopilotIndices/17.14.698.11175/SemanticSymbols.db-shm differ diff --git a/.vs/RefactorThis/CopilotIndices/17.14.698.11175/SemanticSymbols.db-wal b/.vs/RefactorThis/CopilotIndices/17.14.698.11175/SemanticSymbols.db-wal new file mode 100644 index 0000000..dbda78c Binary files /dev/null and b/.vs/RefactorThis/CopilotIndices/17.14.698.11175/SemanticSymbols.db-wal differ diff --git a/.vs/RefactorThis/DesignTimeBuild/.dtbcache.v2 b/.vs/RefactorThis/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..1198e6b Binary files /dev/null and b/.vs/RefactorThis/DesignTimeBuild/.dtbcache.v2 differ diff --git a/.vs/RefactorThis/FileContentIndex/37179ff2-2e8e-40d1-8d06-2b99a3c50543.vsidx b/.vs/RefactorThis/FileContentIndex/37179ff2-2e8e-40d1-8d06-2b99a3c50543.vsidx new file mode 100644 index 0000000..c5365ae Binary files /dev/null and b/.vs/RefactorThis/FileContentIndex/37179ff2-2e8e-40d1-8d06-2b99a3c50543.vsidx differ diff --git a/.vs/RefactorThis/FileContentIndex/b95a99dc-4bf0-4b14-a1e9-a9b86930fa92.vsidx b/.vs/RefactorThis/FileContentIndex/b95a99dc-4bf0-4b14-a1e9-a9b86930fa92.vsidx new file mode 100644 index 0000000..4dc8da7 Binary files /dev/null and b/.vs/RefactorThis/FileContentIndex/b95a99dc-4bf0-4b14-a1e9-a9b86930fa92.vsidx differ diff --git a/.vs/RefactorThis/v17/.futdcache.v2 b/.vs/RefactorThis/v17/.futdcache.v2 new file mode 100644 index 0000000..7a789c5 Binary files /dev/null and b/.vs/RefactorThis/v17/.futdcache.v2 differ diff --git a/.vs/RefactorThis/v17/.suo b/.vs/RefactorThis/v17/.suo new file mode 100644 index 0000000..75c65b7 Binary files /dev/null and b/.vs/RefactorThis/v17/.suo differ diff --git a/.vs/RefactorThis/v17/DocumentLayout.backup.json b/.vs/RefactorThis/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..01ba4e6 --- /dev/null +++ b/.vs/RefactorThis/v17/DocumentLayout.backup.json @@ -0,0 +1,53 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\moses\\source\\repos\\re-leased\\revised\\refactorthis\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{69EC59A3-D335-4B22-96C8-C557425EBEBC}|Refactor\\Refactor.csproj|c:\\users\\moses\\source\\repos\\re-leased\\revised\\refactorthis\\refactor\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{69EC59A3-D335-4B22-96C8-C557425EBEBC}|Refactor\\Refactor.csproj|solutionrelative:refactor\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 3, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}" + }, + { + "$type": "Bookmark", + "Name": "ST:128:0:{75188d03-9892-4ae2-abf1-207126247ce5}" + }, + { + "$type": "Bookmark", + "Name": "ST:129:0:{75188d03-9892-4ae2-abf1-207126247ce5}" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\moses\\source\\repos\\re-leased\\revised\\refactorthis\\Refactor\\Program.cs", + "RelativeDocumentMoniker": "Refactor\\Program.cs", + "ToolTip": "C:\\Users\\moses\\source\\repos\\re-leased\\revised\\refactorthis\\Refactor\\Program.cs", + "RelativeToolTip": "Refactor\\Program.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-09-04T07:45:13.095Z", + "EditorCaption": "" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{56df62a4-05a3-4e5b-aa1a-99371ccfb997}" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/RefactorThis/v17/DocumentLayout.json b/.vs/RefactorThis/v17/DocumentLayout.json new file mode 100644 index 0000000..e53b488 --- /dev/null +++ b/.vs/RefactorThis/v17/DocumentLayout.json @@ -0,0 +1,49 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\moses\\source\\repos\\re-leased\\revised\\refactorthis\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{69EC59A3-D335-4B22-96C8-C557425EBEBC}|Refactor\\Refactor.csproj|c:\\users\\moses\\source\\repos\\re-leased\\revised\\refactorthis\\refactor\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{69EC59A3-D335-4B22-96C8-C557425EBEBC}|Refactor\\Refactor.csproj|solutionrelative:refactor\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 3, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}" + }, + { + "$type": "Bookmark", + "Name": "ST:128:0:{75188d03-9892-4ae2-abf1-207126247ce5}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{56df62a4-05a3-4e5b-aa1a-99371ccfb997}" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\moses\\source\\repos\\re-leased\\revised\\refactorthis\\Refactor\\Program.cs", + "RelativeDocumentMoniker": "Refactor\\Program.cs", + "ToolTip": "C:\\Users\\moses\\source\\repos\\re-leased\\revised\\refactorthis\\Refactor\\Program.cs", + "RelativeToolTip": "Refactor\\Program.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-09-04T07:45:13.095Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Refactor/Program.cs b/Refactor/Program.cs new file mode 100644 index 0000000..02bf2ba --- /dev/null +++ b/Refactor/Program.cs @@ -0,0 +1,25 @@ +using System; +using RefactorThis.Domain; +using RefactorThis.Persistence; +namespace Refactor +{ + internal class Program + { + static void Main(string[] args) + { + InvoiceService invoiceService = new InvoiceService(); + Invoice invoice = new Invoice(new InvoiceRepository()) + { + Amount = 100, + AmountPaid = 100, + Type = InvoiceType.Standard + }; + Payment payment = new Payment() + { + Amount = 100, + Reference = "Refactor" + }; + Console.WriteLine("Released Refactored"); + } + } +} diff --git a/Refactor/Refactor.csproj b/Refactor/Refactor.csproj new file mode 100644 index 0000000..2150e37 --- /dev/null +++ b/Refactor/Refactor.csproj @@ -0,0 +1,10 @@ + + + + Exe + net8.0 + enable + enable + + + diff --git a/RefactorThis.Domain/InvoiceService.cs b/RefactorThis.Domain/InvoiceService.cs index fbd674c..ce8b8bb 100644 --- a/RefactorThis.Domain/InvoiceService.cs +++ b/RefactorThis.Domain/InvoiceService.cs @@ -8,7 +8,10 @@ public class InvoiceService { private readonly InvoiceRepository _invoiceRepository; - public InvoiceService( InvoiceRepository invoiceRepository ) + public InvoiceService( ) : this( new InvoiceRepository( ) ) + { + } + public InvoiceService( InvoiceRepository invoiceRepository ) { _invoiceRepository = invoiceRepository; } @@ -21,7 +24,7 @@ public string ProcessPayment( Payment payment ) if ( inv == null ) { - throw new InvalidOperationException( "There is no invoice matching this payment" ); + throw new InvalidOperationException( "There is no invoice matching this payment Refactor" ); } else { diff --git a/RefactorThis.sln b/RefactorThis.sln index e235699..a03afce 100644 --- a/RefactorThis.sln +++ b/RefactorThis.sln @@ -1,11 +1,16 @@  Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36121.58 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RefactorThis.Domain", "RefactorThis.Domain\RefactorThis.Domain.csproj", "{5310B2FE-E26D-414E-B656-1F74C5A70368}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RefactorThis.Domain.Tests", "RefactorThis.Domain.Tests\RefactorThis.Domain.Tests.csproj", "{7971BDEC-EAD1-4FB8-A4F5-B1F67E4F6355}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RefactorThis.Persistence", "RefactorThis.Persistence\RefactorThis.Persistence.csproj", "{50F3F93C-6688-4B4B-8B30-3BDF6FA4485F}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Refactor", "Refactor\Refactor.csproj", "{69EC59A3-D335-4B22-96C8-C557425EBEBC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -24,7 +29,12 @@ Global {50F3F93C-6688-4B4B-8B30-3BDF6FA4485F}.Debug|Any CPU.Build.0 = Debug|Any CPU {50F3F93C-6688-4B4B-8B30-3BDF6FA4485F}.Release|Any CPU.ActiveCfg = Release|Any CPU {50F3F93C-6688-4B4B-8B30-3BDF6FA4485F}.Release|Any CPU.Build.0 = Release|Any CPU + {69EC59A3-D335-4B22-96C8-C557425EBEBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {69EC59A3-D335-4B22-96C8-C557425EBEBC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {69EC59A3-D335-4B22-96C8-C557425EBEBC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {69EC59A3-D335-4B22-96C8-C557425EBEBC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection - GlobalSection(NestedProjects) = preSolution + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection EndGlobal