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
@@ -56,7 +56,9 @@ public sealed class AroonOsc : ITValuePublisher
public AroonOsc(int period)
{
if (period <= 0)
{
throw new ArgumentException("Period must be greater than 0", nameof(period));
}
_period = period;
Name = $"AroonOsc({period})";
@@ -148,7 +150,10 @@ public sealed class AroonOsc : 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];
@@ -189,7 +194,10 @@ public sealed class AroonOsc : 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];
@@ -205,4 +213,4 @@ public sealed class AroonOsc : ITValuePublisher
return new TSeries(tList, [.. v]);
}
}
}