Skip to content

Commit 5b52034

Browse files
authored
Add implicit conversion to ProjectInstance (#42)
Missed this in the last commit
1 parent 0c749fb commit 5b52034

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/MSBuildProjectCreator/ProjectCreator.Conversions.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
using Microsoft.Build.Construction;
66
using Microsoft.Build.Evaluation;
7+
using Microsoft.Build.Execution;
78
using System.Xml.Linq;
89

910
namespace Microsoft.Build.Utilities.ProjectCreation
@@ -28,6 +29,15 @@ public static implicit operator ProjectCollection(ProjectCreator creator)
2829
return creator.ProjectCollection;
2930
}
3031

32+
/// <summary>
33+
/// Defines an implicit conversion of a <see cref="ProjectCreator"/> to a <see cref="ProjectInstance"/>.
34+
/// </summary>
35+
/// <param name="creator">A <see cref="ProjectCreator"/> to convert.</param>
36+
public static implicit operator ProjectInstance(ProjectCreator creator)
37+
{
38+
return creator.ProjectInstance;
39+
}
40+
3141
/// <summary>
3242
/// Defines an implicit conversion of a <see cref="ProjectCreator"/> to a <see cref="ProjectRootElement"/>.
3343
/// </summary>

0 commit comments

Comments
 (0)