/// <summary>
        /// Enqueues the events for delivery. The event is stored in an <see cref="Amazon.MobileAnalytics.MobileAnalyticsManager.Internal.IEventStore"/>.
        /// </summary>
        /// <param name="eventObject">Event object. <see cref="Amazon.MobileAnalytics.Model.Event"/></param>
        public void EnqueueEventsForDelivery(Amazon.MobileAnalytics.Model.Event eventObject)
        {
            ThreadPool.QueueUserWorkItem(new WaitCallback(delegate
            {
                string eventString = eventObject.MarshallToJson();
                bool eventStored   = false;

                try
                {
                    eventStored = _eventStore.PutEvent(eventString, _appId);
                }
                catch (Exception e)
                {
                    _logger.Error(e, "Event {0} is unable to be stored.", eventObject.EventType);
                }

                if (eventStored)
                {
                    _logger.DebugFormat("Event {0} is queued for delivery", eventObject.EventType);
                }
                else
                {
                    EventStoreException e = new EventStoreException("Event cannot be stored.");
                    _logger.Error(e, "Event {0} is unable to be queued for delivery.", eventObject.EventType);
                }
            }));
        }
        /// <summary>
        /// Enqueues the events for delivery. The event is stored in an <see cref="Amazon.MobileAnalytics.MobileAnalyticsManager.Internal.IEventStore"/>.
        /// </summary>
        /// <param name="eventObject">Event object. <see cref="Amazon.MobileAnalytics.Model.Event"/></param>
        public void EnqueueEventsForDelivery(Amazon.MobileAnalytics.Model.Event eventObject)
        {
            ThreadPool.QueueUserWorkItem(new WaitCallback(delegate
            {
                string eventString = JsonMapper.ToJson(eventObject);
                bool eventStored = false;

                try
                {
                    eventStored = _eventStore.PutEvent(eventString, _appId);
                }
                catch (Exception e)
                {
                    _logger.Error(e, "Event {0} is unable to be stored.", eventObject.EventType);
                }

                if (eventStored)
                {
                    _logger.DebugFormat("Event {0} is queued for delivery", eventObject.EventType);
                }
                else
                {
                    EventStoreException e = new EventStoreException("Event cannot be stored.");
                    _logger.Error(e, "Event {0} is unable to be queued for delivery.", eventObject.EventType);
                }

            }));
        }