Skip to content

Commit

Permalink
Fix build, update copywrite dates, update packages. (#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPulman authored Sep 21, 2023
1 parent 79dd105 commit de25ce5
Show file tree
Hide file tree
Showing 339 changed files with 473 additions and 478 deletions.
10 changes: 5 additions & 5 deletions NonProduction/DynamicData.Profile/DynamicData.Profile.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.console" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageReference Include="FluentAssertions" Version="6.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit" Version="2.5.1" />
<PackageReference Include="xunit.runner.console" Version="2.5.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.Reactive.Testing" Version="6.0.0" />
</ItemGroup>

Expand Down
6 changes: 3 additions & 3 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<None Include="$(MSBuildThisFileDirectory)..\README.md" Pack="true" PackagePath="\"/>
</ItemGroup>
<ItemGroup Condition="'$(IsTestProject)' != 'true'">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

<PropertyGroup>
Expand All @@ -61,11 +61,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.132" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" PrivateAssets="all" />
</ItemGroup>
<ItemGroup Condition="!$(IsTestProject) AND !$(IsBenchmarkProject)">
<PackageReference Include="stylecop.analyzers" Version="1.2.0-beta.507" PrivateAssets="all" />
<PackageReference Include="Roslynator.Analyzers" Version="4.3.0" PrivateAssets="All" />
<PackageReference Include="Roslynator.Analyzers" Version="4.5.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup Condition="!$(IsTestProject) AND !$(IsBenchmarkProject)">
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" />
Expand Down
8 changes: 4 additions & 4 deletions src/DynamicData.Tests/AggregationTests/AggregationFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public AggregationFixture()
[Fact]
public void CanAccumulate()
{
int latest = 0;
int counter = 0;
var latest = 0;
var counter = 0;

var accumulator = _accumulator.Subscribe(
value =>
Expand All @@ -71,8 +71,8 @@ public void CanAccumulate()
[Fact]
public void CanHandleUpdatedItem()
{
int latest = 0;
int counter = 0;
var latest = 0;
var counter = 0;

var accumulator = _accumulator.Subscribe(
value =>
Expand Down
6 changes: 3 additions & 3 deletions src/DynamicData.Tests/AggregationTests/SumFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public SumFixture()
[Fact]
public void AddedItemsContributeToSum()
{
int sum = 0;
var sum = 0;

var accumulator = _source.Connect().Sum(p => p.Age).Subscribe(x => sum = x);

Expand All @@ -42,7 +42,7 @@ public void Dispose()
[Fact]
public void InlineChangeReEvaluatesTotals()
{
int sum = 0;
var sum = 0;

var somepropChanged = _source.Connect().WhenValueChanged(p => p.Age);

Expand All @@ -64,7 +64,7 @@ public void InlineChangeReEvaluatesTotals()
[Fact]
public void RemoveProduceCorrectResult()
{
int sum = 0;
var sum = 0;

var accumulator = _source.Connect().Sum(p => p.Age).Subscribe(x => sum = x);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void LargeUpdateInvokesAReset()
//update once as initial load is always a reset
_source.AddOrUpdate(new Person("Me", 21));

bool invoked = false;
var invoked = false;
_collection.ListChanged += (sender, e) =>
{
invoked = true;
Expand Down Expand Up @@ -126,8 +126,8 @@ public void SmallChangeDoesNotInvokeReset()
//update once as initial load is always a reset
_source.AddOrUpdate(new Person("Me", 21));

bool invoked = false;
bool resetInvoked = false;
var invoked = false;
var resetInvoked = false;
_collection.ListChanged += (sender, e) =>
{
invoked = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void LargeUpdateInvokesAReset()
//update once as initial load is always a reset
_source.AddOrUpdate(new Person("Me", 21));

bool invoked = false;
var invoked = false;
_collection.CollectionChanged += (sender, e) =>
{
invoked = true;
Expand All @@ -108,8 +108,8 @@ public void SmallChangeDoesNotInvokeReset()
//update once as initial load is always a reset
_source.AddOrUpdate(new Person("Me", 21));

bool invoked = false;
bool resetInvoked = false;
var invoked = false;
var resetInvoked = false;
_collection.CollectionChanged += (sender, e) =>
{
invoked = true;
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData.Tests/Cache/AutoRefreshFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void MakeSelectMagicWorkWithObservable()
sourceList.Add(initialItem);

var descriptionStream = sourceList.Connect().AutoRefresh(intHolder => intHolder!.Description).Transform(intHolder => intHolder!.Description, true).Do(x => { }) // <--- Add break point here to check the overload fixes it
.Bind(out ReadOnlyObservableCollection<string> resultCollection);
.Bind(out var resultCollection);

using (descriptionStream.Subscribe())
{
Expand Down
4 changes: 2 additions & 2 deletions src/DynamicData.Tests/Cache/DeferUntilLoadedFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class DeferAnsdSkipFixture
[Fact]
public void DeferUntilLoadedDoesNothingUntilDataHasBeenReceived()
{
bool updateReceived = false;
var updateReceived = false;
IChangeSet<Person, string>? result = null;

var cache = new SourceCache<Person, string>(p => p.Name);
Expand Down Expand Up @@ -45,7 +45,7 @@ public void DeferUntilLoadedDoesNothingUntilDataHasBeenReceived()
[Fact]
public void SkipInitialDoesNotReturnTheFirstBatchOfData()
{
bool updateReceived = false;
var updateReceived = false;

var cache = new SourceCache<Person, string>(p => p.Name);

Expand Down
4 changes: 2 additions & 2 deletions src/DynamicData.Tests/Cache/ExpireAfterFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void CanHandleABatchOfUpdates()
{
var remover = _source.ExpireAfter(p => TimeSpan.FromMilliseconds(100), _scheduler).Subscribe();
const int size = 100;
Person[] items = Enumerable.Range(1, size).Select(i => new Person($"Name.{i}", i)).ToArray();
var items = Enumerable.Range(1, size).Select(i => new Person($"Name.{i}", i)).ToArray();

_source.AddOrUpdate(items);
_scheduler.AdvanceBy(TimeSpan.FromMilliseconds(200).Ticks);
Expand Down Expand Up @@ -62,7 +62,7 @@ public void ComplexRemove()
}

const int size = 100;
Person[] items = Enumerable.Range(1, size).Select(i => new Person($"Name.{i}", i)).ToArray();
var items = Enumerable.Range(1, size).Select(i => new Person($"Name.{i}", i)).ToArray();
_source.AddOrUpdate(items);

var remover = _source.ExpireAfter(RemoveFunc, _scheduler).Subscribe();
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData.Tests/Cache/FilterControllerFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void BatchSuccessiveUpdates()
var people = Enumerable.Range(1, 100).Select(l => new Person("Name" + l, l)).ToArray();
foreach (var person in people)
{
Person person1 = person;
var person1 = person;
_source.AddOrUpdate(person1);
}

Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData.Tests/Cache/FilterFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void BatchSuccessiveUpdates()
var people = Enumerable.Range(1, 100).Select(l => new Person("Name" + l, l)).ToArray();
foreach (var person in people)
{
Person person1 = person;
var person1 = person;
_source.AddOrUpdate(person1);
}

Expand Down
2 changes: 1 addition & 1 deletion src/DynamicData.Tests/Cache/FilterParallelFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void BatchSuccessiveUpdates()
var people = Enumerable.Range(1, 100).Select(l => new Person("Name" + l, l)).ToArray();
foreach (var person in people)
{
Person person1 = person;
var person1 = person;
_source.AddOrUpdate(person1);
}

Expand Down
10 changes: 5 additions & 5 deletions src/DynamicData.Tests/Cache/FullJoinManyFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void AddChild()
var people = Enumerable.Range(1, 10).Select(
i =>
{
string parent = "Person" + CalculateParent(i, 10);
var parent = "Person" + CalculateParent(i, 10);
return new Person("Person" + i, i, parentName: parent);
}).ToArray();

Expand Down Expand Up @@ -57,7 +57,7 @@ public void AddPeopleWithParents()
var people = Enumerable.Range(1, 10).Select(
i =>
{
string parent = "Person" + CalculateParent(i, 10);
var parent = "Person" + CalculateParent(i, 10);
return new Person("Person" + i, i, parentName: parent);
}).ToArray();

Expand All @@ -77,7 +77,7 @@ public void RemoveChild()
var people = Enumerable.Range(1, 10).Select(
i =>
{
string parent = "Person" + CalculateParent(i, 10);
var parent = "Person" + CalculateParent(i, 10);
return new Person("Person" + i, i, parentName: parent);
}).ToArray();

Expand All @@ -97,7 +97,7 @@ public void UpdateChild()
var people = Enumerable.Range(1, 10).Select(
i =>
{
string parent = "Person" + CalculateParent(i, 10);
var parent = "Person" + CalculateParent(i, 10);
return new Person("Person" + i, i, parentName: parent);
}).ToArray();

Expand All @@ -118,7 +118,7 @@ public void UpdateParent()
var people = Enumerable.Range(1, 10).Select(
i =>
{
string parent = "Person" + CalculateParent(i, 10);
var parent = "Person" + CalculateParent(i, 10);
return new Person("Person" + i, i, parentName: parent);
}).ToArray();

Expand Down
34 changes: 17 additions & 17 deletions src/DynamicData.Tests/Cache/GroupFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public Mytype(int key, string grouping)
[Fact]
public void Add()
{
bool called = false;
IDisposable subscriber = _source.Connect().Group(p => p.Age).Subscribe(
var called = false;
var subscriber = _source.Connect().Group(p => p.Age).Subscribe(
updates =>
{
updates.Count.Should().Be(1, "Should be 1 add");
Expand Down Expand Up @@ -106,8 +106,8 @@ public void Dispose()
[Fact]
public void FiresCompletedWhenDisposed()
{
bool completed = false;
IDisposable subscriber = _source.Connect().Group(p => p.Age).Subscribe(updates => { }, () => { completed = true; });
var completed = false;
var subscriber = _source.Connect().Group(p => p.Age).Subscribe(updates => { }, () => { completed = true; });
_source.Dispose();
subscriber.Dispose();
completed.Should().BeTrue();
Expand All @@ -116,8 +116,8 @@ public void FiresCompletedWhenDisposed()
[Fact]
public void FiresManyValueForBatchOfDifferentAdds()
{
bool called = false;
IDisposable subscriber = _source.Connect().Group(p => p.Age).Subscribe(
var called = false;
var subscriber = _source.Connect().Group(p => p.Age).Subscribe(
updates =>
{
updates.Count.Should().Be(4, "Should be 4 adds");
Expand All @@ -144,8 +144,8 @@ public void FiresManyValueForBatchOfDifferentAdds()
[Fact]
public void FiresOnlyOnceForABatchOfUniqueValues()
{
bool called = false;
IDisposable subscriber = _source.Connect().Group(p => p.Age).Subscribe(
var called = false;
var subscriber = _source.Connect().Group(p => p.Age).Subscribe(
updates =>
{
updates.Count.Should().Be(1, "Should be 1 add");
Expand All @@ -168,9 +168,9 @@ public void FiresOnlyOnceForABatchOfUniqueValues()
[Fact]
public void FiresRemoveWhenEmptied()
{
bool called = false;
var called = false;
//skip first one a this is setting up the stream
IDisposable subscriber = _source.Connect().Group(p => p.Age).Skip(1).Subscribe(
var subscriber = _source.Connect().Group(p => p.Age).Skip(1).Subscribe(
updates =>
{
updates.Count.Should().Be(1, "Should be 1 update");
Expand All @@ -195,7 +195,7 @@ public void FiresRemoveWhenEmptied()
[Fact]
public void ReceivesUpdateWhenFeederIsInvoked()
{
bool called = false;
var called = false;
var subscriber = _source.Connect().Group(p => p.Age).Subscribe(updates => { called = true; });
_source.AddOrUpdate(new Person("Person1", 20));
subscriber.Dispose();
Expand All @@ -205,8 +205,8 @@ public void ReceivesUpdateWhenFeederIsInvoked()
[Fact]
public void Remove()
{
bool called = false;
IDisposable subscriber = _source.Connect().Group(p => p.Age).Skip(1).Subscribe(
var called = false;
var subscriber = _source.Connect().Group(p => p.Age).Skip(1).Subscribe(
updates =>
{
updates.Count.Should().Be(1, "Should be 1 add");
Expand All @@ -222,8 +222,8 @@ public void Remove()
[Fact]
public void UpdateAnItemWillChangedThegroup()
{
bool called = false;
IDisposable subscriber = _source.Connect().Group(p => p.Age).Subscribe(updates => { called = true; });
var called = false;
var subscriber = _source.Connect().Group(p => p.Age).Subscribe(updates => { called = true; });
_source.AddOrUpdate(new Person("Person1", 20));
_source.AddOrUpdate(new Person("Person1", 21));
subscriber.Dispose();
Expand Down Expand Up @@ -255,8 +255,8 @@ public void UpdateItemAfterAddItemProcessAdd()
[Fact]
public void UpdateNotPossible()
{
bool called = false;
IDisposable subscriber = _source.Connect().Group(p => p.Age).Skip(1).Subscribe(updates => { called = true; });
var called = false;
var subscriber = _source.Connect().Group(p => p.Age).Skip(1).Subscribe(updates => { called = true; });
_source.AddOrUpdate(new Person("Person1", 20));
_source.AddOrUpdate(new Person("Person1", 20));
subscriber.Dispose();
Expand Down
10 changes: 5 additions & 5 deletions src/DynamicData.Tests/Cache/InnerJoinManyFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void AddChild()
var people = Enumerable.Range(1, 10).Select(
i =>
{
string parent = "Person" + CalculateParent(i, 10);
var parent = "Person" + CalculateParent(i, 10);
return new Person("Person" + i, i, parentName: parent);
}).ToArray();

Expand Down Expand Up @@ -59,7 +59,7 @@ public void AddPeopleWithParents()
var people = Enumerable.Range(1, 10).Select(
i =>
{
string parent = "Person" + CalculateParent(i, 10);
var parent = "Person" + CalculateParent(i, 10);
return new Person("Person" + i, i, parentName: parent);
}).ToArray();

Expand All @@ -80,7 +80,7 @@ public void RemoveChild()
var people = Enumerable.Range(1, 10).Select(
i =>
{
string parent = "Person" + CalculateParent(i, 10);
var parent = "Person" + CalculateParent(i, 10);
return new Person("Person" + i, i, parentName: parent);
}).ToArray();

Expand All @@ -100,7 +100,7 @@ public void UpdateChild()
var people = Enumerable.Range(1, 10).Select(
i =>
{
string parent = "Person" + CalculateParent(i, 10);
var parent = "Person" + CalculateParent(i, 10);
return new Person("Person" + i, i, parentName: parent);
}).ToArray();

Expand All @@ -121,7 +121,7 @@ public void UpdateParent()
var people = Enumerable.Range(1, 10).Select(
i =>
{
string parent = "Person" + CalculateParent(i, 10);
var parent = "Person" + CalculateParent(i, 10);
return new Person("Person" + i, i, parentName: parent);
}).ToArray();

Expand Down
Loading

0 comments on commit de25ce5

Please sign in to comment.