JsonSchemaResultsCollector.GetResultCount Method
Definition
Namespace: Corvus.Text.Json
Assembly: Corvus.Text.Json.dll
Source: JsonSchemaResultsCollector.cs
GetResultCount()
Gets the total count of committed validation results with O(1) performance.
public int GetResultCount()
Returns
The number of validation results that have been committed and are available for enumeration. This count includes both successful and failed validation results based on the configured verbosity level.
Remarks
Result Counting by Verbosity Level: - Basic: Counts failure results only - Detailed: Counts failure results with enhanced context - Verbose: Counts all validation events (successes and failures) Performance: This operation is O(1) as it returns the length of the committed results stack without enumeration. Use this method to determine if enumeration is necessary or to pre-size result processing structures.
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests.
Open an issue