Cake.SqlServer.SqlBackupsImpl.GetDefaultLogPath(System.Data.SqlClient.SqlConnection)

Here are the examples of the csharp api class Cake.SqlServer.SqlBackupsImpl.GetDefaultLogPath(System.Data.SqlClient.SqlConnection) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: Cake.SqlServer
Source File: SqlBackupsImpl.cs
private static String GetFilePath(SqlConnection connection, string oldDatabaseName, string newDatabaseName, DirectoryPath newPath, LogicalNames logicalName)
        {
            var fileName = System.IO.Path.GetFileName(logicalName.PhysicalName);
            fileName = fileName.Replace(oldDatabaseName, newDatabaseName);

            var folder = newPath;

            if (logicalName.Type.Equals("L", StringComparison.OrdinalIgnoreCase))
            {
                folder = folder ?? GetDefaultLogPath(connection);
            }
            if (logicalName.Type.Equals("D", StringComparison.OrdinalIgnoreCase))
            {
                folder = folder ?? GetDefaultDataPath(connection);
            }

            var fullPath = folder + "\\" + fileName;

            return fullPath.Replace("/", "\\");
        }