/// <summary> /// Reads and returns a domain object from the specified DDL string. /// </summary> public static DocumentObject ObjectFromString(string ddl, DdlReaderErrors errors) { using (var stringReader = new StringReader(ddl)) { using (var reader = new DdlReader(stringReader)) return(reader.ReadObject()); } }
/// <summary> /// Initializes a new instance of the DdlReader class with the specified TextReader and ErrorManager2. /// </summary> public DdlReader(TextReader reader, DdlReaderErrors errors) { this.errorManager = errors; this.reader = reader; }
/// <summary> /// Initializes a new instance of the DdlReader class with the specified filename and ErrorManager2. /// </summary> public DdlReader(string filename, DdlReaderErrors errors) { this.fileName = filename; this.errorManager = errors; this.reader = new StreamReader(File.OpenRead(filename), Encoding.UTF8, false, 1028, false); }
/// <summary> /// Initializes a new instance of the DdlReader class with the specified Stream and ErrorManager2. /// </summary> public DdlReader(Stream stream, DdlReaderErrors errors) { this.errorManager = errors; this.reader = new StreamReader(stream); }
/// <summary> /// Reads and returns a domain object from the specified file. /// </summary> public static DocumentObject ObjectFromFile(string documentFileName, DdlReaderErrors errors) { using (var reader = new DdlReader(documentFileName, errors)) return(reader.ReadObject()); }
/// <summary> /// Initializes a new instance of the DdlScanner class. /// </summary> internal DdlScanner(string ddl, DdlReaderErrors errors) : this("", ddl, errors) { }
/// <summary> /// Initializes a new instance of the DdlScanner class. /// </summary> internal DdlScanner(string documentFileName, string ddl, DdlReaderErrors errors) { this.errors = errors; Init(ddl, documentFileName); }