RepeatCount
reacts to successful termination by disposing the previous subscription and resubscribing to the source sequence, up to the maximum number of times specified in the Count property. Value notifications received from all of the subscriptions are forwarded to the result sequence.
After the source sequence completes successfully the specified number of times, the result sequence will also terminate successfully. If any of the subscriptions terminates exceptionally, the result sequence will also terminate exceptionally, and no further resubscriptions will be made.
Tip
The subscription side-effects (e.g. opening a file, initializing hardware connections) of all upstream operators will be repeated upon termination and resubscription to the source sequence. Sometimes this may be undesirable. For example logging side-effects introduced by Sink nodes may create extra files on each subscription. To shield operators from these effects, consider moving affected operators downstream from the resubscription operator, or moving the resubscription operator itself further upstream.
Caution
All resubscription operators should be applied with care to anonymous branch points in the workflow, since dangling branches operate independently from each other, and from the subscription to the source sequence. For more details, see Subjects.