コード例 #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());
     }
 }
コード例 #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;
 }
コード例 #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);
 }
コード例 #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);
 }
コード例 #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());
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the DdlScanner class.
 /// </summary>
 internal DdlScanner(string ddl, DdlReaderErrors errors)
     : this("", ddl, errors)
 {
 }
コード例 #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);
 }