[Issue #1317] Rename HasAnyErrors to HasErrors in tag helper descriptor api
This commit is contained in:
parent
8fbe301dc0
commit
7e447c33ea
|
|
@ -43,13 +43,13 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
|
||||
public IReadOnlyDictionary<string, string> Metadata { get; protected set; }
|
||||
|
||||
public bool HasAnyErrors
|
||||
public bool HasErrors
|
||||
{
|
||||
get
|
||||
{
|
||||
var anyErrors = Diagnostics.Any(diagnostic => diagnostic.Severity == RazorDiagnosticSeverity.Error);
|
||||
var errors = Diagnostics.Any(diagnostic => diagnostic.Severity == RazorDiagnosticSeverity.Error);
|
||||
|
||||
return anyErrors;
|
||||
return errors;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
|
||||
public IReadOnlyList<RazorDiagnostic> Diagnostics { get; protected set; }
|
||||
|
||||
public bool HasAnyErrors
|
||||
public bool HasErrors
|
||||
{
|
||||
get
|
||||
{
|
||||
var anyErrors = Diagnostics.Any(diagnostic => diagnostic.Severity == RazorDiagnosticSeverity.Error);
|
||||
var errors = Diagnostics.Any(diagnostic => diagnostic.Severity == RazorDiagnosticSeverity.Error);
|
||||
|
||||
return anyErrors;
|
||||
return errors;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,14 +38,14 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
|
||||
public IReadOnlyDictionary<string, string> Metadata { get; protected set; }
|
||||
|
||||
public bool HasAnyErrors
|
||||
public bool HasErrors
|
||||
{
|
||||
get
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,14 +21,14 @@ namespace Microsoft.AspNetCore.Razor.Language
|
|||
|
||||
public IReadOnlyList<RazorDiagnostic> Diagnostics { get; protected set; }
|
||||
|
||||
public bool HasAnyErrors
|
||||
public bool HasErrors
|
||||
{
|
||||
get
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1518,7 +1518,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
|
|||
var descriptor = factory.CreateDescriptor(tagHelperType);
|
||||
|
||||
// Assert
|
||||
Assert.False(descriptor.HasAnyErrors);
|
||||
Assert.False(descriptor.HasErrors);
|
||||
}
|
||||
|
||||
public static TheoryData<string> ValidAttributePrefixData
|
||||
|
|
@ -1558,7 +1558,7 @@ namespace Microsoft.CodeAnalysis.Razor.Workspaces
|
|||
var descriptor = factory.CreateDescriptor(tagHelperType);
|
||||
|
||||
// Assert
|
||||
Assert.False(descriptor.HasAnyErrors);
|
||||
Assert.False(descriptor.HasErrors);
|
||||
}
|
||||
|
||||
// name, expectedErrorMessages
|
||||
|
|
|
|||
Loading…
Reference in New Issue