Exemple #1
0
        /// <summary>
        /// Responsible of building instance from segmented data.
        /// Segmented data is how the producer sending its raw data to
        /// the consumer. It's in a form of dictionary when
        /// keys represent the different segments
        /// and the value represent serialized form of the segment's data.
        /// </summary>
        /// <param name="segmentationStrategy">The segmentation strategy.</param>
        /// <returns></returns>
        /// <example>
        /// Examples for segments can be driven from regulation like
        /// GDPR (personal, non-personal data),
        /// Technical vs Business aspects, etc.
        /// </example>
        IConsumerHooksBuilder IConsumerHooksBuilder.RegisterSegmentationStrategy(IConsumerSegmentationStrategy segmentationStrategy)
        {
            var bridge = new ConsumerSegmentationStrategyBridge(segmentationStrategy);
            var prms   = _plan.AddSegmentation(bridge);
            var result = new ConsumerBuilder(prms);

            return(result);
        }
 /// <summary>
 /// Initializes a new instance.
 /// </summary>
 /// <param name="sync">The synchronize.</param>
 public ConsumerSegmentationStrategyBridge(
     IConsumerSegmentationStrategy sync)
 {
     _sync = sync;
 }