This repository has been archived by the owner on Dec 18, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
48 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 10 additions & 8 deletions
18
...time.Roslyn.Interfaces/IProjectContext.cs → ...ntime.Roslyn.Interfaces/ProjectContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,43 @@ | ||
using System; | ||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System.Runtime.Versioning; | ||
|
||
namespace Microsoft.Framework.Runtime.Roslyn | ||
{ | ||
/// <summary> | ||
/// Stores information about the project | ||
/// </summary> | ||
public interface IProjectContext | ||
public class ProjectContext | ||
{ | ||
/// <summary> | ||
/// Path to the project directory | ||
/// </summary> | ||
string ProjectDirectory { get; } | ||
public string ProjectDirectory { get; set; } | ||
|
||
/// <summary> | ||
/// Path to the project file | ||
/// </summary> | ||
string ProjectFilePath { get; } | ||
public string ProjectFilePath { get; set; } | ||
|
||
/// <summary> | ||
/// The name of the project | ||
/// </summary> | ||
string Name { get; } | ||
public string Name { get; set; } | ||
|
||
/// <summary> | ||
/// The target framework of the project currently being compiled | ||
/// </summary> | ||
FrameworkName TargetFramework { get; } | ||
public FrameworkName TargetFramework { get; set; } | ||
|
||
/// <summary> | ||
/// The configuration of the project currently being compiled | ||
/// </summary> | ||
string Configuration { get; } | ||
public string Configuration { get; set; } | ||
|
||
/// <summary> | ||
/// Project version | ||
/// </summary> | ||
string Version { get; } | ||
public string Version { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
test/Microsoft.Framework.Runtime.Roslyn.Tests/ProjectContextFacts.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using Xunit; | ||
|
||
namespace Microsoft.Framework.Runtime.Roslyn.Tests | ||
{ | ||
public class ProjectContextFacts | ||
{ | ||
[Fact] | ||
public void DefaultConstructorSetAllPropertiesNull() | ||
{ | ||
var target = new ProjectContext(); | ||
|
||
// nothing is set | ||
Assert.Null(target.Configuration); | ||
Assert.Null(target.Name); | ||
Assert.Null(target.ProjectDirectory); | ||
Assert.Null(target.ProjectFilePath); | ||
Assert.Null(target.TargetFramework); | ||
Assert.Null(target.Version); | ||
} | ||
} | ||
} |