Skip to content

Commit f89724f

Browse files
Model: move environment utils to shared core
1 parent 25dc57d commit f89724f

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

src/Certify.Client/Certify.Client.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<ItemGroup>
2828
<ProjectReference Include="..\Certify.Locales\Certify.Locales.csproj" />
2929
<ProjectReference Include="..\Certify.Models\Certify.Models.csproj" />
30+
<ProjectReference Include="..\Certify.Shared\Certify.Shared.Core.csproj" />
3031
<ProjectReference Include="..\Certify.SourceGenerators\Certify.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
3132

3233
</ItemGroup>

src/Certify.Providers/DNS/AcmeDns/AcmeDns/Plugin.DNS.AcmeDns.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
</PropertyGroup>
88
<ItemGroup>
99
<ProjectReference Include="..\..\..\..\Certify.Models\Certify.Models.csproj" />
10+
<ProjectReference Include="..\..\..\..\Certify.Shared\Certify.Shared.Core.csproj" />
1011
</ItemGroup>
1112
</Project>

src/Certify.Shared/Certify.Shared.Core.csproj

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.0;net9.0;</TargetFrameworks>
55
<Platforms>AnyCPU</Platforms>
6+
<LangVersion>latest</LangVersion>
67
</PropertyGroup>
78
<ItemGroup>
89
<PackageReference Include="BouncyCastle.Cryptography" Version="2.5.1" />
@@ -31,12 +32,12 @@
3132
</ItemGroup>
3233

3334
<ItemGroup>
34-
<None Update="Assets\public_suffix_list.dat">
35-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
36-
</None>
37-
<None Update="Assets\rdap_dns.json.dat">
38-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
39-
</None>
35+
<None Update="Assets\public_suffix_list.dat">
36+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
37+
</None>
38+
<None Update="Assets\rdap_dns.json.dat">
39+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
40+
</None>
4041
</ItemGroup>
4142

4243
</Project>

src/Certify.Models/Util/EnvironmentUtil.cs renamed to src/Certify.Shared/Utils/EnvironmentUtil.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private static void CreateAndApplyRestrictedACL(string path)
8585
/// </summary>
8686
/// <param name="subDirectory">optional subfolder to include</param>
8787
/// <returns>full app data with with optional subdirectory</returns>
88-
public static string CreateAppDataPath(string? subDirectory = null, bool skipCreation = false)
88+
public static string CreateAppDataPath(string subDirectory = null, bool skipCreation = false)
8989
{
9090
var parts = new List<string>()
9191
{
@@ -138,7 +138,7 @@ public static string GetFriendlyOSName(bool detailed = true)
138138
{
139139
using var fileStream = new FileStream(filePath, FileMode.Open);
140140
using var reader = new StreamReader(fileStream);
141-
string? line;
141+
string line;
142142

143143
while ((line = reader.ReadLine()) != null)
144144
{

0 commit comments

Comments
 (0)