-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First pass at bringing more structure to the code with the end goal o…
…f being able to better facilitate testing.
- Loading branch information
Showing
45 changed files
with
194 additions
and
109 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
GlucoseTray/Services/AlertService.cs → ...ray.Domain/DisplayResults/AlertService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...xtensions/GlucoseFetchResultExtensions.cs → ...ayResults/GlucoseFetchResultExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace GlucoseTray.Domain.DisplayResults; | ||
|
||
public interface IUiService | ||
{ | ||
void ShowErrorAlert(string messageBoxText, string caption); | ||
void InitializeTrayIcon(EventHandler exitEvent); | ||
void DisposeTrayIcon(); | ||
void CreateIcon(GlucoseResult glucoseResult); | ||
void ShowAlert(string alertName); | ||
void ShowCriticalAlert(string alertText, string alertName); | ||
} |
4 changes: 3 additions & 1 deletion
4
GlucoseTray/Extensions/StringExtensions.cs → ...Domain/DisplayResults/StringExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
GlucoseTray/Enums/AlertLevel.cs → GlucoseTray.Domain/Enums/AlertLevel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace GlucoseTray.Enums; | ||
namespace GlucoseTray.Domain.Enums; | ||
|
||
public enum AlertLevel | ||
{ | ||
|
2 changes: 1 addition & 1 deletion
2
GlucoseTray/Enums/DexcomServer.cs → GlucoseTray.Domain/Enums/DexcomServer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
GlucoseTray/Enums/FetchMethod.cs → GlucoseTray.Domain/Enums/FetchMethod.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace GlucoseTray.Enums; | ||
namespace GlucoseTray.Domain.Enums; | ||
|
||
public enum FetchMethod | ||
{ | ||
|
2 changes: 1 addition & 1 deletion
2
GlucoseTray/Enums/GlucoseUnitType.cs → GlucoseTray.Domain/Enums/GlucoseUnitType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace GlucoseTray.Enums; | ||
namespace GlucoseTray.Domain.Enums; | ||
|
||
public enum GlucoseUnitType | ||
{ | ||
|
2 changes: 1 addition & 1 deletion
2
GlucoseTray/Enums/TrendResult.cs → GlucoseTray.Domain/Enums/TrendResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace GlucoseTray.Enums; | ||
namespace GlucoseTray.Domain.Enums; | ||
|
||
public enum TrendResult | ||
{ | ||
|
2 changes: 1 addition & 1 deletion
2
GlucoseTray/Enums/UpDown.cs → GlucoseTray.Domain/Enums/UpDown.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace GlucoseTray.Enums; | ||
namespace GlucoseTray.Domain.Enums; | ||
|
||
public enum UpDown | ||
{ | ||
|
4 changes: 3 additions & 1 deletion
4
GlucoseTray/Services/DebugService.cs → ...eTray.Domain/FetchResults/DebugService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
GlucoseTray/Models/DexcomResult.cs → ...eTray.Domain/FetchResults/DexcomResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
GlucoseTray/Services/GlucoseFetchService.cs → ...omain/FetchResults/GlucoseFetchService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
GlucoseTray/Services/GlucoseMath.cs → ...seTray.Domain/FetchResults/GlucoseMath.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
GlucoseTray.Domain/FetchResults/IExternalCommunicationAdapter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace GlucoseTray.Domain.FetchResults | ||
{ | ||
public interface IExternalCommunicationAdapter | ||
{ | ||
Task<string> PostApiResponseAsync(string url, string? content = null); | ||
Task<string> GetApiResponseAsync(string url, string? content = null); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
GlucoseTray/Models/NightScoutResult.cs → ...y.Domain/FetchResults/NightScoutResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 9 additions & 17 deletions
26
GlucoseTray/Services/NightscoutService.cs → ....Domain/FetchResults/NightscoutService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 4 additions & 9 deletions
13
GlucoseTray/Services/UrlAssembler.cs → ...eTray.Domain/FetchResults/UrlAssembler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
GlucoseTray/Models/GlucoseResult.cs → GlucoseTray.Domain/GlucoseResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
5 changes: 3 additions & 2 deletions
5
GlucoseTray/Settings/ISettingsProxy.cs → GlucoseTray.Domain/ISettingsProxy.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace GlucoseTray.Domain | ||
{ | ||
public interface ITaskSchedulerService | ||
{ | ||
bool HasTaskEnabled(); | ||
void ToggleTask(bool enable); | ||
} | ||
} |
12 changes: 3 additions & 9 deletions
12
.../Services/ExternalCommunicationAdapter.cs → ...structure/ExternalCommunicationAdapter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
GlucoseTray.Infrastructure/GlucoseTray.Infrastructure.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" /> | ||
<PackageReference Include="TaskScheduler" Version="2.11.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\GlucoseTray.Domain\GlucoseTray.Domain.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
8 changes: 4 additions & 4 deletions
8
GlucoseTray/Services/TaskSchedulerService.cs → ...ay.Infrastructure/TaskSchedulerService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.