Ejemplo n.º 1
0
        /// <summary>
        /// Reads and returns a Document from the specified DDL string.
        /// </summary>
        public static Document DocumentFromString(string ddl)
        {
            StringReader stringReader = null;
              Document document = null;
              DdlReader reader = null;
              try
              {
            stringReader = new StringReader(ddl);

            reader = new DdlReader(stringReader);
            document = reader.ReadDocument();
              }
              finally
              {
            if (stringReader != null)
              stringReader.Close();
            if (reader != null)
              reader.Close();
              }
              return document;
        }
Ejemplo n.º 2
0
 //, ErrorManager2 _errorManager)
 /// <summary>
 /// Reads and returns a Document from the specified file.
 /// </summary>
 public static Document DocumentFromFile(string documentFileName)
 {
     Document document = null;
       DdlReader reader = null;
       try
       {
     reader = new DdlReader(documentFileName); //, _errorManager);
     document = reader.ReadDocument();
       }
       finally
       {
     if (reader != null)
       reader.Close();
       }
       return document;
 }