/// <summary>
        /// Read event queues from memory.
        /// </summary>
        /// <param name="actionContext">Context for memory.</param>
        /// <returns>Event queues.</returns>
        public static EntityEvents Read(ActionContext actionContext)
        {
            if (!actionContext.State.TryGetValue <EntityEvents>(Events, out var queues))
            {
                queues = new EntityEvents();
            }

            return(queues);
        }
        /// <summary>
        /// Read event queues from memory.
        /// </summary>
        /// <param name="context">Context for memory.</param>
        /// <returns>Event queues.</returns>
        public static EntityEvents Read(SequenceContext context)
        {
            var dcState = context.GetState();

            if (!dcState.TryGetValue <EntityEvents>(Events, out var queues))
            {
                queues = new EntityEvents();
            }

            return(queues);
        }