Skip to content

Classification

Duncan Jones edited this page Nov 20, 2019 · 8 revisions

Classification

A classification is a piece of code that runs over the event stream for an entity in order to decide whether that entity instance is included or excluded from the group rule of the classifier

For each event in the stream it needs to decide (a) am I interested in this kind of event and if so (b) what does this mean to group classification.

Example

The following classification runs over the event stream for a command to classify if the command is completed.

 /// <summary>
 /// A classification to denote that a command execution has completed
 /// </summary>
 public class Completed
     : ClassificationBase,
     IClassifyEventType<CommandHandler.Events.Completed>
 {
     public Classification.ClassificationResults ClassifyEventInstance(Events.Completed eventInstance)
     {
         return Classification.ClassificationResults.Include;
     }
 }

A classification is run by a Classification Processor and you can specify the Event Stream and classifier to use by parameter binding with a Classification attribute.

Clone this wiki locally