81 references to new
Microsoft.Arcade.Common (1)
ExponentialRetry.cs (1)
13private Random _random = new Random();
Microsoft.AspNetCore.Components.Server.Tests (2)
Circuits\RemoteJSDataStreamTest.cs (2)
52var random = new Random(); 80var random = new Random();
Microsoft.AspNetCore.InternalTesting.Tests (1)
QuarantinedTestAttributeTest.cs (1)
27Assert.True(new Random().Next(100) <= 80);
Microsoft.Build (1)
StringUtils.cs (1)
29Random random = new();
Microsoft.Build.Engine.UnitTests (2)
BuildEventArgsSerialization_Tests.cs (1)
524(AssemblyLoadingContext)(new Random().Next(Enum.GetNames(typeof(AssemblyLoadingContext)).Length));
Evaluation\Expander_Tests.cs (1)
1642xmlattribute.Value = "abc123" + new Random().Next();
Microsoft.Build.Framework (1)
Telemetry\OpenTelemetryManager.cs (1)
233Random random = new();
Microsoft.Build.Framework.UnitTests (1)
AssemblyLoadBuildEventArgs_Tests.cs (1)
22(AssemblyLoadingContext)(new Random().Next(Enum.GetNames(typeof(AssemblyLoadingContext)).Length));
Microsoft.Build.Tasks.Core (1)
StringUtils.cs (1)
29Random random = new();
Microsoft.CodeAnalysis (1)
InternalUtilities\TextKeyedCache.cs (1)
238r = new Random();
Microsoft.CodeAnalysis.CSharp (1)
FlowAnalysis\NullableWalker.Variables.cs (1)
189_nextIdOffset = container?._nextIdOffset ?? new Random();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\PatternMatchingTests_ListPatterns.cs (1)
7208var r = new Random();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
SourceGeneration\AdditionalSourcesCollectionTests.cs (1)
138Random r = new Random();
SourceGeneration\GeneratorDriverFuzzTests.cs (1)
255var random = new Random();
Utilities\ValueSetTests.cs (1)
20private static readonly Random Random = new Random();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Parsing\PatternParsingTests.cs (1)
2983Random random = new Random();
Microsoft.CodeAnalysis.UnitTests (3)
Collections\GenericParameterHelper.cs (1)
19this.Data = new Random().Next();
Text\SourceTextTests.cs (1)
242var random = new Random();
Text\TextChangeTests.cs (1)
985var random = new Random();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Compilers\Core\Portable\InternalUtilities\TextKeyedCache.cs (1)
238r = new Random();
Microsoft.Data.Analysis (1)
DataFrame.cs (1)
346Random rand = new Random();
Microsoft.DotNet.Helix.Sdk (1)
AzureDevOpsTask.cs (1)
171private static readonly Random s_rand = new Random();
Microsoft.Extensions.AI.Tests (1)
ChatCompletion\FunctionInvokingChatClientTests.cs (1)
1021var value = new Random().Next(100);
Microsoft.Extensions.Caching.Hybrid (1)
Internal\HybridCachePayload.cs (1)
38private static readonly Random _entropySource = new(); // doesn't need to be cryptographic
Microsoft.Extensions.Caching.Hybrid.Tests (14)
DistributedCacheTests.cs (3)
71new Random().NextBytes(expected); 117new Random().NextBytes(expected); 279var rand = new Random();
PayloadTests.cs (10)
40new Random().NextBytes(bytes); 73new Random().NextBytes(bytes); 107new Random().NextBytes(bytes); 137new Random().NextBytes(bytes); 173new Random().NextBytes(bytes); 209new Random().NextBytes(bytes); 227new Random().NextBytes(bytes); 254new Random().NextBytes(bytes); 287new Random().NextBytes(bytes); 314new Random().NextBytes(bytes);
TagSetTests.cs (1)
157var rand = new Random();
Microsoft.Extensions.Caching.MicroBenchmarks (1)
DistributedCacheBenchmarks.cs (1)
20private readonly Random random = new Random();
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\Internal\RandomStringGenerator.cs (1)
11private static readonly Random _random = new();
Microsoft.Extensions.TimeProvider.Testing.Tests (1)
TimerTests.cs (1)
333var random = new Random();
Microsoft.ML.AutoML (8)
API\BinaryClassificationExperiment.cs (1)
371_rnd = settings.Seed.HasValue ? new Random(settings.Seed.Value) : new Random();
API\MulticlassClassificationExperiment.cs (1)
357_rnd = settings.Seed.HasValue ? new Random(settings.Seed.Value) : new Random();
API\RegressionExperiment.cs (1)
377_rnd = settings.Seed.HasValue ? new Random(settings.Seed.Value) : new Random();
AutoMlUtils.cs (1)
15public static readonly ThreadLocal<Random> Random = new ThreadLocal<Random>(() => new Random());
Sweepers\SmacSweeper.cs (1)
292Random r = new Random();
Tuner\PipelineProposer.cs (1)
83_rand = new Random();
Tuner\SmacTuner.cs (1)
29private readonly Random _rnd = new Random();
Utils\RandomNumberGenerator.cs (1)
15_random = new Random();
Microsoft.ML.Core (1)
Utilities\Random.cs (1)
47return new TauswortheHybrid(new Random());
Microsoft.ML.Core.Tests (1)
UnitTests\TestHosts.cs (1)
40Random rand = new Random();
Microsoft.ML.CpuMath.PerformanceTests (1)
PerformanceTests.cs (1)
59seed = new Random().Next();
Microsoft.ML.Fairlearn (1)
Reductions\Utilities.cs (1)
26var rand = new Random();
Microsoft.ML.FastTree (1)
Training\OptimizationAlgorithms\OptimizationAlgorithm.cs (1)
46DropoutRng = new Random();
Microsoft.ML.GenAI.Mistral (1)
MistralCausalLMAgent.cs (1)
162var random = new Random();
Microsoft.ML.SearchSpace (1)
Tuner\RandomTuner.cs (1)
22_rnd = new Random();
Microsoft.ML.Sweeper (2)
Algorithms\KdoSweeper.cs (1)
260Random rng = new Random();
Algorithms\SmacSweeper.cs (1)
301Random r = new Random();
Microsoft.ML.Tests (3)
Transformers\LineParserTests.cs (1)
56Random rand = new Random();
Transformers\RffTests.cs (2)
45Random rand = new Random(); 93Random rand = new Random();
Microsoft.ML.Tokenizers (1)
Model\Word.cs (1)
118if (dropout.HasValue && (_random ??= new()).NextDouble() < dropout)
Microsoft.VisualBasic.Tests (1)
Microsoft\VisualBasic\ApplicationServices\SingleInstanceTests.cs (1)
184Random r = new();
MilvusPlayground.ApiService (1)
Program.cs (1)
45Random ran = new();
PresentationFramework (1)
System\Windows\Documents\FixedPageStructure.cs (1)
448Random random = new Random();
System.Text.RegularExpressions (2)
System\Text\RegularExpressions\Regex.Cache.cs (1)
57private static readonly Random s_random = new Random();
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Sample.cs (1)
38Random random = randomseed != 0 ? new Random(randomseed) : new Random();
System.Windows.Forms.Tests (5)
System\Windows\Forms\ApplicationTests.cs (1)
579Random rnd = new Random();
System\Windows\Forms\ComboBoxTests.cs (1)
2483Random random = new();
System\Windows\Forms\FontCacheTests.cs (1)
22Random random = new();
System\Windows\Forms\ListViewGroupTests.cs (1)
250Random random = new();
System\Windows\Forms\ScreenDcCacheTests.cs (1)
13Random random = new();
TestReferenceAssembly (6)
OtherDllClass.cs (4)
41Random r = new Random(); 73Random r = new Random(); 102Random r = new Random(); 131Random r = new Random();
OtherDllStaticMethods.cs (2)
37Random r = new Random(); 75Random r = new Random();
WinFormsControlsTest (2)
ListViewTest.cs (2)
18Random random = new(); 227Random random = new();