Clone() публичный Метод

public Clone ( ) : object
Результат object
Пример #1
0
        public override IPipeline Init(IWorkerContext context)
        {
            HtmlPipelineContext clone = (HtmlPipelineContext)hpc.Clone();

            context.Put(GetContextKey(), clone);
            return(GetNext());
        }
Пример #2
0
        /*
         * (non-Javadoc)
         *
         * @see
         * com.itextpdf.tool.xml.pipeline.AbstractPipeline#close(com.itextpdf.tool
         * .xml.Tag, com.itextpdf.tool.xml.pipeline.ProcessObject)
         */
        public override IPipeline Close(IWorkerContext context, Tag t, ProcessObject po)
        {
            String tagName = t.Name;

            if (tag.Equals(tagName))
            {
                MapContext cc;
                try {
                    cc = (MapContext)context.Get(typeof(PdfWriterPipeline).FullName);
                    Document d = (Document)cc[PdfWriterPipeline.DOCUMENT];
                    d.Close();
                } catch (NoCustomContextException e) {
                    throw new PipelineException("AutoDocPipeline depends on PdfWriterPipeline.", e);
                }
                try {
                    HtmlPipelineContext hpc   = (HtmlPipelineContext)context.Get(typeof(HtmlPipeline).FullName);
                    HtmlPipelineContext clone = (HtmlPipelineContext)hpc.Clone();
                    clone.SetPageSize(pagesize);
                    ((WorkerContextImpl)context).Put(typeof(HtmlPipeline).FullName, clone);
                } catch (NoCustomContextException) {
                }
            }
            return(GetNext());
        }
 virtual public void SetUp() {
     ctx = new HtmlPipelineContext(null);
     ctx.SetImageProvider(new CustomAbstractImageProvider());
     clone = (HtmlPipelineContext) ctx.Clone();
 }