/// <summary>
 /// Initializes a new instance of the <see cref="RequestContext"/> class.
 /// </summary>
 /// <param name="baseCommunicationContainer">The base communication container.</param>
 public RequestContext(BaseRequestContainer baseCommunicationContainer)
 {
     this.RequestCorelationId = Guid.NewGuid();
     this.InParam = baseCommunicationContainer;
 }
        /// <summary>
        /// Runs the command.
        /// </summary>
        /// <param name="command">The command.</param>
        /// <param name="contents">The contents.</param>
        /// <returns>The result of the command</returns>
        private BaseReturnContainer RunCommand(BaseCommand command, BaseRequestContainer contents)
        {
            RequestContext context = new RequestContext(contents);
            if (command.OnValidate(context))
            {
                BaseReturnContainer returnContainer = command.OnExecute(context);
                Debug.Assert(!string.IsNullOrEmpty(returnContainer.ReturnCode));
                return returnContainer;
            }

            // Todo: what happens when validate fails?
            return null;
        }