[Issue #1317] Rename HasAnyErrors to HasErrors in tag helper descriptor api

This commit is contained in:
Ajay Bhargav Baaskaran 2017-05-12 15:42:02 -07:00
parent 8fbe301dc0
commit 7e447c33ea
5 changed files with 14 additions and 14 deletions

View File

@ -43,13 +43,13 @@ namespace Microsoft.AspNetCore.Razor.Language
public IReadOnlyDictionary<string, string> Metadata { get; protected set; } public IReadOnlyDictionary<string, string> Metadata { get; protected set; }
public bool HasAnyErrors public bool HasErrors
{ {
get get
{ {
var anyErrors = Diagnostics.Any(diagnostic => diagnostic.Severity == RazorDiagnosticSeverity.Error); var errors = Diagnostics.Any(diagnostic => diagnostic.Severity == RazorDiagnosticSeverity.Error);
return anyErrors; return errors;
} }
} }

View File

@ -22,13 +22,13 @@ namespace Microsoft.AspNetCore.Razor.Language
public IReadOnlyList<RazorDiagnostic> Diagnostics { get; protected set; } public IReadOnlyList<RazorDiagnostic> Diagnostics { get; protected set; }
public bool HasAnyErrors public bool HasErrors
{ {
get get
{ {
var anyErrors = Diagnostics.Any(diagnostic => diagnostic.Severity == RazorDiagnosticSeverity.Error); var errors = Diagnostics.Any(diagnostic => diagnostic.Severity == RazorDiagnosticSeverity.Error);
return anyErrors; return errors;
} }
} }

View File

@ -38,14 +38,14 @@ namespace Microsoft.AspNetCore.Razor.Language
public IReadOnlyDictionary<string, string> Metadata { get; protected set; } public IReadOnlyDictionary<string, string> Metadata { get; protected set; }
public bool HasAnyErrors public bool HasErrors
{ {
get get
{ {
var allDiagnostics = GetAllDiagnostics(); var allDiagnostics = GetAllDiagnostics();
var anyErrors = allDiagnostics.Any(diagnostic => diagnostic.Severity == RazorDiagnosticSeverity.Error); var errors = allDiagnostics.Any(diagnostic => diagnostic.Severity == RazorDiagnosticSeverity.Error);
return anyErrors; return errors;
} }
} }

View File

@ -21,14 +21,14 @@ namespace Microsoft.AspNetCore.Razor.Language
public IReadOnlyList<RazorDiagnostic> Diagnostics { get; protected set; } public IReadOnlyList<RazorDiagnostic> Diagnostics { get; protected set; }
public bool HasAnyErrors public bool HasErrors
{ {
get get
{ {
var allDiagnostics = GetAllDiagnostics(); var allDiagnostics = GetAllDiagnostics();
var anyErrors = allDiagnostics.Any(diagnostic => diagnostic.Severity == RazorDiagnosticSeverity.Error); var errors = allDiagnostics.Any(diagnostic => diagnostic.Severity == RazorDiagnosticSeverity.Error);
return anyErrors; return errors;
} }
} }

View File

@ -1518,7 +1518,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
var descriptor = factory.CreateDescriptor(tagHelperType); var descriptor = factory.CreateDescriptor(tagHelperType);
// Assert // Assert
Assert.False(descriptor.HasAnyErrors); Assert.False(descriptor.HasErrors);
} }
public static TheoryData<string> ValidAttributePrefixData public static TheoryData<string> ValidAttributePrefixData
@ -1558,7 +1558,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
var descriptor = factory.CreateDescriptor(tagHelperType); var descriptor = factory.CreateDescriptor(tagHelperType);
// Assert // Assert
Assert.False(descriptor.HasAnyErrors); Assert.False(descriptor.HasErrors);
} }
// name, expectedErrorMessages // name, expectedErrorMessages