Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CSharpExt.UnitTests/PercentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ public void LessThanCompare()
c.ShouldBeTrue();
c = p2 < p1;
c.ShouldBeFalse();

#pragma warning disable CS1718 // Intentional self-comparison to test operators
c = p1 < p1;
#pragma warning restore CS1718
c.ShouldBeFalse();
}

Expand All @@ -160,7 +163,9 @@ public void LessThanOrEqualCompare()
c.ShouldBeTrue();
c = p2 <= p1;
c.ShouldBeFalse();
#pragma warning disable CS1718 // Intentional self-comparison to test operators
c = p1 <= p1;
#pragma warning restore CS1718
c.ShouldBeTrue();
}

Expand All @@ -173,7 +178,9 @@ public void GreaterThanOrEqualCompare()
c.ShouldBeFalse();
c = p2 >= p1;
c.ShouldBeTrue();
#pragma warning disable CS1718 // Intentional self-comparison to test operators
c = p1 >= p1;
#pragma warning restore CS1718
c.ShouldBeTrue();
}

Expand All @@ -186,7 +193,9 @@ public void GreaterThanCompare()
c.ShouldBeFalse();
c = p2 > p1;
c.ShouldBeTrue();
#pragma warning disable CS1718 // Intentional self-comparison to test operators
c = p1 > p1;
#pragma warning restore CS1718
c.ShouldBeFalse();
}
}
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard2.0')) ">
<PackageVersion Update="System.Buffers" Version="4.5.1" />
<PackageVersion Update="System.Memory" Version="4.5.5" />
<PackageVersion Include="System.Threading.Tasks" Version="4.3.0" />

<PackageVersion Update="Microsoft.Bcl.HashCode" Version="1.1.1" />
</ItemGroup>
</Project>
4 changes: 0 additions & 4 deletions Noggog.CSharpExt/Noggog.CSharpExt.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
<PackageReference Include="System.Linq.Async" />
</ItemGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard2.0')) ">
<PackageReference Include="System.Threading.Tasks" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.Bcl.HashCode" />
<PackageReference Include="System.Buffers" />
Expand Down
2 changes: 1 addition & 1 deletion Noggog.CSharpExt/WorkEngine/WorkConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public void Start()
.Select(x => x ?? 0)
.Select(x => x == 0 ? Environment.ProcessorCount : x)
.DistinctUntilChanged()
.Subscribe(AddNewThreadsIfNeeded)
.SubscribeAsyncConcat(AddNewThreadsIfNeeded)
.DisposeWithComposite(_disposable);
}

Expand Down
6 changes: 3 additions & 3 deletions Noggog.Testing/Extensions/ShouldlyExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ internal static bool RoughlyEqual<TLhs>(TLhs actual, object? expected)
TLhs? convertedExpected = (TLhs?)ConvertWithImplicitOperator(expected, actual.GetType());
if (object.Equals(actual, convertedExpected)) return true;
}
catch (Exception e)
catch (Exception)
{
}

Expand All @@ -53,7 +53,7 @@ internal static bool RoughlyEqual<TLhs>(TLhs actual, object? expected)
TLhs? convertedExpected = (TLhs?)Convert.ChangeType(expected, actual.GetType());
if (object.Equals(actual, convertedExpected)) return true;
}
catch (Exception e)
catch (Exception)
{
}

Expand All @@ -64,7 +64,7 @@ internal static bool RoughlyEqual<TLhs>(TLhs actual, object? expected)
var convertedExpected = convertibleExpected.ToType(actual.GetType(), null);
if (object.Equals(actual, convertedExpected)) return true;
}
catch (Exception e)
catch (Exception)
{
}
}
Expand Down
2 changes: 2 additions & 0 deletions Noggog.Testing/FileSystem/MockFileSystemWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ public IWaitForChangedResult WaitForChanged(WatcherChangeTypes changeType, TimeS
public event FileSystemEventHandler? Changed;
public event FileSystemEventHandler? Created;
public event FileSystemEventHandler? Deleted;
#pragma warning disable CS0067 // Required by IFileSystemWatcher interface
public event ErrorEventHandler? Error;
#pragma warning restore CS0067
public event RenamedEventHandler? Renamed;

public MockFileSystemWatcher(IFileSystem fileSystem)
Expand Down
2 changes: 1 addition & 1 deletion Noggog.WPF/Extensions/DependencyObjectExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static bool TryGetAncestor<TObj>(this DependencyObject obj, [MaybeNullWhe
{
item = VisualTreeHelper.GetParent(item);
}
catch (InvalidOperationException e)
catch (InvalidOperationException)
{
break;
}
Expand Down
Loading