2 overrides of Next
Microsoft.ML.Core (1)
Utilities\Random.cs (1)
177public override int Next()
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Random.cs (1)
486public override int Next()
101 references to Next
Aspire.Dashboard.Tests (1)
Integration\MockOpenIdAuthority.cs (1)
73lastCode = Random.Shared.Next().ToString(CultureInfo.InvariantCulture);
HttpStress (1)
Program.cs (1)
66seed: cmdline.ValueForOption<int?>("-seed") ?? Random.Shared.Next());
KeyManagementSimulator (2)
Program.cs (2)
85seed = Random.Shared.Next(); 94var simulatorRandom = new Random(productRandom.Next());
Microsoft.AspNetCore.Identity.Specification.Tests (2)
UserManagerSpecificationTests.cs (2)
304var email = "foo" + Random.Shared.Next() + "@example.com"; 305var newEmail = "bar" + Random.Shared.Next() + "@example.com";
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
EndpointMetadataApiDescriptionProviderTest.cs (1)
504return Random.Shared.Next() % 2 == 0
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiSchemaService\OpenApiSchemaService.ResponseSchemas.cs (1)
173static Todo? GetTodo() => Random.Shared.Next() < 0.5 ? new Todo(1, "Test Title", true, DateTime.Now) : null;
Microsoft.Build.Engine.UnitTests (1)
Evaluation\Expander_Tests.cs (1)
1642xmlattribute.Value = "abc123" + new Random().Next();
Microsoft.CodeAnalysis (2)
InternalUtilities\TextKeyedCache.cs (2)
235return r.Next(); 240return r.Next();
Microsoft.CodeAnalysis.CSharp (15)
Utilities\ValueSetFactory.IntTC.cs (4)
75return Math.Abs((random.Next() << 10) ^ random.Next()); 79return (random.Next() << 10) ^ random.Next();
Utilities\ValueSetFactory.LongTC.cs (3)
63return ((long)random.Next() << 35) ^ ((long)random.Next() << 10) ^ (long)random.Next();
Utilities\ValueSetFactory.SByteTC.cs (1)
62return (sbyte)random.Next();
Utilities\ValueSetFactory.ShortTC.cs (1)
63return (short)random.Next();
Utilities\ValueSetFactory.UIntTC.cs (2)
63return (uint)((random.Next() << 10) ^ random.Next());
Utilities\ValueSetFactory.ULongTC.cs (3)
63return ((ulong)random.Next() << 35) ^ ((ulong)random.Next() << 10) ^ (ulong)random.Next();
Utilities\ValueSetFactory.UShortTC.cs (1)
63return (ushort)random.Next();
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
SymbolKey\SymbolKeyTests.cs (4)
234if (random.Next() % 2 == 0) 258if (random.Next() % 2 == 0) 276if (random.Next() % 2 == 0) 308if (random.Next() % 2 == 0)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Utilities\ValueSetTests.cs (1)
742int j = Random.Next();
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
SpellCheck\SpellCheckTests.cs (1)
79{{string.Join(Environment.NewLine, Enumerable.Repeat("", random.Next() % 5))}}
Microsoft.CodeAnalysis.Test.Utilities (1)
Syntax\SourceUtilities.cs (1)
21_buffer[i] = (char)random.Next();
Microsoft.CodeAnalysis.UnitTests (19)
Collections\GenericParameterHelper.cs (1)
19this.Data = new Random().Next();
Collections\HashSet\SegmentedHashSet_Generic_Tests.cs (9)
34return rand.Next(); 55return rand.Next(); 79return new SimpleInt(rand.Next()); 93return new EquatableBackwardsOrder(rand.Next()); 112return rand.Next(); 131return rand.Next(); 155return rand.Next(); 174return rand.Next(); 193return rand.Next();
Collections\ImmutableSegmentedListTest.cs (4)
54int value = random.Next(); 61int[] values = Enumerable.Range(0, inputLength).Select(i => random.Next()).ToArray(); 68value = random.Next(); 75values = Enumerable.Range(0, inputLength).Select(i => random.Next()).ToArray();
Collections\List\IList.NonGeneric.Tests.cs (1)
74return rand.Next();
Collections\List\SegmentedList.Generic.cs (2)
35return rand.Next(); 72return rand.Next();
Collections\List\SegmentedList.Generic.Tests.AsNonGenericIList.cs (1)
63return rand.Next();
Collections\TopologicalSortTests.cs (1)
208TestRandom(random.Next());
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
src\Compilers\Core\Portable\InternalUtilities\TextKeyedCache.cs (2)
235return r.Next(); 240return r.Next();
Microsoft.Extensions.ObjectPool.Microbenchmark (1)
Foo.cs (1)
19LastRandom = Random.Shared.Next();
Microsoft.ML.AutoML (1)
Experiment\Experiment.cs (1)
158_currentModelMLContext = _newContextSeedGenerator == null ? new MLContext() : new MLContext(_newContextSeedGenerator.Next());
Microsoft.ML.CpuMath.PerformanceTests (1)
PerformanceTests.cs (1)
59seed = new Random().Next();
Microsoft.ML.Data (1)
Transforms\BootstrapSamplingTransformer.cs (1)
85_state = new TauswortheHybrid.State(options.Seed ?? (uint)Host.Rand.Next());
Microsoft.ML.Ensemble (2)
Selector\SubsetSelector\BaseSubsetSelector.cs (1)
76args.Seed = (uint)rand.Next();
Selector\SubsetSelector\RandomPartitionSelector.cs (1)
43args.Seed = (uint)rand.Next();
Microsoft.ML.FastTree (1)
SumupPerformanceCommand.cs (1)
159int salt = _host.Rand.Next();
Microsoft.ML.IntegrationTests (10)
Datasets\TypeTestData.cs (10)
131I1 = (sbyte)rng.Next(), 132U1 = (byte)rng.Next(), 133I2 = (short)rng.Next(), 134U2 = (ushort)rng.Next(), 135I4 = rng.Next(), 136U4 = (uint)rng.Next(), 137I8 = (long)rng.Next(), 138U8 = (ulong)rng.Next(), 142Ts = TimeSpan.FromSeconds(rng.NextDouble() * (1 + rng.Next())), 144Dz = DateTimeOffset.FromUnixTimeSeconds((long)(rng.NextDouble() * (1 + rng.Next()))),
Microsoft.ML.LightGbm (1)
LightGbmTrainerBase.cs (1)
294res["seed"] = (Seed.HasValue) ? Seed : host.Rand.Next();
Microsoft.ML.Mkl.Components (1)
SymSgdClassificationTrainer.cs (1)
576_cursor = _cursorFactory.Create(RandomUtils.Create(host.Rand.Next()));
Microsoft.ML.PCA (2)
PcaTrainer.cs (2)
169_seed = options.Seed ?? Host.Rand.Next(); 176_seed = seed ?? Host.Rand.Next();
Microsoft.ML.Predictor.Tests (4)
TestTransposer.cs (4)
159var dataA = GenerateHelper(rowCount, 0.1, rgen, () => (int)rgen.Next(), 50, 5, 10, 15); 171builder.AddColumn("F", NumberDataViewType.Int32, GenerateHelper(rowCount, 0.8, rgen, () => rgen.Next())); 225var dataA = GenerateHelper(rowCount, 0.1, rgen, () => (int)rgen.Next(), 50, 5, 10, 15); 237builder.AddColumn("F", NumberDataViewType.Int32, GenerateHelper(rowCount, 0.8, rgen, () => (int)rgen.Next()));
Microsoft.ML.Samples (2)
Dynamic\Trainers\BinaryClassification\FieldAwareFactorizationMachine.cs (1)
153Label = rnd.Next() % 2 == 0,
Dynamic\Trainers\BinaryClassification\FieldAwareFactorizationMachineWithOptions.cs (1)
164Label = rnd.Next() % 2 == 0,
Microsoft.ML.SamplesUtils (2)
SamplesDatasetUtils.cs (2)
253Label = rnd.Next() % 2 == 0, 314var sample = new FloatLabelFloatFeatureVectorSample() { Label = rnd.Next() % 2, Features = new float[_simpleBinaryClassSampleFeatureLength] };
Microsoft.ML.StandardTrainers (2)
Standard\SdcaBinary.cs (2)
563rands[i] = RandomUtils.Create(Host.Rand.Next()); 2115rands[e - 1] = RandomUtils.Create(Host.Rand.Next());
Microsoft.ML.Sweeper (1)
Algorithms\SweeperProbabilityUtils.cs (1)
18_rng = new Random(host.Rand.Next());
Microsoft.ML.Tests (1)
TrainerEstimators\FAFMEstimator.cs (1)
131Label = rnd.Next() % 2 == 0,
Microsoft.ML.Transforms (2)
PermutationFeatureImportance.cs (1)
173var shuffleRand = RandomUtils.Create(host.Rand.Next());
StatefulFilterTransform.cs (1)
111var input = _typedSource.GetCursor(inputPred, rand == null ? (int?)null : rand.Next());
MilvusPlayground.ApiService (1)
Program.cs (1)
59vector[k] = ran.Next();
ProxylessEndToEnd.ApiService (1)
Program.cs (1)
17return Random.Shared.Next();
Shared.Tests (3)
Pools\PoolTests.cs (3)
272for (int j = 0; j < r.Next() % 256; j++) 281for (int j = 0; j < r.Next() % 256; j++) 285int target = r.Next() % objects.Count;
Stress.ApiService (1)
TraceCreator.cs (1)
126if (!IncludeBrokenLinks || Random.Shared.Next() % 2 == 0)
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Random.CompatImpl.cs (2)
126public CompatDerivedImpl(Random parent) : this(parent, Shared.Next()) { } 246buffer[i] = (byte)_parent.Next();
System.ServiceModel.NetNamedPipe (1)
System\Runtime\BackoffTimeoutHelper.cs (1)
75(uint)_random.Next() % (2 * BackoffTimeoutHelper.s_maxDriftTicks + 1) - s_maxDriftTicks)));
System.Text.RegularExpressions.Generator (1)
RegexGenerator.Emitter.cs (1)
4791stackCookieGenerator.Next() + 1;
System.Windows.Forms.Tests (1)
System\Windows\Forms\ComboBoxTests.cs (1)
2490string item = (random.Next() % 26 + 'a').ToString();
TestProject.AppHost (1)
TestProgram.cs (1)
54builder.Configuration["DcpPublisher:ResourceNameSuffix"] = $"{Random.Shared.Next():x}";