mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
Adding project property support to SqlProj service (#1883)
* Nuget update * Updating nuget * implementation * GetProperties test * Adding SetDatabaseSource * adding comment * Nuget update * PR feedback * Fixing cross-plat path tests * Updating to signed nuget * fixing None test
This commit is contained in:
@@ -80,13 +80,15 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Common
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Normalizes Windows, Unix, and mixed paths to the same slash direction, specified by <paramref name="separatorType"/>
|
||||
/// Normalizes Windows, Unix, and mixed paths to the same slash direction, specified by <paramref name="separatorType"/>.
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="separatorType">Win32NT for \, Unix for /</param>
|
||||
/// <param name="separatorType">Win32NT for \, Unix for /. If not set, path will be normalized to the current platform.</param>
|
||||
/// <returns></returns>
|
||||
public static string NormalizePath(string path, PlatformID separatorType)
|
||||
public static string NormalizePath(string path, PlatformID? separatorType = null)
|
||||
{
|
||||
separatorType ??= Environment.OSVersion.Platform;
|
||||
|
||||
return separatorType switch
|
||||
{
|
||||
PlatformID.Win32NT => path.Contains('/')
|
||||
|
||||
Reference in New Issue
Block a user