public async void StockUpdater(IStockSubscriber sub)
        {
            DateTime CurrentDateTimePlusFive = DateTime.Now.AddMinutes(5);

            while (CurrentDateTimePlusFive > DateTime.Now)
            {
                foreach (var Registrar in RegisteredRegistrars)
                {
                    Registrar.NotifySubscriber();
                }

                sub.StockAlertUpdate();
                System.Threading.Thread.Sleep(5000);
            }
        }
        public void RemoveSubscriber(IStockSubscriber sub)
        {
            if (GoogleStockSubscribers.Count == 0)
            {
                throw new Exception("There are no Subscribers");
            }

            Type remove = sub.GetType();
            int  indexOfStockToRemove = 0;

            foreach (var Sub in GoogleStockSubscribers)
            {
                if (Sub.GetType() == remove)
                {
                    indexOfStockToRemove = GoogleStockSubscribers.IndexOf(Sub);
                }
            }

            GoogleStockSubscribers.RemoveAt(indexOfStockToRemove);
        }
 public void RegisterSubscriber(IStockSubscriber sub)
 {
     GoogleStockSubscribers.Add(sub);
 }