-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial support for project references
- Loading branch information
Showing
9 changed files
with
137 additions
and
23 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
33 changes: 33 additions & 0 deletions
33
src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/ProjectState.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,33 @@ | ||
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
namespace Microsoft.CodeAnalysis.Testing | ||
{ | ||
public abstract class ProjectState | ||
{ | ||
private readonly string _defaultPrefix; | ||
private readonly string _defaultExtension; | ||
|
||
protected ProjectState(string name, string defaultPrefix, string defaultExtension) | ||
{ | ||
Name = name; | ||
_defaultPrefix = defaultPrefix; | ||
_defaultExtension = defaultExtension; | ||
|
||
Sources = new SourceFileList(defaultPrefix, defaultExtension); | ||
} | ||
|
||
public string Name { get; } | ||
|
||
public string AssemblyName => Name; | ||
|
||
public abstract string Language { get; } | ||
|
||
/// <summary> | ||
/// Gets the set of source files for analyzer or code fix testing. Files may be added to this list using one of | ||
/// the <see cref="SourceFileList.Add(string)"/> methods. | ||
/// </summary> | ||
public SourceFileList Sources { get; } | ||
|
||
public MetadataReferenceCollection AdditionalReferences { get; } = new MetadataReferenceCollection(); | ||
} | ||
} |
Oops, something went wrong.