diff --git a/GC-local-server-rewrite/common/CertificateHelper.cs b/GC-local-server-rewrite/common/CertificateHelper.cs index 261fbba..cd2b16f 100644 --- a/GC-local-server-rewrite/common/CertificateHelper.cs +++ b/GC-local-server-rewrite/common/CertificateHelper.cs @@ -1,7 +1,5 @@ -using System.Diagnostics; -using System.Security.Cryptography; +using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; -using System.Text; using CertificateManager; using CertificateManager.Models; using Microsoft.Extensions.DependencyInjection; diff --git a/GC-local-server-rewrite/common/DatabaseHelper.cs b/GC-local-server-rewrite/common/DatabaseHelper.cs index 2499ee3..7c95eda 100644 --- a/GC-local-server-rewrite/common/DatabaseHelper.cs +++ b/GC-local-server-rewrite/common/DatabaseHelper.cs @@ -2,7 +2,7 @@ namespace GCLocalServerRewrite.common; -public class DatabaseHelper +public static class DatabaseHelper { /// /// Static method to allow local data services to initialise their associated database conveniently. diff --git a/GC-local-server-rewrite/common/PathHelper.cs b/GC-local-server-rewrite/common/PathHelper.cs index 5026d69..39b9624 100644 --- a/GC-local-server-rewrite/common/PathHelper.cs +++ b/GC-local-server-rewrite/common/PathHelper.cs @@ -1,8 +1,9 @@ using System.Diagnostics; +using Swan; namespace GCLocalServerRewrite.common; -public class PathHelper +public static class PathHelper { /// /// Gets the local path of html/static files. @@ -32,7 +33,12 @@ public class PathHelper return parentFullName; #else - return assemblyPath; + if (assemblyPath != null) + { + return assemblyPath; + } + + throw SelfCheck.Failure("Cannot get assembly path!"); #endif } }