public long AddParticipant()
{
try
{
return AddParticipants(1);
}
catch (ArgumentOutOfRangeException)
{
throw new InvalidOperationException(SR.Barrier_AddParticipants_Overflow_ArgumentOutOfRange);
}
}
public BarrierLimitedModeCharacterCounter(ITextFile textFile, Barrier barrier) { this.barrier = barrier; barrier.AddParticipant(); charCounts = new Lazy<IReadOnlyDictionary<char, int>>(() => BufferAndCount(textFile)); }