Show / Hide Table of Contents

Class ItemCounter

Represents a visitor that counts the items under an IVersionable item.

Inheritance
System.Object
VersionableVisitorBase
ItemCounter
Inherited Members
VersionableVisitorBase.depth
VersionableVisitorBase.HaveVisited(IdentifierTriple)
VersionableVisitorBase.RegisterVisit(IdentifierTriple)
VersionableVisitorBase.EndVisitItem(IVersionable)
Namespace: Algenta.Colectica.Model.Utility
Assembly: Algenta.Colectica.Model.dll
Syntax
public class ItemCounter : VersionableVisitorBase, IVersionableVisitor

Properties

CountsByType

Gets the count of each type of item.

Declaration
public Dictionary<Guid, int> CountsByType { get; }
Property Value
Type Description
Dictionary<Guid, System.Int32>

SortedCounts

Gets the count of each type of item, sorted in descending order.

Declaration
public IOrderedEnumerable<KeyValuePair<Guid, int>> SortedCounts { get; }
Property Value
Type Description
IOrderedEnumerable<KeyValuePair<Guid, System.Int32>>

Methods

BeginVisitItem(IVersionable)

Called first when visiting an item, before visiting the item's children.

Declaration
public override void BeginVisitItem(IVersionable item)
Parameters
Type Name Description
IVersionable item

The item.

Overrides
VersionableVisitorBase.BeginVisitItem(IVersionable)

Extension Methods

Extensions.Yield<T>(T)
Back to top Copyright © 2009-2018 Colectica