public static LoadFile ( string nhibernateFilePath ) : IEnumerable |
||
nhibernateFilePath | string | |
리턴 | IEnumerable |
public void ConvertAll(string hbmDirectory, string mapDirectory, string nameSpace) { string[] files = Directory.GetFiles(hbmDirectory, "*" + HbmFileUtility.NHibernateFileExtension); foreach (string hbmFilePath in files) { try { _writeToConsole(hbmFilePath); foreach (var classInfo in HbmFileUtility.LoadFile(hbmFilePath)) { ConvertFile(classInfo, nameSpace, mapDirectory); } } catch (Exception ex) { _writeToError("Caught exception processing file " + Path.GetFileName(hbmFilePath) + ": " + ex); } } _writeToConsole("done..."); }
private void ConvertDirectoryRecursively(string directory, string nameSpace) { string[] files = Directory.GetFiles(directory, "*" + HbmFileUtility.NHibernateFileExtension); foreach (string hbmFilePath in files) { try { _writeToConsole(hbmFilePath); foreach (var classInfo in HbmFileUtility.LoadFile(hbmFilePath)) { ConvertFile(classInfo, nameSpace, directory); } } catch (Exception ex) { _writeToError("Caught exception processing file " + Path.GetFileName(hbmFilePath) + ": " + ex); } } foreach (string subDirectory in Directory.GetDirectories(directory)) { ConvertDirectoryRecursively(subDirectory, nameSpace); } }