Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .vs/RefactorThis/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .vs/RefactorThis/v17/.futdcache.v2
Binary file not shown.
Binary file added .vs/RefactorThis/v17/.suo
Binary file not shown.
53 changes: 53 additions & 0 deletions .vs/RefactorThis/v17/DocumentLayout.backup.json
Original file line number Diff line number Diff line change
@@ -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}"
}
]
}
]
}
]
}
49 changes: 49 additions & 0 deletions .vs/RefactorThis/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
@@ -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": ""
}
]
}
]
}
]
}
25 changes: 25 additions & 0 deletions Refactor/Program.cs
Original file line number Diff line number Diff line change
@@ -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");
}
}
}
10 changes: 10 additions & 0 deletions Refactor/Refactor.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
7 changes: 5 additions & 2 deletions RefactorThis.Domain/InvoiceService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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
{
Expand Down
12 changes: 11 additions & 1 deletion RefactorThis.sln
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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