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
        /// <summary>
        /// Reads and returns a domain object from the specified DDL string.
        /// </summary>
        public static DocumentObject ObjectFromString(string ddl, DdlReaderErrors errors)
        {
            StringReader   stringReader = null;
            DocumentObject domObj       = null;
            DdlReader      reader       = null;

            try
            {
                stringReader = new StringReader(ddl);

                reader = new DdlReader(stringReader);
                domObj = reader.ReadObject();
            }
            finally
            {
                if (stringReader != null)
                {
                    stringReader.Close();
                }
                if (reader != null)
                {
                    reader.Close();
                }
            }
            return(domObj);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Reads and returns a domain object from the specified DDL string.
        /// </summary>
        public static DocumentObject ObjectFromString(string ddl, DdlReaderErrors errors)
        {
            StringReader   stringReader = null;
            DocumentObject domObj;
            DdlReader      reader = null;

            try
            {
                stringReader = new StringReader(ddl);

                reader = new DdlReader(stringReader);
                domObj = reader.ReadObject();
            }
            finally
            {
                if (stringReader != null)
                {
#if !NETFX_CORE && !NETCORE
                    stringReader.Close();
#else
                    stringReader.Dispose();
#endif
                }
                if (reader != null)
                {
                    reader.Close();
                }
            }
            return(domObj);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Reads and returns a Document from the specified DDL string.
        /// </summary>
        public static Document DocumentFromString(string ddl)
        {
            StringReader stringReader = null;
            Document     document;
            DdlReader    reader = null;

            try
            {
                stringReader = new StringReader(ddl);

                reader   = new DdlReader(stringReader);
                document = reader.ReadDocument();
            }
            finally
            {
                if (stringReader != null)
                {
#if !NETFX_CORE && !NETCORE
                    stringReader.Close();
#else
                    stringReader.Dispose();
#endif
                }

                if (reader != null)
                {
                    reader.Close();
                }
            }
            return(document);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Reads and returns a domain object from the specified file.
        /// </summary>
        public static DocumentObject ObjectFromFile(string documentFileName, DdlReaderErrors errors)
        {
            DdlReader      reader = null;
            DocumentObject domObj = null;

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

            try
            {
                reader   = new DdlReader(documentFileName); //, _errorManager);
                document = reader.ReadDocument();
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
            }
            return(document);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Reads and returns a domain object from the specified DDL string.
        /// </summary>
        public static DocumentObject ObjectFromString(string ddl, DdlReaderErrors errors)
        {
            StringReader stringReader = null;
            DocumentObject domObj;
            DdlReader reader = null;
            try
            {
                stringReader = new StringReader(ddl);

                reader = new DdlReader(stringReader);
                domObj = reader.ReadObject();
            }
            finally
            {
                if (stringReader != null)
                {
#if !NETFX_CORE
                    stringReader.Close();
#else
                    stringReader.Dispose();
#endif
                }
                if (reader != null)
                    reader.Close();
            }
            return domObj;
        }
Ejemplo n.º 8
0
 /// <summary>
 /// Reads and returns a domain object from the specified file.
 /// </summary>
 public static DocumentObject ObjectFromFile(string documentFileName, DdlReaderErrors errors)
 {
     DdlReader reader = null;
     DocumentObject domObj;
     try
     {
         reader = new DdlReader(documentFileName, errors);
         domObj = reader.ReadObject();
     }
     finally
     {
         if (reader != null)
             reader.Close();
     }
     return domObj;
 }
Ejemplo n.º 9
0
        /// <summary>
        /// Reads and returns a Document from the specified DDL string.
        /// </summary>
        public static Document DocumentFromString(string ddl)
        {
            StringReader stringReader = null;
            Document document;
            DdlReader reader = null;
            try
            {
                stringReader = new StringReader(ddl);

                reader = new DdlReader(stringReader);
                document = reader.ReadDocument();
            }
            finally
            {
                if (stringReader != null)
                {
#if !NETFX_CORE
                    stringReader.Close();
#else
                    stringReader.Dispose();
#endif
                }

                if (reader != null)
                    reader.Close();
            }
            return document;
        }
Ejemplo n.º 10
0
 /// <summary>
 /// Reads and returns a Document from the specified file.
 /// </summary>
 public static Document DocumentFromFile(string documentFileName) //, ErrorManager2 _errorManager)
 {
     Document document;
     DdlReader reader = null;
     try
     {
         reader = new DdlReader(documentFileName); //, _errorManager);
         document = reader.ReadDocument();
     }
     finally
     {
         if (reader != null)
             reader.Close();
     }
     return document;
 }
Ejemplo n.º 11
0
    /// <summary>
    /// Reads and returns a domain object from the specified DDL string.
    /// </summary>
    public static DocumentObject ObjectFromString(string ddl, DdlReaderErrors errors)
    {
      StringReader stringReader = null;
      DocumentObject domObj = null;
      DdlReader reader = null;
      try
      {
        stringReader = new StringReader(ddl);

        reader = new DdlReader(stringReader);
        domObj = reader.ReadObject();
      }
      finally
      {
        if (stringReader != null)
          stringReader.Close();
        if (reader != null)
          reader.Close();
      }
      return domObj;
    }
Ejemplo n.º 12
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.º 13
0
 private Document GetDocument()
 {
     var s = GetMDDLStream();
     var errors = new DdlReaderErrors();
     DdlReader rd = new DdlReader(s, errors);
     try
     {
         var doc = rd.ReadDocument();
         LogErrors(errors, null, s);
         ReportErrors(errors, null, s);
         return doc;
     }
     catch (Exception ex)
     {
         LogErrors(errors, ex, s);
         ReportErrors(errors, ex, s);
         throw;
     }
 }