예제 #1
0
 protected override string Render(IZptDocument document, IRenderingSettings options)
 {
     return document.Render(_model, options);
 }
예제 #2
0
        /// <summary>
        /// Renders a single ZPT document and returns a response.
        /// </summary>
        /// <param name="doc">The document to render.</param>
        /// <param name="outputStream">The output stream.</param>
        /// <param name="options">Rendering options.</param>
        /// <param name="contextConfigurator">Context configurator.</param>
        /// <param name="outputInfo">Output info.</param>
        protected virtual IBatchRenderingDocumentResponse Render(IZptDocument doc,
                                                             Stream outputStream,
                                                             IRenderingSettings options,
                                                             Action<IModelValueContainer> contextConfigurator,
                                                             string outputInfo)
        {
            using(var writer = new StreamWriter(outputStream, options.OutputEncoding))
              {
            doc.Render(writer,
                   options: options,
                   contextConfigurator: contextConfigurator);
              }

              return new BatchRenderingDocumentResponse(doc.GetSourceInfo(), outputInfo);
        }
예제 #3
0
 protected virtual string Render(IZptDocument document, IRenderingSettings options)
 {
     return document.Render(options);
 }