style: format code with dotnet-format

This commit fixes the style issues introduced in 1e77eb8 according to the output
from dotnet-format.

Details: None
This commit is contained in:
deepsource-autofix[bot]
2024-10-06 06:59:26 +00:00
committed by GitHub
parent 1e77eb80a4
commit 5fe968754f
116 changed files with 1773 additions and 2748 deletions
+12 -12
View File
@@ -11,19 +11,19 @@ public interface iTValue
public readonly record struct TValue(DateTime Time, double Value, bool IsNew = true, bool IsHot = true) : iTValue
{
public DateTime Time { get; init; } = Time;
public double Value { get; init; } = Value;
public bool IsNew { get; init; } = IsNew;
public bool IsHot { get; init; } = IsHot;
public DateTime t => Time;
public double v => Value;
public double Value { get; init; } = Value;
public bool IsNew { get; init; } = IsNew;
public bool IsHot { get; init; } = IsHot;
public DateTime t => Time;
public double v => Value;
public TValue() : this(DateTime.UtcNow, 0) { }
public TValue(double value, bool isNew = true, bool isHot = true) : this(DateTime.UtcNow, value, IsNew: isNew, IsHot: isHot) { }
public static implicit operator double(TValue tv) => tv.Value;
public static implicit operator DateTime(TValue tv) => tv.Time;
public static implicit operator TValue(double value) => new TValue(DateTime.UtcNow, value);
public TValue() : this(DateTime.UtcNow, 0) { }
public TValue(double value, bool isNew = true, bool isHot = true) : this(DateTime.UtcNow, value, IsNew: isNew, IsHot: isHot) { }
public static implicit operator double(TValue tv) => tv.Value;
public static implicit operator DateTime(TValue tv) => tv.Time;
public static implicit operator TValue(double value) => new TValue(DateTime.UtcNow, value);
public override string ToString() => $"[{Time:yyyy-MM-dd HH:mm:ss}, {Value:F2}, IsNew: {IsNew}, IsHot: {IsHot}]";
public override string ToString() => $"[{Time:yyyy-MM-dd HH:mm:ss}, {Value:F2}, IsNew: {IsNew}, IsHot: {IsHot}]";
}
public delegate void ValueSignal(object source, in ValueEventArgs args);
@@ -66,7 +66,7 @@ public class TSeries : List<TValue>
public new virtual void Add(TValue tick)
{
if (tick.IsNew || base.Count==0) { base.Add(tick); }
if (tick.IsNew || base.Count == 0) { base.Add(tick); }
else { this[^1] = tick; }
Pub?.Invoke(this, new ValueEventArgs(tick));
}