51 references to Shared
BlazorServerApp (2)
Data\WeatherForecastService.cs (2)
18TemperatureC = Random.Shared.Next(-20, 55), 19Summary = Summaries[Random.Shared.Next(Summaries.Length)]
BlazorUnitedApp (2)
Data\WeatherForecastService.cs (2)
18TemperatureC = Random.Shared.Next(-20, 55), 19Summary = Summaries[Random.Shared.Next(Summaries.Length)]
HeaderPropagationSample (1)
Startup.cs (1)
113if (Random.Shared.NextDouble() > threshold)
HostedBlazorWebassemblyApp.Server (2)
Data\WeatherForecastService.cs (2)
24TemperatureC = Random.Shared.Next(-20, 55), 25Summary = Summaries[Random.Shared.Next(Summaries.Length)]
HttpStress (1)
Program.cs (1)
66seed: cmdline.ValueForOption<int?>("-seed") ?? Random.Shared.Next());
IIS.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (1)
159var port = Random.Shared.Next(_minPort, _maxPort);
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
733var disconnectAfter = Random.Shared.Next(maxRequestSize);
IISExpress.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (1)
159var port = Random.Shared.Next(_minPort, _maxPort);
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
733var disconnectAfter = Random.Shared.Next(maxRequestSize);
InMemory.FunctionalTests (2)
src\Servers\Kestrel\shared\test\ServerRetryHelper.cs (2)
22var nextPortAttempt = 30000 + Random.Shared.Next(10000); 37nextPortAttempt = port + Random.Shared.Next(100);
Interop.FunctionalTests (2)
src\Servers\Kestrel\shared\test\ServerRetryHelper.cs (2)
22var nextPortAttempt = 30000 + Random.Shared.Next(10000); 37nextPortAttempt = port + Random.Shared.Next(100);
JwtClientSample (1)
Program.cs (1)
72nextMsgAt = Random.Shared.Next(2, 5);
KeyManagementSimulator (1)
Program.cs (1)
85seed = Random.Shared.Next();
Microsoft.AspNetCore.DataProtection (1)
KeyManagement\KeyRingProvider.cs (1)
65JitterRandom = Random.Shared;
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.InternalTesting.Tests (1)
HttpClientSlimTest.cs (1)
72var random = Random.Shared;
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiComponentService\OpenApiComponentService.ResponseSchemas.cs (1)
101static Todo? GetTodo() => Random.Shared.Next() < 0.5 ? new Todo(1, "Test Title", true, DateTime.Now) : null;
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (4)
EndToEndBenchmarks.cs (4)
53Random.Shared.NextBytes(_payloadOversized); 80var rand = Random.Shared; 93var rand = Random.Shared; 108var rand = Random.Shared;
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
RedisOutputCacheStore.cs (1)
98var secondsWithJitter = 300 + Random.Shared.Next(-30, 30);
Microsoft.AspNetCore.Routing.Tests (1)
RouteCollectionTest.cs (1)
508int index = Random.Shared.Next(0, routeNames.Length - 1);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (4)
KestrelServerTests.cs (2)
997? Random.Shared.Next(IPEndPoint.MinPort, IPEndPoint.MaxPort) 1049? Random.Shared.Next(IPEndPoint.MinPort, IPEndPoint.MaxPort)
src\Servers\Kestrel\shared\test\ServerRetryHelper.cs (2)
22var nextPortAttempt = 30000 + Random.Shared.Next(10000); 37nextPortAttempt = port + Random.Shared.Next(100);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (2)
src\Servers\Kestrel\shared\test\ServerRetryHelper.cs (2)
22var nextPortAttempt = 30000 + Random.Shared.Next(10000); 37nextPortAttempt = port + Random.Shared.Next(100);
Microsoft.AspNetCore.SignalR.Common.Tests (1)
Internal\Protocol\MemoryBufferWriterTests.cs (1)
406Random.Shared.NextBytes(data);
Microsoft.AspNetCore.SignalR.Microbenchmarks (2)
MessageParserBenchmark.cs (2)
25Random.Shared.NextBytes(buffer); 39Random.Shared.NextBytes(buffer);
Microsoft.AspNetCore.SignalR.Tests (1)
Internal\MessageBufferTests.cs (1)
254var ackNum = Random.Shared.Next(0, 1000);
Microsoft.AspNetCore.WebSockets.Tests (1)
WebSocketCompressionMiddlewareTests.cs (1)
146Random.Shared.NextBytes(clientBuf);
Microsoft.Extensions.ObjectPool.Microbenchmark (1)
Foo.cs (1)
19LastRandom = Random.Shared.Next();
Microsoft.JSInterop.Tests (1)
JSRuntimeTest.cs (1)
339Random.Shared.NextBytes(byteArray);
System.Collections.Concurrent (1)
System\Collections\Concurrent\ConcurrentStack.cs (1)
631backoff = Random.Shared.Next(1, BACKOFF_MAX_YIELDS);
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.RawSocket.cs (1)
28ushort id = (ushort)Random.Shared.Next(ushort.MaxValue + 1);
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Random.Net5CompatImpl.cs (1)
117public Net5CompatDerivedImpl(Random parent) : this(parent, Shared.Next()) { }
System.Threading.Tasks.Parallel (1)
System\Threading\Tasks\TaskReplicator.cs (1)
167return 100 + Random.Shared.Next(0, 50 * Environment.ProcessorCount);
Templates.Blazor.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
61private static char GetRandomLetter() => LetterChars[Random.Shared.Next(LetterChars.Length - 1)];
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
61private static char GetRandomLetter() => LetterChars[Random.Shared.Next(LetterChars.Length - 1)];
Templates.Blazor.WebAssembly.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
61private static char GetRandomLetter() => LetterChars[Random.Shared.Next(LetterChars.Length - 1)];
Templates.Mvc.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
61private static char GetRandomLetter() => LetterChars[Random.Shared.Next(LetterChars.Length - 1)];
Templates.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
61private static char GetRandomLetter() => LetterChars[Random.Shared.Next(LetterChars.Length - 1)];