提交 0c3682c5 编写于 作者: B Balaji Soundrarajan

Set default relative path for Project Identity in Integration tests

上级 c3609967
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.IO;
namespace Microsoft.VisualStudio.IntegrationTest.Utilities.Common.ProjectUtils namespace Microsoft.VisualStudio.IntegrationTest.Utilities.Common.ProjectUtils
{ {
public abstract class Identity public abstract class Identity
...@@ -9,12 +11,23 @@ public abstract class Identity ...@@ -9,12 +11,23 @@ public abstract class Identity
public class Project : Identity public class Project : Identity
{ {
public Project(string name, string relativePath = null) public Project(string name, string projectExtension = ".csproj", string relativePath = null)
{ {
Name = name; Name = name;
RelativePath = relativePath;
if (string.IsNullOrWhiteSpace(relativePath))
{
RelativePath = Path.Combine(name, name + projectExtension);
}
else
{
RelativePath = relativePath;
}
} }
/// <summary>
/// This path is relative to the Solution file. Default value is set to ProjectName\ProjectName.csproj
/// </summary>
public string RelativePath { get; } public string RelativePath { get; }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册