public void PrintJob(PrintJob job) { if (!Initialized) { Initialize(); } StartDocument(); Stream renderedDocument = RenderDocument(job); WriteDocumentToDevice(renderedDocument); EndDocument(); }
////protected abstract void PrintJob(PrintJob job); ////2.不再在继承体系中了,通过代理实现 public void PrintJob(PrintJob job) { device.PrintJob(job); }
//protected override void PrintJob(PrintJob job) //{ // if (!Initialized) Initialize(); // StartDocument(); // Stream renderedDocument = RenderDocument(job); // WriteDocumentToDevice(renderedDocument); // EndDocument(); //} protected override Stream RenderDocument(PrintJob job) { //device specific code throw new NotImplementedException(); }
protected override Stream RenderDocument(PrintJob job) { throw new NotImplementedException(); }
protected abstract Stream RenderDocument(PrintJob job);