private static async Task <Command_Summary_Projection_Return> ProcessCommandStatusInformationProjection(
            string commandId,
            string commandName,
            ILogger log)
        {
            Command_Summary_Projection_Return ret = null;
            Guid commandGuid;

            // use custom assembly resolve handler
            using (new AzureFunctionsResolveAssembly())
            {
                if (Guid.TryParse(commandId, out commandGuid))
                {
                    #region Logging
                    if (null != log)
                    {
                        log.LogDebug($"Validating command {commandId} in HandleCreateLeagueCommand");
                    }
                    #endregion

                    // Get the current state of the command...
                    Projection getCommandState = new Projection(@"Command",
                                                                commandName,
                                                                commandGuid.ToString(),
                                                                nameof(Command_Summary_Projection));

                    if (null != getCommandState)
                    {
                        #region Logging
                        if (null != log)
                        {
                            log.LogDebug($"Projection processor created in HandleCreateLeagueCommand");
                        }
                        #endregion

                        Command_Summary_Projection cmdProjection =
                            new Command_Summary_Projection(log);

                        await getCommandState.Process(cmdProjection);

                        if ((cmdProjection.CurrentSequenceNumber > 0) || (cmdProjection.ProjectionValuesChanged()))
                        {
                            ret = new Command_Summary_Projection_Return()
                            {
                                AsOfDate              = cmdProjection.CurrentAsOfDate,
                                AsOfStepNumber        = (int)cmdProjection.CurrentSequenceNumber,
                                Status                = cmdProjection.CurrentState.ToString(),
                                CommandName           = commandName,
                                CorrelationIdentifier = cmdProjection.CorrelationIdentifier
                            };
                        }
                    }
                }
            }

            return(ret);
        }
        public static async Task <HttpResponseMessage> GetCommandStatusInformationProjectionRun(
            [HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequestMessage req,
            ILogger log)
        {
            #region Logging
            if (null != log)
            {
                log.LogDebug("Function triggered HTTP in GetCommandStatusInformationProjection");
            }
            #endregion

            // get the command id and command name
            string commandId;
            string commandName;

            commandId   = req.GetQueryNameValuePairsExt()[@"CommandId"];
            commandName = req.GetQueryNameValuePairsExt()[@"CommandName"];

            if (string.IsNullOrWhiteSpace(commandId))
            {
                // Get request body
                dynamic data = await req.Content.ReadAsAsync <object>();

                commandId   = data?.CommandId;
                commandName = data?.CommandName;
            }

            // Run the projection....ProcessCommandStatusInformationProjection
            Command_Summary_Projection_Return ret = await ProcessCommandStatusInformationProjection(commandId,
                                                                                                    commandName,
                                                                                                    log);


            if ((string.IsNullOrWhiteSpace(commandId)) || (string.IsNullOrEmpty(commandName)))
            {
                return(req.CreateResponse(HttpStatusCode.BadRequest,
                                          "Please pass a command Id and command name on the query string or in the request body"));
            }
            else
            {
                return(req.CreateResponse(HttpStatusCode.OK, ret,
                                          new System.Net.Http.Formatting.JsonMediaTypeFormatter()));
            }
        }