From 4b1cee2779858e2c9985d5632b12c63e095831d8 Mon Sep 17 00:00:00 2001 From: Dave Skender <8432125+DaveSkender@users.noreply.github.com> Date: Sun, 15 Dec 2024 23:34:08 -0500 Subject: [PATCH] code cleanup --- src/_common/Observables/StreamHub.Observer.cs | 3 ++- src/_common/Quotes/Quote.StreamHub.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/_common/Observables/StreamHub.Observer.cs b/src/_common/Observables/StreamHub.Observer.cs index 3f2f10688..ccd107218 100644 --- a/src/_common/Observables/StreamHub.Observer.cs +++ b/src/_common/Observables/StreamHub.Observer.cs @@ -41,7 +41,8 @@ public void OnRebuild(DateTime fromTimestamp) /// public void OnPrune(DateTime toTimestamp) { - while (Cache.Count > 0 && Cache[0].Timestamp <= toTimestamp){ + while (Cache.Count > 0 && Cache[0].Timestamp <= toTimestamp) + { Cache.RemoveAt(0); } diff --git a/src/_common/Quotes/Quote.StreamHub.cs b/src/_common/Quotes/Quote.StreamHub.cs index 396357dc9..046e5477f 100644 --- a/src/_common/Quotes/Quote.StreamHub.cs +++ b/src/_common/Quotes/Quote.StreamHub.cs @@ -29,7 +29,8 @@ public class QuoteHub /// /// Maximum in-memory cache size. public QuoteHub(int? maxCacheSize = null) - : base(new BaseProvider()) { + : base(new BaseProvider()) + { const int maxCacheSizeDefault = (int)(0.9 * int.MaxValue);