style patterns

This commit is contained in:
Miha Kralj
2026-01-25 16:01:45 -08:00
parent 2836f253c4
commit e59665c8f0
399 changed files with 6892 additions and 1323 deletions
+11 -3
View File
@@ -67,7 +67,9 @@ public sealed class Aroon : ITValuePublisher
public Aroon(int period)
{
if (period <= 0)
{
throw new ArgumentException("Period must be greater than 0", nameof(period));
}
_period = period;
Name = $"Aroon({period})";
@@ -163,7 +165,10 @@ public sealed class Aroon : ITValuePublisher
public TSeries Update(TBarSeries source)
{
if (source.Count == 0) return new TSeries([], []);
if (source.Count == 0)
{
return new TSeries([], []);
}
int len = source.Count;
var v = new double[len];
@@ -288,7 +293,10 @@ public sealed class Aroon : ITValuePublisher
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static TSeries Batch(TBarSeries source, int period)
{
if (source.Count == 0) return new TSeries([], []);
if (source.Count == 0)
{
return new TSeries([], []);
}
int len = source.Count;
var v = new double[len];
@@ -304,4 +312,4 @@ public sealed class Aroon : ITValuePublisher
return new TSeries(tList, [.. v]);
}
}
}