Exemple #1
0
 /// <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());
     }
 }
Exemple #2
0
 /// <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;
 }
Exemple #3
0
 /// <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);
 }
Exemple #4
0
 /// <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);
 }
Exemple #5
0
 /// <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);
 }