Core port - Targeting .NET Core 3.1!

Core port - Updated projects to new project layout
Core port - Changed the way devices are identified to be consistent across different frameworks
Core port - Updated plugin system to no longer use AppDomain but AssemblyLoadContext (through McMaster.NETCore.Plugins)
Core port - Renamed a few events to keep Fody from getting confused
This commit is contained in:
SpoinkyNL committed 2020-02-22 18:38:32 +01:00
1 parent 29a75b7ad8
commit a79c56eaa1
61 files changed
+537 -2031

No files matched your search

@@ -4,17 +4,13 @@ namespace Artemis.Core.Extensions
{
public static class RgbDeviceExtensions
{
public static int GetDeviceHashCode(this IRGBDevice rgbDevice)
public static string GetDeviceIdentifier(this IRGBDevice rgbDevice)
{
unchecked
{
var hashCode = rgbDevice.DeviceInfo.DeviceName?.GetHashCode() ?? 0;
hashCode = (hashCode * 397) ^ (rgbDevice.DeviceInfo.Manufacturer?.GetHashCode() ?? 0);
hashCode = (hashCode * 397) ^ (rgbDevice.DeviceInfo.Model?.GetHashCode() ?? 0);
hashCode = (hashCode * 397) ^ (int) rgbDevice.DeviceInfo.DeviceType;
hashCode = (hashCode * 397) ^ (int) rgbDevice.DeviceInfo.Lighting;
return hashCode;
}
return rgbDevice.DeviceInfo.DeviceName +
"-" + rgbDevice.DeviceInfo.Manufacturer +
"-" + rgbDevice.DeviceInfo.Model +
"-" + rgbDevice.DeviceInfo.DeviceType +
"-" + rgbDevice.DeviceInfo.Lighting;
}
}
}