public void SetLastDownloadedTime(DateTime dateTime)
        {
            LastDownloadDateTime = dateTime;

            using (StreamWriter writer = new StreamWriter(LastDownloadDateTimeFileURL))
            {
                string json = JsonSerializer.ConvertObjectToJsonString <DateTime>(LastDownloadDateTime);
                writer.WriteLine(json);
            }
        }
        public override void GenerateAndPublishMessage(IModel channel, IndicatorCalculationElements indicatorElements)
        {
            //serializujemy oraz przekształcamy w tablicę bajtów
            var body = EncryptionHelper.StringToUtf8(JsonSerializer.ConvertObjectToJsonString <IndicatorCalculationElements>(indicatorElements));

            channel.BasicPublish(exchange: _exchange,
                                 routingKey: _queueSendTo,
                                 basicProperties: null,
                                 body: body);
            //oczekujemy na potwierdzenie, że przesyłka dotarła do exchange
            channel.WaitForConfirmsOrDie();
            Console.WriteLine($"RabbitMQ Producer sent quotes to Consumers.");
        }