Belhard.DesignPatterns.IoC.DbConnectionModule.GetDbRootFolder C# (CSharp) Метод

GetDbRootFolder() приватный статический Метод

private static GetDbRootFolder ( ) : string
Результат string
        private static string GetDbRootFolder()
        {
            string assemblyLocation = Assembly.GetExecutingAssembly().Location;
            string rootFolder = Path.GetDirectoryName(assemblyLocation);
            Debug.Assert(rootFolder != null);

            do
            {
                string dbRootFolder = Path.Combine(rootFolder, "Databases");
                if (Directory.Exists(dbRootFolder))
                {
                    return dbRootFolder;
                }

                rootFolder = Path.GetDirectoryName(rootFolder);
            } while (rootFolder != null);

            throw new InvalidOperationException("Failed to find 'Databases' folder.");
        }
DbConnectionModule