Skip to content

Commit

Permalink
feat: Fix Spelling issue for HostingFrameworkType DonNetFramework48 =…
Browse files Browse the repository at this point in the history
…> DotNetFramework48
  • Loading branch information
davidkallesen committed Mar 11, 2024
1 parent 7788ce1 commit 62acc2c
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public enum HostingFrameworkType
NativeNoSettings,

[Description(".NET Framework 4.8")]
DonNetFramework48,
DotNetFramework48,

[Description(".NET 7")]
DotNet7,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ private void CheckPrerequisitesForHostingFramework()
{
switch (HostingFramework)
{
case HostingFrameworkType.DonNetFramework48:
case HostingFrameworkType.DotNetFramework48:
if (iisInstallerService.IsMicrosoftDotNetFramework48())
{
AddToInstallationPrerequisites("IsMicrosoftDotNetFramework48", LogCategoryType.Information, "Microsoft .NET Framework 4.8 is installed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,10 +529,10 @@ private void CheckPrerequisitesForHostingFramework()
case HostingFrameworkType.DotNet8:
AddToInstallationPrerequisites("IsMicrosoftDotNet8", LogCategoryType.Warning, "Microsoft .NET 8 is not installed");
break;
case HostingFrameworkType.DonNetFramework48 when waInstallerService.IsMicrosoftDotNetFramework48():
case HostingFrameworkType.DotNetFramework48 when waInstallerService.IsMicrosoftDotNetFramework48():
AddToInstallationPrerequisites("IsMicrosoftDotNetFramework48", LogCategoryType.Information, "Microsoft .NET Framework 4.8 is installed");
break;
case HostingFrameworkType.DonNetFramework48:
case HostingFrameworkType.DotNetFramework48:
AddToInstallationPrerequisites("IsMicrosoftDotNetFramework48", LogCategoryType.Warning, "Microsoft .NET Framework 4.8 is not installed");
break;
case HostingFrameworkType.Native:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ReSharper disable ReturnTypeCanBeEnumerable.Local
// ReSharper disable StringLiteralTypo
// ReSharper disable SwitchStatementHandlesSomeKnownEnumValuesWithDefault
// ReSharper disable SwitchStatementMissingSomeEnumCasesNoDefault
namespace Atc.Installer.Wpf.ComponentProvider;

[SuppressMessage("Design", "MA0048:File name must match type name", Justification = "OK - partial class")]
Expand Down Expand Up @@ -110,7 +111,7 @@ public void LoadConfigurationFiles()

switch (HostingFramework)
{
case HostingFrameworkType.DonNetFramework48:
case HostingFrameworkType.DotNetFramework48:
{
if (InstalledMainFilePath is not null)
{
Expand Down Expand Up @@ -201,10 +202,21 @@ public void PrepareInstallationFiles(

UnpackedZipFolderPath = Path.Combine(InstallerTempDirectory.FullName, @$"{ProjectName}\Unpacked\{Name}");

if (Directory.Exists(UnpackedZipFolderPath) &&
Directory.GetFiles(UnpackedZipFolderPath).Length == 0)
if (Directory.Exists(UnpackedZipFolderPath))
{
Directory.Delete(UnpackedZipFolderPath, recursive: true);
var minimumExpectedNumberOfFiles = 1;
if (HostingFramework is
HostingFrameworkType.DotNetFramework48 or
HostingFrameworkType.DotNet7 or
HostingFrameworkType.DotNet8)
{
minimumExpectedNumberOfFiles = 10;
}

if (Directory.GetFiles(UnpackedZipFolderPath).Length < minimumExpectedNumberOfFiles)
{
Directory.Delete(UnpackedZipFolderPath, recursive: true);
}
}

if (unpackIfExist ||
Expand Down Expand Up @@ -823,7 +835,7 @@ public async Task<ReportingData> GetReportingData()

switch (HostingFramework)
{
case HostingFrameworkType.DonNetFramework48 or
case HostingFrameworkType.DotNetFramework48 or
HostingFrameworkType.DotNet7 or
HostingFrameworkType.DotNet8:
{
Expand Down Expand Up @@ -946,7 +958,7 @@ private void ResolveInstalledMainFile(
{
case { ComponentType: ComponentType.Application, HostingFramework: HostingFrameworkType.DotNet7 }:
case { ComponentType: ComponentType.Application, HostingFramework: HostingFrameworkType.DotNet8 }:
case { ComponentType: ComponentType.Application, HostingFramework: HostingFrameworkType.DonNetFramework48 }:
case { ComponentType: ComponentType.Application, HostingFramework: HostingFrameworkType.DotNetFramework48 }:
InstalledMainFilePath = new ValueTemplateItemViewModel(
Path.Combine(basePath, $"{Name}.exe"),
template: instFolderPath,
Expand All @@ -960,7 +972,7 @@ private void ResolveInstalledMainFile(
break;
case { ComponentType: ComponentType.InternetInformationService, HostingFramework: HostingFrameworkType.DotNet7 }:
case { ComponentType: ComponentType.InternetInformationService, HostingFramework: HostingFrameworkType.DotNet8 }:
case { ComponentType: ComponentType.InternetInformationService, HostingFramework: HostingFrameworkType.DonNetFramework48 }:
case { ComponentType: ComponentType.InternetInformationService, HostingFramework: HostingFrameworkType.DotNetFramework48 }:
InstalledMainFilePath = new ValueTemplateItemViewModel(
Path.Combine(basePath, $"{Name}.dll"),
template: instFolderPath,
Expand All @@ -974,7 +986,7 @@ private void ResolveInstalledMainFile(
break;
case { ComponentType: ComponentType.WindowsService, HostingFramework: HostingFrameworkType.DotNet7 }:
case { ComponentType: ComponentType.WindowsService, HostingFramework: HostingFrameworkType.DotNet8 }:
case { ComponentType: ComponentType.WindowsService, HostingFramework: HostingFrameworkType.DonNetFramework48 }:
case { ComponentType: ComponentType.WindowsService, HostingFramework: HostingFrameworkType.DotNetFramework48 }:
InstalledMainFilePath = new ValueTemplateItemViewModel(
Path.Combine(basePath, $"{Name}.exe"),
template: instFolderPath,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public object Convert(
}

if (vm.HostingFramework is
HostingFrameworkType.DonNetFramework48 or
HostingFrameworkType.DotNetFramework48 or
HostingFrameworkType.DotNet7 or
HostingFrameworkType.DotNet8)
{
Expand Down

0 comments on commit 62acc2c

Please sign in to comment.