internal static async Task<EventMessage> GetStoredMessage(ServiceBusReceivedMessage receivedMessage, MessageStorage storage, Type typeToDeserialize, IMessageDeserializer messagedeserializer)
#endif
        {
            var bytes = storage.DownloadMessage(receivedMessage.MessageId);
            var jsonMessageString = await bytes.Unzip() as string;
            var message = JsonConvert.DeserializeObject<EventMessage>(jsonMessageString);
            GetObjectFromMessage(message, typeToDeserialize, messagedeserializer);
            return message;
        }
 /// <summary>
 /// Get message from the storage
 /// </summary>
 /// <param name="functionInputData">Function inputbinding data</param>
 /// <param name="storage">Object to handle stored data</param>
 /// <returns>Event message</returns>
 internal static async Task<EventMessage> GetStoredMessage(FunctionInputData functionInputData, MessageStorage storage, Type typeToDeserialize, IMessageDeserializer messagedeserializer)
 {
     var bytes = storage.DownloadMessage(functionInputData.MessageId);
     var jsonMessageString = await bytes.Unzip() as string;
     var message = JsonConvert.DeserializeObject<EventMessage>(jsonMessageString);
     GetObjectFromMessage(message, typeToDeserialize, messagedeserializer);
     return message;
 }
        /// <summary>
        /// Get message from the storage
        /// </summary>
        /// <param name="receivedMessage"></param>
        /// <param name="storage">Object to handle stored data</param>
        /// <returns>Event message</returns>
#if NET5_0 || NETCOREAPP3_1
        internal static async Task<EventMessage> GetStoredMessage(Message receivedMessage, MessageStorage storage, Type typeToDeserialize, IMessageDeserializer messagedeserializer)