Exemplo n.º 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());
     }
 }
Exemplo n.º 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;
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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());
 }
Exemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the DdlScanner class.
 /// </summary>
 internal DdlScanner(string ddl, DdlReaderErrors errors)
     : this("", ddl, errors)
 {
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the DdlScanner class.
 /// </summary>
 internal DdlScanner(string documentFileName, string ddl, DdlReaderErrors errors)
 {
     this.errors = errors;
     Init(ddl, documentFileName);
 }