-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make ExpectedDiagnostic.CreateFromCodeWithErrorsIndicated obsolete
FromMarkup shorter and clearer hopefully.
- Loading branch information
1 parent
46be495
commit 92c1450
Showing
6 changed files
with
81 additions
and
45 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
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
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,36 @@ | ||
namespace Gu.Roslyn.Asserts | ||
{ | ||
using System.Collections.Generic; | ||
|
||
public partial class ExpectedDiagnostic | ||
{ | ||
/// <summary> | ||
/// Create a new instance of <see cref="ExpectedDiagnostic"/>. | ||
/// </summary> | ||
/// <param name="diagnosticId">The expected diagnostic id.</param> | ||
/// <param name="code">The code with error position indicated..</param> | ||
/// <param name="cleanedSources"><paramref name="code"/> without error indicator.</param> | ||
/// <returns>A new instance of <see cref="ExpectedDiagnostic"/>.</returns> | ||
public static ExpectedDiagnostic CreateFromCodeWithErrorsIndicated(string diagnosticId, string code, out string cleanedSources) => FromMarkup(diagnosticId, code, out cleanedSources); | ||
|
||
/// <summary> | ||
/// Create a new instance of <see cref="ExpectedDiagnostic"/>. | ||
/// </summary> | ||
/// <param name="diagnosticId">The expected diagnostic id.</param> | ||
/// <param name="message">The expected message.</param> | ||
/// <param name="code">The code with error position indicated..</param> | ||
/// <param name="cleanedSources"><paramref name="code"/> without error indicator.</param> | ||
/// <returns>A new instance of <see cref="ExpectedDiagnostic"/>.</returns> | ||
public static ExpectedDiagnostic CreateFromCodeWithErrorsIndicated(string diagnosticId, string? message, string code, out string cleanedSources) => FromMarkup(diagnosticId, code, out cleanedSources); | ||
|
||
/// <summary> | ||
/// Create a new instance of <see cref="ExpectedDiagnostic"/>. | ||
/// </summary> | ||
/// <param name="diagnosticId">The expected diagnostic id.</param> | ||
/// <param name="message">The expected message.</param> | ||
/// <param name="codeWithErrorsIndicated">The code with error position indicated..</param> | ||
/// <param name="cleanedSources"><paramref name="codeWithErrorsIndicated"/> without errors indicated.</param> | ||
/// <returns>A new instance of <see cref="ExpectedDiagnostic"/>.</returns> | ||
public static IReadOnlyList<ExpectedDiagnostic> CreateManyFromCodeWithErrorsIndicated(string diagnosticId, string message, string codeWithErrorsIndicated, out string cleanedSources) => ManyFromMarkup(diagnosticId, message, codeWithErrorsIndicated, out cleanedSources); | ||
} | ||
} |
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