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
+13 -3
View File
@@ -64,7 +64,9 @@ public struct TBarSeriesEnumerator : IEnumerator<TBar>, IEquatable<TBarSeriesEnu
public bool MoveNext()
{
if (_index + 1 >= _count)
{
return false;
}
_index++;
_current = new TBar(_t[_index], _o[_index], _h[_index], _l[_index], _c[_index], _v[_index]);
@@ -323,9 +325,14 @@ public class TBarSeries : IReadOnlyList<TBar>
{
int len = t.Length;
if (o.Length != len || h.Length != len || l.Length != len || c.Length != len || v.Length != len)
{
throw new ArgumentException("All spans must have the same length", nameof(t));
}
if (len == 0) return;
if (len == 0)
{
return;
}
int oldCount = _c.Count;
int newCount = oldCount + len;
@@ -366,7 +373,10 @@ public class TBarSeries : IReadOnlyList<TBar>
public void AddRange(ReadOnlySpan<TBar> bars)
{
int len = bars.Length;
if (len == 0) return;
if (len == 0)
{
return;
}
int oldCount = _c.Count;
int newCount = oldCount + len;
@@ -417,4 +427,4 @@ public class TBarSeries : IReadOnlyList<TBar>
IEnumerator<TBar> IEnumerable<TBar>.GetEnumerator() => GetEnumerator();
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
}
}