Skip to content

Commit

Permalink
Feature : Add Net 8.0, update code to c#12, Fix decimal StdDev (#756)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPulman committed Nov 16, 2023
1 parent 53d5f6d commit 85cd7a7
Show file tree
Hide file tree
Showing 256 changed files with 7,262 additions and 4,316 deletions.
36 changes: 9 additions & 27 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

Expand All @@ -16,53 +14,37 @@ jobs:
outputs:
nbgv: ${{ steps.nbgv.outputs.SemVer2 }}
steps:
- name: Get Current Visual Studio Information
shell: bash
run: |
dotnet tool update -g dotnet-vs
echo "## About RELEASE ##"
vs where release
- name: Update Visual Studio Latest Release
shell: bash
run: |
echo "## Update RELEASE ##"
vs update release Enterprise
vs modify release Enterprise +mobile +desktop +uwp +web
echo "## About RELEASE Updated ##"
vs where release
echo "##vso[task.prependpath]$(vs where release --prop=InstallationPath)\MSBuild\Current\Bin"

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true

- name: Install .NET 6 & .NET 7
- name: Setup .NET 6/7
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: NBGV
id: nbgv
uses: dotnet/nbgv@master
with:
setAllVars: true

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.3.1
with:
vs-prerelease: true

- name: NuGet Restore
run: msbuild /t:restore /v:minimal /m
run: dotnet restore DynamicData.sln
working-directory: src

- name: Build
run: msbuild /t:build,pack /maxcpucount /p:NoPackageAnalysis=true /verbosity:minimal /p:Configuration=${{ env.configuration }}
run: dotnet build --no-restore --configuration Release DynamicData.sln
working-directory: src

- name: Pack
run: dotnet pack --no-restore --configuration Release DynamicData.sln
working-directory: src

- name: Run Unit Tests and Generate Coverage
Expand Down
31 changes: 4 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,57 +16,34 @@ jobs:
outputs:
nbgv: ${{ steps.nbgv.outputs.SemVer2 }}
steps:
- name: Get Current Visual Studio Information
shell: bash
run: |
dotnet tool update -g dotnet-vs
echo "## About RELEASE ##"
vs where release
- name: Update Visual Studio Latest Release
shell: bash
run: |
echo "## Update RELEASE ##"
vs update release Enterprise
vs modify release Enterprise +mobile +desktop +uwp +web
echo "## About RELEASE Updated ##"
vs where release
echo "##vso[task.prependpath]$(vs where release --prop=InstallationPath)\MSBuild\Current\Bin"

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install .NET 6 & .NET 7
- name: Setup .NET 6/7
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: NBGV
id: nbgv
uses: dotnet/nbgv@master
with:
setAllVars: true

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.3.1
with:
vs-prerelease: true

- name: NuGet Restore
run: msbuild /t:restore /v:minimal /m
run: dotnet restore DynamicData.sln
working-directory: src

- name: Build
run: msbuild /t:build,pack /maxcpucount /p:NoPackageAnalysis=true /verbosity:minimal /p:Configuration=${{ env.configuration }}
run: dotnet pack --no-restore --configuration Release DynamicData.sln
working-directory: src

- uses: nuget/setup-nuget@v1
name: Setup NuGet

