コード例 #1
0
 protected override string Render(IZptDocument document, IRenderingSettings options)
 {
     return document.Render(_model, options);
 }
コード例 #2
0
ファイル: BatchRenderer.cs プロジェクト: csf-dev/ZPT-Sharp
        /// <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);
 }