Use file-scoped namespaces (#842)

This commit is contained in:
PhyxionNL
2022-10-09 13:22:57 +02:00
committed by GitHub
parent 3ac329f247
commit 58cef111a1
175 changed files with 34026 additions and 34204 deletions
@@ -6,35 +6,34 @@
using System;
using System.Linq;
namespace LibreHardwareMonitor.Hardware
namespace LibreHardwareMonitor.Hardware;
internal class CompositeSensor : Sensor
{
internal class CompositeSensor : Sensor
private readonly ISensor[] _components;
private readonly Func<float, ISensor, float> _reducer;
private readonly float _seedValue;
public CompositeSensor
(
string name,
int index,
SensorType sensorType,
Hardware hardware,
ISettings settings,
ISensor[] components,
Func<float, ISensor, float> reducer,
float seedValue = .0f)
: base(name, index, sensorType, hardware, settings)
{
private readonly ISensor[] _components;
private readonly Func<float, ISensor, float> _reducer;
private readonly float _seedValue;
public CompositeSensor
(
string name,
int index,
SensorType sensorType,
Hardware hardware,
ISettings settings,
ISensor[] components,
Func<float, ISensor, float> reducer,
float seedValue = .0f)
: base(name, index, sensorType, hardware, settings)
{
_components = components;
_reducer = reducer;
_seedValue = seedValue;
}
public override float? Value
{
get { return _components.Aggregate(_seedValue, _reducer); }
set => throw new NotImplementedException();
}
_components = components;
_reducer = reducer;
_seedValue = seedValue;
}
}
public override float? Value
{
get { return _components.Aggregate(_seedValue, _reducer); }
set => throw new NotImplementedException();
}
}