C# 클래스 Fonet.FonetDriver

FonetDriver provides the client with a single interface to invoking FO.NET.
The examples belows demonstrate several ways of invoking FO.NET. The methodology is the same regardless of how FO.NET is embedded in your system (ASP.NET, WinForm, Web Service, etc).
상속: IDisposable
파일 보기 프로젝트 열기: Mimeo/Fo.Net 1 사용 예제들

공개 메소드들

메소드 설명
Dispose ( ) : void
FonetDriver ( ) : System

Sets the the 'baseDir' property in the Configuration class using the value returned by Directory.GetCurrentDirectory(). Sets the default timeout to 100 seconds.

Make ( ) : FonetDriver

Constructs a new FonetDriver and registers the newly created driver as the active driver.

Render ( Stream inputStream, Stream outputStream ) : void

Executes the conversion reading the source tree from the input stream, converting it to a format dictated by the render and writing it to the supplied output stream.

Render ( TextReader inputReader, Stream outputStream ) : void

Executes the conversion reading the source tree from the input reader, converting it to a format dictated by the renderer and writing it to the supplied output stream.

Render ( XmlDocument doc, Stream outputStream ) : void

Executes the conversion reading the source tree from the supplied XmlDocument, converting it to a format dictated by the renderer and writing it to the supplied output stream.

Any exceptions that occur during the render process are arranged into three categories: information, warning and error. You may intercept any or all of theses exceptional states by registering an event listener. See FonetDriver.OnError for an example of registering an event listener. If there are no registered listeners, the exceptions are dumped to standard out - except for the error event which is wrapped in a SystemException.

Render ( XmlReader inputReader, Stream outputStream ) : void

Executes the conversion reading the source tree from the input reader, converting it to a format dictated by the render and writing it to the supplied output stream.

The evaluation copy of this class will output an evaluation banner to standard out

Render ( string inputFile, Stream outputStream ) : void

Executes the conversion reading the source tree from the file inputFile, converting it to a format dictated by the renderer and writing it to the supplied output stream.

Render ( string inputFile, string outputFile ) : void

Executes the conversion reading the source tree from the file inputFile, converting it to a format dictated by the renderer and writing it to the file identified by outputFile.

If the file outputFile does not exist, it will created otherwise it will be overwritten. Creating a file may generate a variety of exceptions. See FileStream for a complete list.

비공개 메소드들

메소드 설명
CreateXmlTextReader ( Stream inputStream ) : XmlReader

Utility method that creates an System.Xml.XmlTextReader for the supplied file

The returned System.Xml.XmlReader interprets all whitespace

CreateXmlTextReader ( TextReader inputReader ) : XmlReader

Utility method that creates an System.Xml.XmlTextReader for the supplied file

The returned System.Xml.XmlReader interprets all whitespace

CreateXmlTextReader ( string inputFile ) : XmlReader

Utility method that creates an System.Xml.XmlTextReader for the supplied file

The returned System.Xml.XmlReader interprets all whitespace

FireFonetError ( string message ) : void

Sends an 'error' event to all registered listeners.

If there are no listeners, a SystemException is thrown immediately halting execution

FireFonetInfo ( string message ) : void

Sends an 'info' event to all registered lisetners

If there are no listeners, message is written out to the console instead

FireFonetWarning ( string message ) : void

Sends a 'warning' event to all registered listeners

If there are no listeners, message is written out to the console instead

메소드 상세

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

FonetDriver() 공개 메소드

Sets the the 'baseDir' property in the Configuration class using the value returned by Directory.GetCurrentDirectory(). Sets the default timeout to 100 seconds.
public FonetDriver ( ) : System
리턴 System

Make() 공개 정적인 메소드

Constructs a new FonetDriver and registers the newly created driver as the active driver.
public static Make ( ) : FonetDriver
리턴 FonetDriver

Render() 공개 메소드

Executes the conversion reading the source tree from the input stream, converting it to a format dictated by the render and writing it to the supplied output stream.
public Render ( Stream inputStream, Stream outputStream ) : void
inputStream Stream Any subclass of the Stream class, e.g. FileStream
outputStream Stream Any subclass of the Stream class, e.g. FileStream
리턴 void

Render() 공개 메소드

Executes the conversion reading the source tree from the input reader, converting it to a format dictated by the renderer and writing it to the supplied output stream.
public Render ( TextReader inputReader, Stream outputStream ) : void
inputReader System.IO.TextReader A character orientated stream
outputStream Stream Any subclass of the Stream class
리턴 void

Render() 공개 메소드

Executes the conversion reading the source tree from the supplied XmlDocument, converting it to a format dictated by the renderer and writing it to the supplied output stream.
Any exceptions that occur during the render process are arranged into three categories: information, warning and error. You may intercept any or all of theses exceptional states by registering an event listener. See FonetDriver.OnError for an example of registering an event listener. If there are no registered listeners, the exceptions are dumped to standard out - except for the error event which is wrapped in a SystemException.
public Render ( XmlDocument doc, Stream outputStream ) : void
doc System.Xml.XmlDocument /// An in-memory representation of an XML document (DOM). ///
outputStream Stream /// Any subclass of the Stream class. ///
리턴 void

Render() 공개 메소드

Executes the conversion reading the source tree from the input reader, converting it to a format dictated by the render and writing it to the supplied output stream.
The evaluation copy of this class will output an evaluation banner to standard out
public Render ( XmlReader inputReader, Stream outputStream ) : void
inputReader XmlReader /// Reader that provides fast, non-cached, forward-only access /// to XML data ///
outputStream Stream /// Any subclass of the Stream class, e.g. FileStream ///
리턴 void

Render() 공개 메소드

Executes the conversion reading the source tree from the file inputFile, converting it to a format dictated by the renderer and writing it to the supplied output stream.
public Render ( string inputFile, Stream outputStream ) : void
inputFile string Path to an XSL-FO file
outputStream Stream /// Any subclass of the Stream class, e.g. FileStream ///
리턴 void

Render() 공개 메소드

Executes the conversion reading the source tree from the file inputFile, converting it to a format dictated by the renderer and writing it to the file identified by outputFile.
If the file outputFile does not exist, it will created otherwise it will be overwritten. Creating a file may generate a variety of exceptions. See FileStream for a complete list.
public Render ( string inputFile, string outputFile ) : void
inputFile string Path to an XSL-FO file
outputFile string Path to a file
리턴 void