mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Meta - Upgrade to .NET 6
This commit is contained in:
parent
33c54eaeb0
commit
d5d3530ca5
@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<PreserveCompilationContext>false</PreserveCompilationContext>
|
||||
<ShouldIncludeNativeSkiaSharp>false</ShouldIncludeNativeSkiaSharp>
|
||||
<AssemblyTitle>Artemis.Core</AssemblyTitle>
|
||||
|
||||
@ -30,69 +30,6 @@ namespace Artemis.Core
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static class IEnumerableExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns all distinct elements of the given source, where "distinctness"
|
||||
/// is determined via a projection and the default equality comparer for the projected type.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This operator uses deferred execution and streams the results, although
|
||||
/// a set of already-seen keys is retained. If a key is seen multiple times,
|
||||
/// only the first element with that key is returned.
|
||||
/// </remarks>
|
||||
/// <typeparam name="TSource">Type of the source sequence</typeparam>
|
||||
/// <typeparam name="TKey">Type of the projected element</typeparam>
|
||||
/// <param name="source">Source sequence</param>
|
||||
/// <param name="keySelector">Projection for determining "distinctness"</param>
|
||||
/// <returns>
|
||||
/// A sequence consisting of distinct elements from the source sequence,
|
||||
/// comparing them by the specified key projection.
|
||||
/// </returns>
|
||||
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source,
|
||||
Func<TSource, TKey> keySelector)
|
||||
{
|
||||
return source.DistinctBy(keySelector, null!);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all distinct elements of the given source, where "distinctness"
|
||||
/// is determined via a projection and the specified comparer for the projected type.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This operator uses deferred execution and streams the results, although
|
||||
/// a set of already-seen keys is retained. If a key is seen multiple times,
|
||||
/// only the first element with that key is returned.
|
||||
/// </remarks>
|
||||
/// <typeparam name="TSource">Type of the source sequence</typeparam>
|
||||
/// <typeparam name="TKey">Type of the projected element</typeparam>
|
||||
/// <param name="source">Source sequence</param>
|
||||
/// <param name="keySelector">Projection for determining "distinctness"</param>
|
||||
/// <param name="comparer">
|
||||
/// The equality comparer to use to determine whether or not keys are equal.
|
||||
/// If null, the default equality comparer for <c>TSource</c> is used.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// A sequence consisting of distinct elements from the source sequence,
|
||||
/// comparing them by the specified key projection.
|
||||
/// </returns>
|
||||
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source,
|
||||
Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)
|
||||
{
|
||||
if (source == null) throw new ArgumentNullException(nameof(source));
|
||||
if (keySelector == null) throw new ArgumentNullException(nameof(keySelector));
|
||||
|
||||
return _();
|
||||
|
||||
IEnumerable<TSource> _()
|
||||
{
|
||||
HashSet<TKey> knownKeys = new(comparer);
|
||||
foreach (TSource element in source)
|
||||
{
|
||||
if (knownKeys.Add(keySelector(element)))
|
||||
yield return element;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the index of the provided element inside the read only collection
|
||||
/// </summary>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
".NETCoreApp,Version=v5.0": {
|
||||
"net6.0": {
|
||||
"EmbedIO": {
|
||||
"type": "Direct",
|
||||
"requested": "[3.4.3, )",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<PreserveCompilationContext>false</PreserveCompilationContext>
|
||||
<Platforms>x64</Platforms>
|
||||
</PropertyGroup>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
".NETCoreApp,Version=v5.0": {
|
||||
"net6.0": {
|
||||
"LiteDB": {
|
||||
"type": "Direct",
|
||||
"requested": "[5.0.11, )",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0-windows</TargetFramework>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<PreserveCompilationContext>false</PreserveCompilationContext>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<ShouldIncludeNativeSkiaSharp>false</ShouldIncludeNativeSkiaSharp>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
"net5.0-windows7.0": {
|
||||
"net6.0-windows7.0": {
|
||||
"Humanizer.Core": {
|
||||
"type": "Direct",
|
||||
"requested": "[2.11.10, )",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net5.0-windows10.0.17763.0</TargetFramework>
|
||||
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<AssemblyTitle>Artemis</AssemblyTitle>
|
||||
@ -10,7 +10,7 @@
|
||||
<Description>Provides advanced unified lighting across many different brands RGB peripherals</Description>
|
||||
<Copyright>Copyright © Robert Beekman - 2021</Copyright>
|
||||
<FileVersion>2.0.0.0</FileVersion>
|
||||
<OutputPath>bin\net5.0-windows\</OutputPath>
|
||||
<OutputPath>bin\net6.0-windows\</OutputPath>
|
||||
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
|
||||
<UseWPF>true</UseWPF>
|
||||
<Platforms>x64</Platforms>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
"net5.0-windows10.0.17763": {
|
||||
"net6.0-windows10.0.17763": {
|
||||
"FluentValidation": {
|
||||
"type": "Direct",
|
||||
"requested": "[10.3.0, )",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0-windows</TargetFramework>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<PreserveCompilationContext>false</PreserveCompilationContext>
|
||||
<ShouldIncludeNativeSkiaSharp>false</ShouldIncludeNativeSkiaSharp>
|
||||
<AssemblyTitle>Artemis.VisualScripting</AssemblyTitle>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
"net5.0-windows7.0": {
|
||||
"net6.0-windows7.0": {
|
||||
"JetBrains.Annotations": {
|
||||
"type": "Direct",
|
||||
"requested": "[2021.1.0, )",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
".NETCoreApp,Version=v5.0": {
|
||||
"net6.0": {
|
||||
"Avalonia": {
|
||||
"type": "Direct",
|
||||
"requested": "[0.10.11, )",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
".NETCoreApp,Version=v5.0": {
|
||||
"net6.0": {
|
||||
"Avalonia": {
|
||||
"type": "Direct",
|
||||
"requested": "[0.10.11, )",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ApplicationIcon />
|
||||
<StartupObject />
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
".NETCoreApp,Version=v5.0": {
|
||||
"net6.0": {
|
||||
"Avalonia": {
|
||||
"type": "Direct",
|
||||
"requested": "[0.10.11, )",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net5.0-windows</TargetFramework>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
"net5.0-windows7.0": {
|
||||
"net6.0-windows7.0": {
|
||||
"Avalonia": {
|
||||
"type": "Direct",
|
||||
"requested": "[0.10.11, )",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
".NETCoreApp,Version=v5.0": {
|
||||
"net6.0": {
|
||||
"Avalonia": {
|
||||
"type": "Direct",
|
||||
"requested": "[0.10.11, )",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user