Skip to content

Commit

Permalink
frozen
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp authored Jan 8, 2024
1 parent 7c39756 commit 2348536
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/DiffEngine/DiffEngine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<PackageReference Include="Caseless.Fody" Version="1.9.1" PrivateAssets="All" />
<PackageReference Include="EmptyFiles" Version="8.1.0" PrivateAssets="None" />
<PackageReference Include="Fody" Version="6.8.0" PrivateAssets="all" />
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" Condition="'$(TargetFramework)' != 'net8.0'" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" Condition="$(Configuration) == 'Release'" />
<PackageReference Include="Polyfill" Version="2.0.1" PrivateAssets="all" />
<PackageReference Include="ProjectDefaults" Version="1.0.108" PrivateAssets="all" />
Expand Down
8 changes: 5 additions & 3 deletions src/DiffEngine/ResolvedTool.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace DiffEngine;
using System.Collections.Frozen;

namespace DiffEngine;

public record ResolvedTool
{
Expand Down Expand Up @@ -45,7 +47,7 @@ public ResolvedTool(
LaunchArguments = launchArguments;
IsMdi = isMdi;
AutoRefresh = autoRefresh;
BinaryExtensions = binaryExtensions;
BinaryExtensions = binaryExtensions.ToFrozenSet();
if (binaryExtensions.Any(_ => !_.StartsWith('.')))
{
throw new(
Expand All @@ -65,7 +67,7 @@ Extensions must begin with a period.
public LaunchArguments LaunchArguments { get; init; }
public bool IsMdi { get; init; }
public bool AutoRefresh { get; init; }
public IReadOnlyCollection<string> BinaryExtensions { get; init; }
public FrozenSet<string> BinaryExtensions { get; init; }
public bool RequiresTarget { get; init; }
public bool SupportsText { get; init; }

Expand Down

0 comments on commit 2348536

Please sign in to comment.