NCache 4.6 - Online Documentation

Using Aggregator

       To utilize Aggregator related interfaces, include the following namespace in your application: Alachisoft.NCache.Runtime.Aggregation.
NCache provider has also built-in implementation needed for Aggregator in order to work for above listed types in the package mentioned above. However if the user wishes to use the Aggregator for custom types and their own implementation of aggregation, they can by simply implementing two interfaces which are also contained by the above mentioned package: ValueExtractor and Aggregator.
The implementation of IValueExtractor interface will contain Extract() method at least which will be used by the internal framework to identify the type of an instance by simply returning the type of the object passed to it. On the other hand, the Aggregator interface contains signatures of two methods to be implemented; Aggregate() and AgregateAll(). The job of the Value Extractor is to return filtered data to the Aggregator. The Aggregator then works on the given data set to produce more refined data.
The implementation of Extract() method of IValueExtractor interface should contain handling for all the types used being used in Map Reduce.
In this section:
Provides sample code for implementing the IValueExtractor Interface of Aggregator.
Provides sample code for implementing the IAggregator Interface.
Provides sample code for implementing the Aggregator.
See Also