/// <summary>Renders the operation.</summary>
        ///
        /// <param name="writer">         The writer.</param>
        /// <param name="httpReq">        The HTTP request.</param>
        /// <param name="operationName">  Name of the operation.</param>
        /// <param name="requestMessage"> Message describing the request.</param>
        /// <param name="responseMessage">Message describing the response.</param>
        /// <param name="metadataHtml">   The metadata HTML.</param>
        protected virtual void RenderOperation(HtmlTextWriter writer, IHttpRequest httpReq, string operationName,
            string requestMessage, string responseMessage, string metadataHtml)
        {
            var operationControl = new OperationControl
            {
                HttpRequest = httpReq,
                MetadataConfig = EndpointHost.Config.ServiceEndpointsMetadataConfig,
                Title = EndpointHost.Config.ServiceName,
                Format = this.Format,
                OperationName = operationName,
                HostName = httpReq.GetUrlHostName(),
                RequestMessage = requestMessage,
                ResponseMessage = responseMessage,
                MetadataHtml = metadataHtml,
            };
            if (!this.ContentType.IsNullOrEmpty())
            {
                operationControl.ContentType = this.ContentType;
            }
            if (!this.ContentFormat.IsNullOrEmpty())
            {
                operationControl.ContentFormat = this.ContentFormat;
            }

            operationControl.Render(writer);
        }