Skip to content

Commit 16daece

Browse files
committed
Allow 0 instances to launch
1 parent 9a22bcb commit 16daece

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/DiffEngine/Guard.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
static class Guard
22
{
3-
public static void AgainstNegativeAndZero(int value, string argumentName)
3+
public static void AgainstNegative(int value, string argumentName)
44
{
5-
if (value <= 0)
5+
if (value < 0)
66
{
77
throw new ArgumentOutOfRangeException(argumentName);
88
}

src/DiffEngine/MaxInstance.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ static int GetMaxInstances() =>
3333

3434
public static void SetForAppDomain(int value)
3535
{
36-
Guard.AgainstNegativeAndZero(value, nameof(value));
36+
Guard.AgainstNegative(value, nameof(value));
3737
appDomainMaxInstancesToLaunch = value;
3838
ResetCapturedValue();
3939
}
4040

4141
public static void SetForUser(int value)
4242
{
43-
Guard.AgainstNegativeAndZero(value, nameof(value));
43+
Guard.AgainstNegative(value, nameof(value));
4444
EnvironmentHelper.Set("DiffEngine_MaxInstances", value.ToString());
4545
ResetCapturedValue();
4646
}

src/DiffEngineTray/Settings/OptionsForm.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project>
33
<PropertyGroup>
44
<NoWarn>CS1591;CS0649;NU1608;NU1109</NoWarn>
5-
<Version>16.7.1</Version>
5+
<Version>16.7.2</Version>
66
<AssemblyVersion>1.0.0</AssemblyVersion>
77
<PackageTags>Testing, Snapshot, Diff, Compare</PackageTags>
88
<Description>Launches diff tools based on file extensions. Designed to be consumed by snapshot testing libraries.</Description>

0 commit comments

Comments
 (0)