Class ResultCountHandler
A SPARQL Results Handler which just counts Results.
Inherited Members
Namespace: VDS.RDF.Parsing.Handlers
Assembly: dotNetRdf.dll
Syntax
public class ResultCountHandler : BaseResultsHandler, ISparqlResultsHandler, INodeFactory
  Remarks
Note: For a Boolean Result Set the counter will either be 1 for true or 0 for false.
Constructors
| Edit this page View SourceResultCountHandler()
Creates a new Result Count Handler.
Declaration
public ResultCountHandler()
  Properties
| Edit this page View SourceCount
Gets the Count of Results.
Declaration
public int Count { get; }
  Property Value
| Type | Description | 
|---|---|
| int | 
Remarks
For Boolean Results counter will be either 1 or 0 depending on whether the result was True/False.
Methods
| Edit this page View SourceHandleBooleanResultInternal(bool)
Handles a Boolean Result.
Declaration
protected override void HandleBooleanResultInternal(bool result)
  Parameters
| Type | Name | Description | 
|---|---|---|
| bool | result | Result.  | 
      
Overrides
| Edit this page View SourceHandleResultInternal(ISparqlResult)
Handles a SPARQL Result by incrementing the counter.
Declaration
protected override bool HandleResultInternal(ISparqlResult result)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ISparqlResult | result | Result.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
Overrides
| Edit this page View SourceHandleVariableInternal(string)
Handles a Variable Declaration.
Declaration
protected override bool HandleVariableInternal(string var)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | var | Variable Name.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
Overrides
| Edit this page View SourceStartResultsInternal()
Starts Results Handling and resets the counter to zero.
Declaration
protected override void StartResultsInternal()