- name: Changelog
uses: glennawatson/ChangeLog@v1
id: changelog
Expand Down
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Project>
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591;1701;1702;1705;VSX1000</NoWarn>
<NoWarn>$(NoWarn);1591;1701;1702;1705;VSX1000;SA1010</NoWarn>
<Platform>AnyCPU</Platform>
<IsTestProject>$(MSBuildProjectName.Contains('Tests'))</IsTestProject>
<IsBenchmarkProject>$(MSBuildProjectName.Contains('Benchmarks'))</IsBenchmarkProject>
Expand Down Expand Up @@ -65,7 +65,7 @@
</ItemGroup>
<ItemGroup Condition="!$(IsTestProject) AND !$(IsBenchmarkProject)">
<PackageReference Include="stylecop.analyzers" Version="1.2.0-beta.507" PrivateAssets="all" />
<PackageReference Include="Roslynator.Analyzers" Version="4.6.1" PrivateAssets="All" />
<PackageReference Include="Roslynator.Analyzers" Version="4.6.2" PrivateAssets="All" />
</ItemGroup>
<ItemGroup Condition="!$(IsTestProject) AND !$(IsBenchmarkProject)">
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" />
Expand Down
4 changes: 4 additions & 0 deletions src/Directory.build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,8 @@
<PropertyGroup Condition="$(TargetFramework.StartsWith('net7'))">
<DefineConstants>$(DefineConstants);NETSTANDARD;PORTABLE;P_LINQ;SUPPORTS_BINDINGLIST</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="$(TargetFramework.StartsWith('net8'))">
<DefineConstants>$(DefineConstants);NETSTANDARD;PORTABLE;P_LINQ;SUPPORTS_BINDINGLIST</DefineConstants>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ namespace DynamicData.Aggregation
}
public static class StdDevEx
{
public static System.IObservable<double> StdDev<T>(this System.IObservable<DynamicData.Aggregation.IAggregateChangeSet<T>> source, System.Func<T, decimal> valueSelector, [System.Runtime.CompilerServices.DecimalConstant(0, 0, 0u, 0u, 0u)] decimal fallbackValue) { }
public static System.IObservable<decimal> StdDev<T>(this System.IObservable<DynamicData.Aggregation.IAggregateChangeSet<T>> source, System.Func<T, decimal> valueSelector, [System.Runtime.CompilerServices.DecimalConstant(0, 0, 0u, 0u, 0u)] decimal fallbackValue) { }
public static System.IObservable<double> StdDev<T>(this System.IObservable<DynamicData.Aggregation.IAggregateChangeSet<T>> source, System.Func<T, double> valueSelector, double fallbackValue = 0) { }
public static System.IObservable<double> StdDev<T>(this System.IObservable<DynamicData.Aggregation.IAggregateChangeSet<T>> source, System.Func<T, int> valueSelector, int fallbackValue = 0) { }
public static System.IObservable<double> StdDev<T>(this System.IObservable<DynamicData.Aggregation.IAggregateChangeSet<T>> source, System.Func<T, long> valueSelector, long fallbackValue = 0) { }
public static System.IObservable<double> StdDev<T>(this System.IObservable<DynamicData.Aggregation.IAggregateChangeSet<T>> source, System.Func<T, float> valueSelector, float fallbackValue = 0) { }
public static System.IObservable<double> StdDev<T>(this System.IObservable<DynamicData.IChangeSet<T>> source, System.Func<T, decimal> valueSelector, decimal fallbackValue)
public static System.IObservable<decimal> StdDev<T>(this System.IObservable<DynamicData.IChangeSet<T>> source, System.Func<T, decimal> valueSelector, decimal fallbackValue)
where T : notnull { }
public static System.IObservable<double> StdDev<T>(this System.IObservable<DynamicData.IChangeSet<T>> source, System.Func<T, double> valueSelector, double fallbackValue)
where T : notnull { }
Expand All @@ -149,7 +149,7 @@ namespace DynamicData.Aggregation
where T : notnull { }
public static System.IObservable<double> StdDev<T>(this System.IObservable<DynamicData.IChangeSet<T>> source, System.Func<T, float> valueSelector, float fallbackValue = 0)
where T : notnull { }
public static System.IObservable<double> StdDev<TObject, TKey>(this System.IObservable<DynamicData.IChangeSet<TObject, TKey>> source, System.Func<TObject, decimal> valueSelector, decimal fallbackValue)
public static System.IObservable<decimal> StdDev<TObject, TKey>(this System.IObservable<DynamicData.IChangeSet<TObject, TKey>> source, System.Func<TObject, decimal> valueSelector, decimal fallbackValue)
where TObject : notnull
where TKey : notnull { }
public static System.IObservable<double> StdDev<TObject, TKey>(this System.IObservable<DynamicData.IChangeSet<TObject, TKey>> source, System.Func<TObject, double> valueSelector, double fallbackValue)
Expand Down Expand Up @@ -504,7 +504,6 @@ namespace DynamicData.Cache.Internal
{
public KeySelectorException() { }
public KeySelectorException(string message) { }
protected KeySelectorException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public KeySelectorException(string message, System.Exception innerException) { }
}
[System.Diagnostics.DebuggerDisplay("LockFreeObservableCache<{typeof(TObject).Name}, {typeof(TKey).Name}> ({Count} Ite" +
Expand Down Expand Up @@ -1034,7 +1033,6 @@ namespace DynamicData
{
public MissingKeyException() { }
public MissingKeyException(string message) { }
protected MissingKeyException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public MissingKeyException(string message, System.Exception innerException) { }
}
public class Node<TObject, TKey> : System.IDisposable, System.IEquatable<DynamicData.Node<TObject, TKey>>
Expand Down Expand Up @@ -2244,7 +2242,6 @@ namespace DynamicData
{
public SortException() { }
public SortException(string message) { }
protected SortException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public SortException(string message, System.Exception innerException) { }
}
[System.Flags]
Expand Down Expand Up @@ -2348,7 +2345,6 @@ namespace DynamicData
{
public UnspecifiedIndexException() { }
public UnspecifiedIndexException(string message) { }
protected UnspecifiedIndexException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public UnspecifiedIndexException(string message, System.Exception innerException) { }
}
public class VirtualRequest : DynamicData.IVirtualRequest, System.IEquatable<DynamicData.IVirtualRequest>
Expand Down
Loading

0 comments on commit 85cd7a7

Please sign in to comment.