Microsoft.ApplicationInsights.Extensibility.Implementation.WeakConcurrentRandom.RegenerateSegment(int)

Here are the examples of the csharp api class Microsoft.ApplicationInsights.Extensibility.Implementation.WeakConcurrentRandom.RegenerateSegment(int) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: ApplicationInsights-dotnet
Source File: WeakConcurrentRandom.cs
public ulong Next()
        {
            // get index of the next random number in the pre-generated array
            int newIndex = Interlocked.Increment(ref this.index);

            // check to see if we just switched to a different segment
            if ((newIndex & this.randomIndexWithinSegmentMask) == 0)
            {
                this.RegenerateSegment(newIndex);
            }

            return this.randomNumbers[newIndex & this.randomArrayIndexMask];
        }