/// <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); }
/// <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); }
/// <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; }
/// <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; }
/// <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; }