883 references to string
AnalyzerRunner (1)
DiagnosticAnalyzerRunner.cs (1)
475var padding = new string(' ', longestAnalyzerName - analyzerName.Length);
Aspire.Dashboard.Components.Tests (1)
tests\Shared\Logging\XunitLoggerProvider.cs (1)
78var additionalLinePrefix = "|" + new string(' ', firstLinePrefix.Length - 1);
Aspire.Dashboard.Tests (5)
OtlpApiKeyAuthenticationHandlerTests.cs (4)
36var handler = await CreateAuthHandlerAsync(primaryApiKey: new string('!', 1000), secondaryApiKey: null, otlpApiKeyHeader: new string('!', 999)).DefaultTimeout(); 50var handler = await CreateAuthHandlerAsync(primaryApiKey: new string('!', 1000), secondaryApiKey: null, otlpApiKeyHeader: new string('!', 1000)).DefaultTimeout();
tests\Shared\Logging\XunitLoggerProvider.cs (1)
78var additionalLinePrefix = "|" + new string(' ', firstLinePrefix.Length - 1);
Aspire.Hosting.Docker.Tests (2)
EnvVarEscaperTests.cs (2)
65var input = new string('x', 1_000_001); 73var content = new string('x', 100_001);
Aspire.Hosting.Testing.Tests (1)
tests\Shared\Logging\XunitLoggerProvider.cs (1)
78var additionalLinePrefix = "|" + new string(' ', firstLinePrefix.Length - 1);
Aspire.Hosting.Tests (9)
Dashboard\DashboardServiceTests.cs (7)
46logger.LogInformation(new string('1', LongLineCharacters)); 47logger.LogInformation(new string('2', LongLineCharacters)); 48logger.LogInformation(new string('3', LongLineCharacters)); 99logger.LogInformation(new string('1', DashboardService.LogMaxBatchCharacters)); 101logger.LogInformation(new string('2', LongLineCharacters)); 102logger.LogInformation(new string('3', LongLineCharacters)); 103logger.LogInformation(new string('4', LongLineCharacters));
ModelNameTests.cs (1)
34var name = new string('a', 65);
tests\Shared\Logging\XunitLoggerProvider.cs (1)
78var additionalLinePrefix = "|" + new string(' ', firstLinePrefix.Length - 1);
Aspire.Playground.Tests (1)
tests\Shared\Logging\XunitLoggerProvider.cs (1)
78var additionalLinePrefix = "|" + new string(' ', firstLinePrefix.Length - 1);
BasicWebSite (1)
Controllers\TempDataController.cs (1)
95TempData["LargeValue"] = new string(character, size);
Binding.UDS.IntegrationTests (5)
UDSBindingTests.cs (5)
29string testString = new string('a', 3000); 66string testString = new string('a', 3000); 101string testString = new string('a', 3000); 147string testString = new string('a', 3000); 179string testString = new string('a', 3000);
BoundTreeGenerator (1)
BoundNodeClassWriter.cs (1)
109_writer.Write(new string(' ', _indent * 4));
BuildValidator (1)
DemoLogger.cs (1)
47Console.Write(new string(' ', _indent));
CodeGenerator (1)
FeatureCollectionGenerator.cs (1)
32{new string(' ', className.Length)}{feature}")}
CSharpSyntaxGenerator (1)
AbstractFileWriter.cs (1)
97_writer.Write(new string(' ', _indentLevel * INDENT_SIZE));
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\ToolConsole.cs (1)
402ToolConsole.WriteLine(new string(' ', _nameStart) + _name);
dotnet-svcutil-lib (4)
FrameworkFork\Microsoft.Xml\Xml\Dom\DocumentXmlWriter.cs (1)
315WriteString(new string(ch, 1));
FrameworkFork\Microsoft.Xml\Xml\schema\DtdParser.cs (2)
1537Throw(ResXml.Xml_ExpectingWhiteSpace, new string(_literalQuoteChar, 1), (int)_literalLineInfo.lineNo, (int)_literalLineInfo.linePos); 1554Throw(ResXml.Xml_ExpectingWhiteSpace, new string(_literalQuoteChar, 1), (int)_literalLineInfo.lineNo, (int)_literalLineInfo.linePos);
HelpGenerator.cs (1)
241s_helpBuilder.AppendLine(new string(' ', _nameStart) + _name);
dotnet-svcutil-lib.Tests (1)
ProjectUtils.cs (1)
118string indent = new string(' ', 12);
dotnet-user-jwts (2)
Helpers\ConsoleTable.cs (2)
94var rowDivider = $" {new string('-', columnHeaders.Length - 1)} "; 117outputRow = string.Concat(outputRow, rows[i][j], new string(' ', columnLengths[j] - rows[i][j].Length));
ExceptionHandlerSample (1)
Startup.cs (1)
32await context.Response.WriteAsync(new string(' ', 512)); // Padding for IE
FormatterWebSite (2)
Controllers\JsonFormatterController.cs (1)
36description = "This is long so we can test large objects " + new string('a', 1024 * 65),
Controllers\JsonOutputFormatterController.cs (1)
51Name = "This is long so we can test large objects " + new string('a', 1024 * 65),
GenerateDocumentationAndConfigFiles (1)
Program.cs (1)
1140var spacing = new string(' ', count: 15 - severity.Length);
http2cat (2)
src\Shared\Http2cat\Http2Utilities.cs (2)
33public static readonly string FourKHeaderValue = new string('a', 4096); 124public static readonly byte[] _maxData = Encoding.ASCII.GetBytes(new string('a', Http2PeerSettings.MinAllowedMaxFrameSize));
IdeBenchmarks (1)
RegexClassifierBenchmarks.cs (1)
63_ = """ + new string(element, element == '\\' ? 2 * length : length) + @""";
IIS.FunctionalTests (12)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Inprocess\MaxRequestBodySizeTests.cs (2)
87var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 100000000))); 108var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 10000)));
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (1)
279await EventLogHelpers.VerifyEventLogEventAsync(deploymentResult, EventLogHelpers.OutOfProcessFailedToStart(deploymentResult, new string('a', 30000)), Logger);
src\Servers\IIS\IIS\test\Common.FunctionalTests\MaxRequestBodySizeTests.cs (2)
88var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 100000000))); 109var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 10000)));
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (5)
162var content = new StringContent(new string('a', 100000)); 175var body = new string('a', 100000); 186var body = new string('a', 100000); 197var requestBody = new string('a', 10000); 643Assert.Equal(new string('a', query), await _fixture.Client.GetStringAsync($"/LargeResponseBody?length={query}"));
src\Shared\Http2cat\Http2Utilities.cs (2)
33public static readonly string FourKHeaderValue = new string('a', 4096); 124public static readonly byte[] _maxData = Encoding.ASCII.GetBytes(new string('a', Http2PeerSettings.MinAllowedMaxFrameSize));
IIS.LongTests (6)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (4)
1004var expectedLogString = new string('a', 16); 1007var expectedEventLogString = new string('a', 30000); 1030var expectedLogString = new string('a', 16); 1034var expectedEventLogString = new string('a', 30000);
src\Shared\Http2cat\Http2Utilities.cs (2)
33public static readonly string FourKHeaderValue = new string('a', 4096); 124public static readonly byte[] _maxData = Encoding.ASCII.GetBytes(new string('a', Http2PeerSettings.MinAllowedMaxFrameSize));
IIS.NewHandler.FunctionalTests (6)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (4)
1004var expectedLogString = new string('a', 16); 1007var expectedEventLogString = new string('a', 30000); 1030var expectedLogString = new string('a', 16); 1034var expectedEventLogString = new string('a', 30000);
src\Shared\Http2cat\Http2Utilities.cs (2)
33public static readonly string FourKHeaderValue = new string('a', 4096); 124public static readonly byte[] _maxData = Encoding.ASCII.GetBytes(new string('a', Http2PeerSettings.MinAllowedMaxFrameSize));
IIS.NewShim.FunctionalTests (6)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (4)
1004var expectedLogString = new string('a', 16); 1007var expectedEventLogString = new string('a', 30000); 1030var expectedLogString = new string('a', 16); 1034var expectedEventLogString = new string('a', 30000);
src\Shared\Http2cat\Http2Utilities.cs (2)
33public static readonly string FourKHeaderValue = new string('a', 4096); 124public static readonly byte[] _maxData = Encoding.ASCII.GetBytes(new string('a', Http2PeerSettings.MinAllowedMaxFrameSize));
IIS.Tests (2)
MaxRequestBodySizeTests.cs (2)
239var payload = new string('A', payloadSize); 302new string('a', 4097),
IISExpress.FunctionalTests (16)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Inprocess\MaxRequestBodySizeTests.cs (2)
87var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 100000000))); 108var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 10000)));
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (1)
279await EventLogHelpers.VerifyEventLogEventAsync(deploymentResult, EventLogHelpers.OutOfProcessFailedToStart(deploymentResult, new string('a', 30000)), Logger);
src\Servers\IIS\IIS\test\Common.FunctionalTests\MaxRequestBodySizeTests.cs (2)
88var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 100000000))); 109var result = await deploymentResult.HttpClient.PostAsync("/ReadRequestBodyLarger", new StringContent(new string('a', 10000)));
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (5)
162var content = new StringContent(new string('a', 100000)); 175var body = new string('a', 100000); 186var body = new string('a', 100000); 197var requestBody = new string('a', 10000); 643Assert.Equal(new string('a', query), await _fixture.Client.GetStringAsync($"/LargeResponseBody?length={query}"));
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (4)
1004var expectedLogString = new string('a', 16); 1007var expectedEventLogString = new string('a', 30000); 1030var expectedLogString = new string('a', 16); 1034var expectedEventLogString = new string('a', 30000);
src\Shared\Http2cat\Http2Utilities.cs (2)
33public static readonly string FourKHeaderValue = new string('a', 4096); 124public static readonly byte[] _maxData = Encoding.ASCII.GetBytes(new string('a', Http2PeerSettings.MinAllowedMaxFrameSize));
illink (1)
ILLink.RoslynAnalyzer (1)
TrimAnalysis\TrimDataFlowAnalysis.cs (1)
173 TraceWrite (new string ('\t', level));
InMemory.FunctionalTests (71)
ChunkedRequestTests.cs (6)
282Assert.Equal(new string('a', requestsReceived), request.GetTrailer("X-Trailer-Header").ToString()); 330string.Concat("X-Trailer-Header: ", new string('a', i)), 413Assert.Equal(new string('a', requestsReceived), request.GetTrailer("X-Trailer-Header").ToString()); 461string.Concat("X-Trailer-Header: ", new string('a', i)), 596Assert.Equal(new string('a', requestsReceived), request.GetTrailer("X-Trailer-Header").ToString()); 635string.Concat("X-Trailer-Header: ", new string('a', i)),
ChunkedResponseTests.cs (18)
158var expectedString = new string('a', 10000); 179new string('a', 3986), 181new string('a', 4089), 183new string('a', 1925), 198var expectedString = new string('a', length); 224new string('a', length), 240var expectedString = new string('a', partialLength); 265new string('a', partialLength), 670var fisrtPartOfResponse = Encoding.ASCII.GetBytes(new string('a', memory.Length)); 699new string('a', length.Value), 726var fisrtPartOfResponse = Encoding.ASCII.GetBytes(new string('a', memory.Length)); 755new string('a', length.Value), 782var fisrtPartOfResponse = Encoding.ASCII.GetBytes(new string('a', length)); 812new string('a', length), 1077var fisrtPartOfResponse = Encoding.ASCII.GetBytes(new string('a', writeSize)); 1096new string('a', writeSize), 1116var fisrtPartOfResponse = Encoding.ASCII.GetBytes(new string('a', writeSize)); 1135new string('a', writeSize),
Http2\Http2ConnectionTests.cs (5)
2002await context.Response.WriteAsync(new string('!', 65536)); 3072new KeyValuePair<string, string>(InternalHeaderNames.Method, new string('A', 8192 / 2)), 3073new KeyValuePair<string, string>(InternalHeaderNames.Path, "/" + new string('A', 8192 / 2)), 3906context.Response.Headers["A"] = new string('a', headerValueLength); 3907context.Response.Headers["B"] = new string('b', headerValueLength);
Http2\Http2StreamTests.cs (22)
780new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET" + new string('a', 1024 * 3)), 781new KeyValuePair<string, string>(InternalHeaderNames.Path, "/Hello/How/Are/You/" + new string('a', 1024 * 3)), 783new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost" + new string('a', 1024 * 3) + ":80"), 2400var largeHeader = new string('a', 1024 * 3); 2593var trailerValue = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); 2635var trailerValue = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); 2728var trailerValue = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); 2787var trailerValue = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); 2842var value = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); 3529context.Response.Headers.ETag = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); 3565context.Response.Headers.ETag = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); 3566context.Response.Headers.TE = new string('a', 30); 3603context.Response.Headers.ETag = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); 3604context.Response.Headers.TE = new string('b', (int)Http2PeerSettings.DefaultMaxFrameSize); 3654context.Response.Headers.ETag = new string('a', 17002); 3712var longHeaderName = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); 3752var headerValue = new string('a', frameSize * count); // 1 MB value 3972var fisrtPartOfResponse = Encoding.ASCII.GetBytes(new string('a', memory.Length)); 4006Assert.Equal(Encoding.ASCII.GetBytes(new string('a', 4102)), dataFrame.PayloadSequence.ToArray()); 4025var fisrtPartOfResponse = Encoding.ASCII.GetBytes(new string('a', memory.Length)); 4059Assert.Equal(Encoding.ASCII.GetBytes(new string('a', 4102)), dataFrame.PayloadSequence.ToArray()); 5924var fisrtPartOfResponse = Encoding.ASCII.GetBytes(new String('a', sizeHint));
Http2\Http2TestBase.cs (2)
36protected static readonly string _4kHeaderValue = new string('a', 4096); 113protected static readonly byte[] _maxData = Encoding.ASCII.GetBytes(new string('a', Http2PeerSettings.MinAllowedMaxFrameSize));
Http3\Http3StreamTests.cs (8)
135new KeyValuePair<string, string>("test", new string('a', 1024 * 32 + 1)) 534new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET" + new string('a', 1024 * 3)), 535new KeyValuePair<string, string>(InternalHeaderNames.Path, "/Hello/How/Are/You/" + new string('a', 1024 * 3)), 537new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost" + new string('a', 1024 * 3) + ":80"), 2759new KeyValuePair<string, string>(InternalHeaderNames.Method, new string('A', 8192 / 2)), 2760new KeyValuePair<string, string>(InternalHeaderNames.Path, "/" + new string('A', 8192 / 2)), 2806context.Response.Headers["BigHeader"] = new string('!', 100); 3090var sendTask = requestStream.SendDataAsync(Encoding.ASCII.GetBytes(new string('a', sendSize)));
Http3\Http3TestBase.cs (2)
20protected static readonly string _4kHeaderValue = new string('a', 4096); 22protected static readonly byte[] _maxData = Encoding.ASCII.GetBytes(new string('a', 16 * 1024));
HttpsConnectionMiddlewareTests.cs (3)
893var expectedBody = new string('a', 1024 * 4); 1029var expectedBody = new string('a', 1024 * 4); 1076var expectedBody = new string('a', 1024 * 4);
MaxRequestBodySizeTests.cs (1)
285var payload = new string('A', payloadSize);
ResponseTests.cs (2)
3394var expectedString = new string('a', expectedLength); 3424var expectedString = new string('a', expectedLength);
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
34protected static readonly string _4kHeaderValue = new string('a', 4096); 36protected static readonly byte[] _maxData = Encoding.ASCII.GetBytes(new string('a', 16 * 1024));
InProcessWebSite (7)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Program.cs (5)
30Console.WriteLine(new string('a', 30000)); 33Console.Error.WriteLine(new string('a', 30000)); 44Console.WriteLine(new string('a', 31000)); 47Console.Error.WriteLine(new string('a', 31000)); 93Console.WriteLine(new string('a', 40000));
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (2)
421await ctx.Response.WriteAsync(new string('a', length)); 958var fileContent = new string('a', 200000);
Interop.FunctionalTests (13)
Http2\Http2RequestTests.cs (2)
165var longKey = "key-" + new string('$', largeKey ? 128 * 1024 : 1); 166var longValue = "value-" + new string('!', largeValue ? 128 * 1024 : 1);
Http3\Http3RequestTests.cs (2)
1348feature.Trailers.Append($"trailer-{i}", new string('!', i)); 1388Assert.Equal(new string('!', i), value);
HttpClientHttp2InteropTests.cs (9)
1026var oneKbString = new string('a', 1024); 1078var oneKbString = new string('a', 1024); 1130var oneKbString = new string('a', 1024); 1347var oneKbString = new string('a', 1024); 1380var oneKbString = new string('a', 1024); 1437var oneKbString = new string('a', 1024); 1466var oneKbString = new string('a', 1024); 1471await context.Response.WriteAsync(new string('a', 1023)).DefaultTimeout(); 1523var oneKbString = new string('a', 1024);
IOperationGenerator (1)
IOperationClassWriter.cs (1)
52_writer.Write(new string(' ', _indent * 4));
LargeResponseApp (1)
Startup.cs (1)
19private static readonly byte[] _chunk = Encoding.UTF8.GetBytes(new string('a', _chunkSize));
Microsoft.Arcade.Common (1)
CompactConsoleLoggerFormatter.cs (1)
46_messagePadding = new string(' ', GetLogLevelString(LogLevel.Information).Length + LoglevelPadding.Length + (_options.TimestampFormat?.Length ?? 0));
Microsoft.AspNetCore.Authentication.Test (10)
JwtBearerTests.cs (5)
50var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128))); 87var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128))); 919var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128))); 964var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128))); 1276var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128)));
JwtBearerTests_Handler.cs (5)
42var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128))); 78var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128))); 864var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128))); 908var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128))); 1343var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128)));
Microsoft.AspNetCore.Components.Forms.Tests (3)
ReverseStringBuilderTest.cs (3)
101var firstChunk = new string('A', InitialBufferSize - 10); 102var secondChunk = new string('B', 20); 148expected = new string(c, ReverseStringBuilder.MinimumRentedArraySize) + expected;
Microsoft.AspNetCore.Components.Tests (2)
SupplyParameterFromPersistentComponentStateValueProviderTests.cs (2)
234{ new string('a', 10000), new string('b', 10000) },
Microsoft.AspNetCore.Components.WebAssembly (1)
Services\WebAssemblyConsoleLogger.cs (1)
16private static readonly string _messagePadding = new(' ', GetLogLevelString(LogLevel.Information).Length + _loglevelPadding.Length);
Microsoft.AspNetCore.CookiePolicy.Test (1)
CookiePolicyTests.cs (1)
427new ClaimsPrincipal(new ClaimsIdentity(new GenericIdentity(new string('c', 1024 * 5), "Cookies"))));
Microsoft.AspNetCore.Cryptography.KeyDerivation.Tests (1)
Pbkdf2Tests.cs (1)
192string password = new String('x', 50000); // 50,000 char password
Microsoft.AspNetCore.Diagnostics (1)
StatusCodePage\StatusCodePagesOptions.cs (1)
43var internetExplorerWorkaround = new string(' ', 500);
Microsoft.AspNetCore.Diagnostics.Tests (1)
ExceptionHandlerTest.cs (1)
170await context.Response.WriteAsync(new string('a', 100));
Microsoft.AspNetCore.Http.Connections.Tests (2)
ServerSentEventsTests.cs (2)
98string hText = new string('H', 60000); 99string wText = new string('W', 60000);
Microsoft.AspNetCore.Http.Extensions.Tests (2)
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (2)
964httpContext.Request.Body = new MemoryStream(Encoding.UTF8.GetBytes(new string('x', 2049))); 1001httpContext.Request.Body = new MemoryStream(Encoding.UTF8.GetBytes(new string('x', 2049)));
Microsoft.AspNetCore.HttpLogging.Tests (17)
HttpLoggingMiddlewareTests.cs (17)
31variations.Add(new string('a', 4097)); 32variations.Add(new string('b', 10000)); 33variations.Add(new string('あ', 10000)); 396var input = string.Concat(new string('あ', 5)); 433var input = string.Concat(new string('a', 60000), new string('b', 3000)); 469var input = string.Concat(new string('a', 60000), new string('b', 3000)); 494var input = string.Concat(new string('a', 60000), new string('b', 3000)); 527var expected = new string('a', 1000); 562var expected = new string('a', 1000); 600var expected = new string('a', 1000); 638var expected = new string('a', 1000); 677var expected = new string('a', 1000); 1065var input = string.Concat(new string('a', 30000), new string('b', 3000));
Microsoft.AspNetCore.InternalTesting (1)
Logging\XunitLoggerProvider.cs (1)
80var additionalLinePrefix = "|" + new string(' ', firstLinePrefix.Length - 1);
Microsoft.AspNetCore.InternalTesting.Tests (5)
AssemblyTestLogTests.cs (5)
274var longTestName = new string('0', 50) + new string('1', 50) + new string('2', 50) + 275new string('3', 50) + new string('4', 50);
Microsoft.AspNetCore.Mvc.Core.Test (64)
ContentResultTest.cs (63)
151{ new string('a', DefaultCharacterChunkSize), "text/plain; charset=utf-8" }, 152{ new string('a', DefaultCharacterChunkSize - 1), "text/plain; charset=utf-8" }, 153{ new string('a', DefaultCharacterChunkSize + 1), "text/plain; charset=utf-8" }, 154{ new string('a', DefaultCharacterChunkSize - 2), "text/plain; charset=utf-8" }, 155{ new string('a', DefaultCharacterChunkSize + 2), "text/plain; charset=utf-8" }, 156{ new string('a', DefaultCharacterChunkSize - 3), "text/plain; charset=utf-8" }, 157{ new string('a', DefaultCharacterChunkSize + 3), "text/plain; charset=utf-8" }, 158{ new string('a', DefaultCharacterChunkSize * 2), "text/plain; charset=utf-8" }, 159{ new string('a', DefaultCharacterChunkSize * 3), "text/plain; charset=utf-8" }, 160{ new string('a', (DefaultCharacterChunkSize * 2) - 1), "text/plain; charset=utf-8" }, 161{ new string('a', (DefaultCharacterChunkSize * 2) - 2), "text/plain; charset=utf-8" }, 162{ new string('a', (DefaultCharacterChunkSize * 2) - 3), "text/plain; charset=utf-8" }, 163{ new string('a', (DefaultCharacterChunkSize * 2) + 1), "text/plain; charset=utf-8" }, 164{ new string('a', (DefaultCharacterChunkSize * 2) + 2), "text/plain; charset=utf-8" }, 165{ new string('a', (DefaultCharacterChunkSize * 2) + 3), "text/plain; charset=utf-8" }, 166{ new string('a', (DefaultCharacterChunkSize * 3) - 1), "text/plain; charset=utf-8" }, 167{ new string('a', (DefaultCharacterChunkSize * 3) - 2), "text/plain; charset=utf-8" }, 168{ new string('a', (DefaultCharacterChunkSize * 3) - 3), "text/plain; charset=utf-8" }, 169{ new string('a', (DefaultCharacterChunkSize * 3) + 1), "text/plain; charset=utf-8" }, 170{ new string('a', (DefaultCharacterChunkSize * 3) + 2), "text/plain; charset=utf-8" }, 171{ new string('a', (DefaultCharacterChunkSize * 3) + 3), "text/plain; charset=utf-8" }, 173{ new string('色', DefaultCharacterChunkSize), "text/plain; charset=utf-16" }, 174{ new string('色', DefaultCharacterChunkSize - 1), "text/plain; charset=utf-16" }, 175{ new string('色', DefaultCharacterChunkSize + 1), "text/plain; charset=utf-16" }, 176{ new string('色', DefaultCharacterChunkSize - 2), "text/plain; charset=utf-16" }, 177{ new string('色', DefaultCharacterChunkSize + 2), "text/plain; charset=utf-16" }, 178{ new string('色', DefaultCharacterChunkSize - 3), "text/plain; charset=utf-16" }, 179{ new string('色', DefaultCharacterChunkSize + 3), "text/plain; charset=utf-16" }, 180{ new string('色', DefaultCharacterChunkSize * 2), "text/plain; charset=utf-16" }, 181{ new string('色', DefaultCharacterChunkSize * 3), "text/plain; charset=utf-16" }, 182{ new string('色', (DefaultCharacterChunkSize * 2) - 1), "text/plain; charset=utf-16" }, 183{ new string('色', (DefaultCharacterChunkSize * 2) - 2), "text/plain; charset=utf-16" }, 184{ new string('色', (DefaultCharacterChunkSize * 2) - 3), "text/plain; charset=utf-16" }, 185{ new string('色', (DefaultCharacterChunkSize * 2) + 1), "text/plain; charset=utf-16" }, 186{ new string('色', (DefaultCharacterChunkSize * 2) + 2), "text/plain; charset=utf-16" }, 187{ new string('色', (DefaultCharacterChunkSize * 2) + 3), "text/plain; charset=utf-16" }, 188{ new string('色', (DefaultCharacterChunkSize * 3) - 1), "text/plain; charset=utf-16" }, 189{ new string('色', (DefaultCharacterChunkSize * 3) - 2), "text/plain; charset=utf-16" }, 190{ new string('色', (DefaultCharacterChunkSize * 3) - 3), "text/plain; charset=utf-16" }, 191{ new string('色', (DefaultCharacterChunkSize * 3) + 1), "text/plain; charset=utf-16" }, 192{ new string('色', (DefaultCharacterChunkSize * 3) + 2), "text/plain; charset=utf-16" }, 193{ new string('色', (DefaultCharacterChunkSize * 3) + 3), "text/plain; charset=utf-16" }, 195{ new string('色', DefaultCharacterChunkSize), "text/plain; charset=utf-32" }, 196{ new string('色', DefaultCharacterChunkSize - 1), "text/plain; charset=utf-32" }, 197{ new string('色', DefaultCharacterChunkSize + 1), "text/plain; charset=utf-32" }, 198{ new string('色', DefaultCharacterChunkSize - 2), "text/plain; charset=utf-32" }, 199{ new string('色', DefaultCharacterChunkSize + 2), "text/plain; charset=utf-32" }, 200{ new string('色', DefaultCharacterChunkSize - 3), "text/plain; charset=utf-32" }, 201{ new string('色', DefaultCharacterChunkSize + 3), "text/plain; charset=utf-32" }, 202{ new string('色', DefaultCharacterChunkSize * 2), "text/plain; charset=utf-32" }, 203{ new string('色', DefaultCharacterChunkSize * 3), "text/plain; charset=utf-32" }, 204{ new string('色', (DefaultCharacterChunkSize * 2) - 1), "text/plain; charset=utf-32" }, 205{ new string('色', (DefaultCharacterChunkSize * 2) - 2), "text/plain; charset=utf-32" }, 206{ new string('色', (DefaultCharacterChunkSize * 2) - 3), "text/plain; charset=utf-32" }, 207{ new string('色', (DefaultCharacterChunkSize * 2) + 1), "text/plain; charset=utf-32" }, 208{ new string('色', (DefaultCharacterChunkSize * 2) + 2), "text/plain; charset=utf-32" }, 209{ new string('色', (DefaultCharacterChunkSize * 2) + 3), "text/plain; charset=utf-32" }, 210{ new string('色', (DefaultCharacterChunkSize * 3) - 1), "text/plain; charset=utf-32" }, 211{ new string('色', (DefaultCharacterChunkSize * 3) - 2), "text/plain; charset=utf-32" }, 212{ new string('色', (DefaultCharacterChunkSize * 3) - 3), "text/plain; charset=utf-32" }, 213{ new string('色', (DefaultCharacterChunkSize * 3) + 1), "text/plain; charset=utf-32" }, 214{ new string('色', (DefaultCharacterChunkSize * 3) + 2), "text/plain; charset=utf-32" }, 215{ new string('色', (DefaultCharacterChunkSize * 3) + 3), "text/plain; charset=utf-32" },
Infrastructure\JsonResultExecutorTestBase.cs (1)
272var model = Enumerable.Range(0, 1000).Select(p => new TestModel { Property = new string('a', 5000) }).ToArray();
Microsoft.AspNetCore.Mvc.FunctionalTests (10)
FlushPointTest.cs (2)
52var expected = new string('a', 1024 * 1024); 65var expected = new string('a', 1024 * 1024);
JsonOutputFormatterTestBase.cs (1)
167var expectedName = "This is long so we can test large objects " + new string('a', 1024 * 65);
NewtonsoftJsonOutputFormatterTest.cs (1)
21description = "This is long so we can test large objects " + new string('a', 1024 * 65),
RequestFormLimitsTest.cs (1)
113kvps.Add(new KeyValuePair<string, string>("key1", new string('a', 1024)));
RequestSizeLimitTest.cs (2)
42kvps.Add(new KeyValuePair<string, string>("SampleString", new string('p', 1024))); 80var expected = $"{{\"sampleInt\":10,\"sampleString\":\"{new string('p', 1024)}\"}}";
SimpleWithWebApplicationBuilderTests.cs (2)
264content.Add(new StringContent(new string('a', 42)), "file", "file.txt"); 286content.Add(new StringContent(new string('a', 42)), "file", "file.txt");
TempDataInCookiesTest.cs (1)
62var expected = new string(character, size);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
NewtonsoftJsonOutputFormatterTest.cs (1)
374var model = Enumerable.Range(0, 1000).Select(p => new User { FullName = new string('a', 5000) });
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (1)
272var model = Enumerable.Range(0, 1000).Select(p => new TestModel { Property = new string('a', 5000) }).ToArray();
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (11)
Buffers\PagedCharBufferTest.cs (9)
30var stringToAppend = new string('a', PagedCharBuffer.PageSize); 185var laterString = new string('d', PagedCharBuffer.PageSize); 215var laterString = new string('d', PagedCharBuffer.PageSize); 244var laterString = new string('d', PagedCharBuffer.PageSize); 335var laterChars = new string('d', PagedCharBuffer.PageSize).ToCharArray(); 365var laterChars = new string('d', PagedCharBuffer.PageSize).ToCharArray(); 394var laterChars = new string('d', PagedCharBuffer.PageSize).ToCharArray(); 464buffer.Append(new string('a', PagedCharBuffer.PageSize)); 465buffer.Append(new string('b', 10));
ViewComponentResultTest.cs (1)
440var expected = new string('a', 64 * 1024 * 1024);
ViewExecutorTest.cs (1)
341var text = new string('a', writeLength);
Microsoft.AspNetCore.OutputCaching.Tests (7)
OutputCacheMiddlewareTests.cs (7)
613await context.HttpContext.Response.WriteAsync(new string('0', 20)); 642await context.HttpContext.Response.WriteAsync(new string('0', 10)); 674await context.HttpContext.Response.WriteAsync(new string('0', 10)); 700await context.HttpContext.Response.WriteAsync(new string('0', 10)); 724await context.HttpContext.Response.WriteAsync(new string('0', 10)); 745await context.HttpContext.Response.WriteAsync(new string('0', 10)); 772await context.HttpContext.Response.WriteAsync(new string('0', 101));
Microsoft.AspNetCore.ResponseCaching.Tests (7)
ResponseCachingMiddlewareTests.cs (7)
698await context.HttpContext.Response.WriteAsync(new string('0', 20)); 727await context.HttpContext.Response.WriteAsync(new string('0', 10)); 759await context.HttpContext.Response.WriteAsync(new string('0', 10)); 785await context.HttpContext.Response.WriteAsync(new string('0', 10)); 811await context.HttpContext.Response.WriteAsync(new string('0', 10)); 832await context.HttpContext.Response.WriteAsync(new string('0', 10)); 860await context.HttpContext.Response.WriteAsync(new string('0', 101));
Microsoft.AspNetCore.ResponseCompression.Tests (12)
ResponseCompressionMiddlewareTest.cs (12)
167return context.Response.WriteAsync(new string('a', 100)); 462return context.Response.WriteAsync(new string('a', 100)); 525return context.Response.WriteAsync(new string('a', 100)); 588return context.Response.WriteAsync(new string('a', 100)); 642await context.Response.WriteAsync(new string('a', 100)); 688await context.Response.WriteAsync(new string('a', 100)); 790await context.Response.WriteAsync(new string('a', 10)); 793await context.Response.WriteAsync(new string('a', 90)); 1151await context.Response.WriteAsync(new string('a', 100)); 1199await context.Response.WriteAsync(new string('a', 10)); 1202await context.Response.WriteAsync(new string('a', 90)); 1268return context.Response.WriteAsync(new string('a', uncompressedBodyLength));
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (8)
ResponseTrailersTests.cs (6)
292new string('a', 1024), 293new string('b', 1024 * 4), 294new string('c', 1024 * 8), 295new string('d', 1024 * 16), 296new string('e', 1024 * 32), 297new string('f', 1024 * 64 - 1) }; // Max header size
src\Shared\Http2cat\Http2Utilities.cs (2)
33public static readonly string FourKHeaderValue = new string('a', 4096); 124public static readonly byte[] _maxData = Encoding.ASCII.GetBytes(new string('a', Http2PeerSettings.MinAllowedMaxFrameSize));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (21)
Http1\Http1ConnectionTests.cs (2)
717var payload = Encoding.UTF8.GetBytes("hello, web browser" + new string(' ', 512) + "\n"); 731var payload = Encoding.UTF8.GetBytes("hello, web browser" + new string(' ', 512) + "\n");
Http2\Http2HPackEncoderTests.cs (5)
381headers.Append("x-Custom", new string('!', (int)Http2PeerSettings.DefaultHeaderTableSize)); 605headers.Cookie = new string('a', buffer.Length + 1); 620headers.Cookie = new string('a', buffer.Length + 1); 635headers.Cookie = new string('a', buffer.Length - 1); 651headers.Cookie = new string('a', buffer.Length - 1);
HttpParserTests.cs (1)
702var headers = $"Host: {new string('a', stringLength)}\r\nConnection: keep-alive\r\n\r\n";
MessageBodyTests.cs (1)
524var largeInput = new string('a', 8192);
PipelineExtensionTests.cs (2)
155writer.WriteAscii(new string((char)i, 1)); 179var testString = new string(' ', stringLength);
src\Shared\test\Shared.Tests\runtime\Http2\HPackDecoderTest.cs (6)
685string string8193 = new string('a', MaxHeaderFieldSize + 1); 703string string8191 = new string('a', MaxHeaderFieldSize - 1); 704string string8193 = new string('a', MaxHeaderFieldSize + 1); 705string string8194 = new string('a', MaxHeaderFieldSize + 2); 738string string8193 = new string('a', MaxHeaderFieldSize + 1); 761string string8193 = new string('a', MaxHeaderFieldSize + 1);
src\Shared\test\Shared.Tests\runtime\Http3\QPackDecoderTest.cs (4)
166QPackEncoder.EncodeLiteralHeaderFieldWithoutNameReference(":method", new string('A', 8192 / 2), buffer.Slice(length), out int bytesWritten); 168QPackEncoder.EncodeLiteralHeaderFieldWithoutNameReference(":path", new string('A', 8192 / 2), buffer.Slice(length), out bytesWritten); 175new KeyValuePair<string, string>(":method", new string('A', 8192 / 2)), 176new KeyValuePair<string, string>(":path", new string('A', 8192 / 2)),
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (8)
Http1ReadingBenchmark.cs (1)
33private readonly byte[] _readData = Encoding.ASCII.GetBytes(new string('a', 100));
Http2\HPackDecoderBenchmark.cs (1)
45string string8193 = new string('a', 8193);
Http2\Http2ConnectionEmptyBenchmark.cs (1)
21_responseData = new string('!', ResponseDataLength);
Http2\Http2FrameWriterBenchmark.cs (1)
64headers.Add("my", new string('a', value * 1024));
Http3\Http3ConnectionEmptyBenchmark.cs (1)
21_responseData = new string('!', ResponseDataLength);
Http3\QPackDecoderBenchmark.cs (1)
48var s = new string(c, 8193);
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
34protected static readonly string _4kHeaderValue = new string('a', 4096); 36protected static readonly byte[] _maxData = Encoding.ASCII.GetBytes(new string('a', 16 * 1024));
Microsoft.AspNetCore.Session (1)
CookieProtection.cs (1)
64return text + new string('=', padding);
Microsoft.AspNetCore.Shared.Tests (10)
runtime\Http2\HPackDecoderTest.cs (6)
685string string8193 = new string('a', MaxHeaderFieldSize + 1); 703string string8191 = new string('a', MaxHeaderFieldSize - 1); 704string string8193 = new string('a', MaxHeaderFieldSize + 1); 705string string8194 = new string('a', MaxHeaderFieldSize + 2); 738string string8193 = new string('a', MaxHeaderFieldSize + 1); 761string string8193 = new string('a', MaxHeaderFieldSize + 1);
runtime\Http3\QPackDecoderTest.cs (4)
166QPackEncoder.EncodeLiteralHeaderFieldWithoutNameReference(":method", new string('A', 8192 / 2), buffer.Slice(length), out int bytesWritten); 168QPackEncoder.EncodeLiteralHeaderFieldWithoutNameReference(":path", new string('A', 8192 / 2), buffer.Slice(length), out bytesWritten); 175new KeyValuePair<string, string>(":method", new string('A', 8192 / 2)), 176new KeyValuePair<string, string>(":path", new string('A', 8192 / 2)),
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
HubConnectionTests.cs (1)
2823var result = await connection.InvokeAsync<string>(nameof(TestHub.Echo), new string('x', 500)).DefaultTimeout();
Microsoft.AspNetCore.SignalR.Microbenchmarks (3)
HubProtocolBenchmark.cs (1)
51_hubMessage = new InvocationMessage("Target", new object[] { new string('F', 10240), new byte[10240] });
ServerSentEventsBenchmark.cs (2)
54hubMessage = new InvocationMessage("Target", new object[] { new string('F', 10240), new string('B', 10240) });
Microsoft.AspNetCore.SignalR.Tests (2)
EndToEndTests.cs (1)
317var message = new string('A', length);
HubConnectionHandlerTests.cs (1)
5227await client.InvokeAsync(nameof(MethodHub.Echo), new object[] { new string('x', 500) }).DefaultTimeout();
Microsoft.AspNetCore.TestHost.Tests (4)
ClientHandlerTests.cs (3)
547throw new InvalidOperationException(new string('a', 1024 * 32)); 563throw new InvalidOperationException(new string('a', 1024 * 32)); 579throw new InvalidOperationException(new string('a', 1024 * 32));
TestClientTests.cs (1)
386await requestStream.WriteAsync(Encoding.UTF8.GetBytes(new string('!', 1024 * 1024 * 50))).AsTask().DefaultTimeout();
Microsoft.AspNetCore.WebSockets.Tests (4)
WebSocketMiddlewareTests.cs (4)
114var originalData = Encoding.UTF8.GetBytes(new string('a', 130)); 140var originalData = Encoding.UTF8.GetBytes(new string('a', 0x1FFFF)); 245var originalData = Encoding.UTF8.GetBytes(new string('a', 130)); 270var originalData = Encoding.UTF8.GetBytes(new string('a', 0x1FFFF));
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (3)
MultipartReaderBenchmark.cs (3)
52$"text default{new string('a', LargePayload ? 10000000 : 0)}\r\n" + 64$"Content of a.txt.{new string('a', LargePayload ? 10000000 : 0)}\r\n" + 77$"Content of a.txt{new string('a', LargePayload ? 10000000 : 0)}\r\n" +
Microsoft.AspNetCore.WebUtilities.Tests (25)
FormPipeReaderTests.cs (2)
358var readOnlySequence = ReadOnlySequenceFactory.SegmentPerByteFactory.CreateWithContent(encoding.GetBytes("foo=bar&baz=bo" + new string('a', 128))); 369Assert.Equal("bo" + new string('a', 128), dict["baz"]);
HttpResponseStreamWriterTest.cs (21)
74await writer.WriteAsync(new string('a', byteLength)); 95await writer.WriteAsync(new string('a', byteLength)); 131writer.Write(new string('a', byteLength)); 169await writer.WriteAsync(new string('a', byteLength)); 191await writer.WriteAsync(new string('a', byteLength)); 243writer.Write((new string('a', byteLength)).ToCharArray()); 265var array = new string('a', byteLength).ToCharArray(); 299var array = new string('a', byteLength).ToCharArray(); 346await writer.WriteAsync((new string('a', byteLength)).ToCharArray()); 369var array = new string('a', byteLength).ToCharArray(); 420writer.NewLine = new string('\n', newLineLength); 425var array = new string('a', byteLength).ToCharArray(); 480writer.NewLine = new string('\n', newLineLength); 502writer.NewLine = new string('\n', newLineLength); 524writer.NewLine = new string('\n', newLineLength); 548writer.NewLine = new string('\n', newLineLength); 584var content = new string('a', charCount); 587writer.NewLine = new string('\n', newLineLength); 609writer.NewLine = new string('\n', newLineLength); 663string data = new string(character, charCount); 715var content = new string('a', characterSize - 1) + "𐐀";
MultipartReaderTests.cs (2)
152var body = $"preamble {new string('a', 17000)}\r\n" + 167var body = $"preamble {new string('a', 100_000)}\r\n" +
Microsoft.Build (7)
BackEnd\Components\Scheduler\Scheduler.cs (3)
2482string durationBar = new string(barSegment, durationElementCount / scale); 2527new String(' ', postPad), 2806new string(' ', indent * 2),
Evaluation\Evaluator.cs (1)
821string line = new string('#', 100) + "\n";
Logging\ParallelLogger\ParallelConsoleLogger.cs (3)
829WriteMessageAligned(new string(' ', 2 * tabWidth) + itemSpec, prefixAlreadyWritten: false); 834WriteMessageAligned($"{new string(' ', 4 * tabWidth)}{name} = {value}", prefixAlreadyWritten: false); 900WriteMessageAligned($"{new String(' ', 4 * tabWidth)}{metadatum.Key} = {item.GetMetadata(metadatum.Key as string)}", false);
Microsoft.Build.BuildCheck.UnitTests (4)
ExecCliBuildCheck_Tests.cs (4)
47string.Join(";", new string('a', 1025), "dotnet build", new string('a', 1025)), 48string.Join(";", new string('a', RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? MaxStackSizeWindows * 2 : MaxStackSizeLinux * 2), "dotnet build")); 58new string('a', RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? MaxStackSizeWindows * 2 : MaxStackSizeLinux * 2));
Microsoft.Build.Engine.OM.UnitTests (1)
Definition\Project_Tests.cs (1)
3322var longString = new string('a', 1000);
Microsoft.Build.Engine.UnitTests (16)
CommunicationUtilities_Tests.cs (1)
43string testValue = new string('a', 1_000_000);
ConsoleOutputAlignerTests.cs (1)
47string input = new string('.', sizeOfMessage);
Construction\ElementLocation_Tests.cs (1)
107File.WriteAllText(file, ObjectModelHelpers.CleanupFileContents("<Project xmlns='msbuildnamespace' ToolsVersion='msbuilddefaulttoolsversion'>\r\n<ItemGroup>") + new string(' ', 70000) + @"<x/></ItemGroup></Project>");
Definition\ToolsVersion_Tests.cs (1)
115string tooLong = "c:\\" + new string('C', 6000);
Evaluation\Expander_Tests.cs (1)
1060<x Include='" + new string('x', 250) + @"'>
ExpressionTreeExpression_Tests.cs (8)
164"1" + new String('0', 500) + "==" + "1" + new String('0', 500), /* too big for double, eval as string */ 165"'1" + new String('0', 500) + "'=='" + "1" + new String('0', 500) + "'" /* too big for double, eval as string */ 220"1" + new String('0', 500) + "==2", /* too big for double, eval as string */ 221"'1" + new String('0', 500) + "'=='2'", /* too big for double, eval as string */ 222"'1" + new String('0', 500) + "'=='01" + new String('0', 500) + "'" /* too big for double, eval as string */
FileUtilities_Tests.cs (1)
500string longPart = new string('x', 300);
FileUtilitiesRegex_Tests.cs (2)
16private string _directoryStart = new string(MSBuildConstants.BackslashChar[0], 2); 17private string _altDirectoryStart = new string(MSBuildConstants.ForwardSlash[0], 2);
Microsoft.Build.Tasks.UnitTests (11)
FileStateTests.cs (3)
36new FileState(new String('x', 5000)); 50delegate () { var x = new FileInfo(new String('x', 5000)).LastWriteTime; }, 51delegate () { var x = new FileState(new String('x', 5000)).LastWriteTime; });
Hash_Tests.cs (1)
95.Select(cnt => new string('a', cnt))
StreamMappedString_Tests.cs (7)
38Stream stream = StreamHelpers.StringToStream("A" + new String('b', StreamMappedString.DefaultPageSize * 4)); 51Stream stream = StreamHelpers.StringToStream("A" + new String('b', StreamMappedString.DefaultPageSize)); 84Stream stream = StreamHelpers.StringToStream(new String('\x1a', StreamMappedString.DefaultPageSize * 2) + "x"); 94Stream stream = StreamHelpers.StringToStream(new String('x', StreamMappedString.DefaultPageSize)); 146Stream stream = StreamHelpers.StringToStream("abcdefg" + new String('x', StreamMappedString.DefaultPageSize)); 196Stream stream = StreamHelpers.StringToStream("a" + new String('x', StreamMappedString.DefaultPageSize * 2)); 248Stream stream = StreamHelpers.StringToStream(new String('x', StreamMappedString.DefaultPageSize * 2));
Microsoft.Build.Utilities.UnitTests (5)
ToolLocationHelper_Tests.cs (4)
1352string pathTooLong = new string('a', 500); 1623string tooLong = new string('a', 500); 3076? ("C:\\" + new string('g', 1800)) 3077: ("/" + new string('g', 10000));
ToolTask_Tests.cs (1)
168t.MockCommandLineCommands = new string('x', 32001);
Microsoft.Cci.Extensions (5)
Experimental\APIEmitter.cs (1)
172_writer.Write(new string(' ', _indentLevel * 2));
Writers\Syntax\IndentionSyntaxWriter.cs (1)
73_indent = new string(' ', value * SpacesInIndent);
Writers\Syntax\TokenSyntaxWriter.cs (1)
71_indent = new string(' ', value * SpacesInIndent);
Writers\Syntax\UnifiedDiffSyntaxWriter.cs (2)
77var markerStr = new string(marker, count); 86WriteCore(new string(' ', remainingSpaces));
Microsoft.CodeAnalysis (3)
FileSystem\PathUtilities.cs (1)
29internal static readonly string DirectorySeparatorStr = new(DirectorySeparatorChar, 1);
InternalUtilities\StringTable.cs (1)
511var text = new String(chars, 1);
PEWriter\PeWriter.cs (1)
365return path + new string('\0', Math.Max(0, minLength - Encoding.UTF8.GetByteCount(path) - 1));
Microsoft.CodeAnalysis.CodeStyle (7)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
29internal static readonly string DirectorySeparatorStr = new(DirectorySeparatorChar, 1);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
511var text = new String(chars, 1);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.FormattedWhitespace.cs (1)
42return new string(' ', Spaces);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (2)
98return new string('\t', numberOfTabs) + new string(' ', numberOfSpaces);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (2)
32s_spaceCache[i] = new string(' ', i); 951return new string(' ', space);
Microsoft.CodeAnalysis.CSharp (1)
Compiler\DocumentationCommentCompiler.cs (1)
1364return new string(' ', depth * 4);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (3)
CommandLineTests.cs (3)
1104var longE = new String('e', 1024); 1113var longI = new String('i', 260); 8745class " + new string('a', 10000) + @"
Microsoft.CodeAnalysis.CSharp.EditorFeatures (6)
RawStringLiteral\RawStringLiteralCommandHandler_TypeChar.cs (2)
231if (!endToken.Text.EndsWith(new string('"', quoteCount))) 236if (!token.Text.EndsWith(new string('"', quoteCount)))
StringCopyPaste\KnownSourcePasteProcessor.cs (4)
238edits.Add(new TextChange(new TextSpan(interpolation.OpenBraceToken.Span.End, 0), new string('{', dollarSignsToAdd))); 239edits.Add(new TextChange(new TextSpan(interpolation.CloseBraceToken.Span.Start, 0), new string('}', dollarSignsToAdd))); 310builder.Append(new string('{', dollarSignCount)); 320builder.Append(new string('}', dollarSignCount));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Structure\DocumentationCommentStructureTests.cs (2)
91""" + new string('x', 240) + """ 99Region("span", "/// <summary> " + new string('x', 106) + " ...", autoCollapse: true));
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
342var text = new string('(', i);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (8)
Emit\EditAndContinue\LocalSlotMappingTests.cs (1)
2005var tooManyCommas = new string(',', 256);
PDB\PDBConstantTests.cs (5)
518var longStringValue = new string('a', 2049); 655string str = new string('x', 9) + "\0" + new string('x', length - 10); 715string str = new string('x', 9) + "\0" + new string('x', length - 10);
PDB\PDBTests.cs (2)
793var spaces = new string(' ', 0x10000); 828var spaces = new string(' ', 0x10000);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (4)
Semantics\CollectionExpressionTests.cs (4)
33446MyCollection collection = {{new string('[', 64)}}{{new string(']', 64)}}; 33483MyCollection collection = {{new string('[', 65)}}{{new string(']', 65)}};
Microsoft.CodeAnalysis.CSharp.Features (4)
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (4)
409var quoteString = new string('"', quoteDelimiterCount); 410var startDelimiter = $"{new string('$', dollarCount)}{quoteString}"; 411var openBraceString = new string('{', dollarCount); 412var closeBraceString = new string('}', dollarCount);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (11)
Semantics\NameLengthTests.cs (3)
20private static readonly string s_longSymbolName = new string('A', MetadataWriter.NameLengthLimit); 22private static readonly string s_longPathName = new string('A', MetadataWriter.PathLengthLimit); 24private static readonly string s_longLocalName = new string('A', MetadataWriter.PdbLengthLimit);
Semantics\OperatorTests.cs (1)
11369const string C0 = ""{new string('0', 65000)}"";
Semantics\RefEscapingTests.cs (6)
9157{{new string('{', nesting)}} 9165{{new string('}', nesting)}} 9176{{new string('{', nesting)}} 9185{{new string('}', nesting)}} 9194{{new string('{', nesting)}} 9201{{new string('}', nesting)}}
Semantics\SemanticErrorTests.cs (1)
23657var longE = new String('e', 1024);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (32)
Compilation\SymbolVisitorTests.cs (32)
41_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 58_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 76_output.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 83_output.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 100_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 109_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 119_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 138_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 146_output.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 164_output.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 178_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 209_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 229_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 250_output.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 258_output.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 278_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 288_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 299_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 319_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 328_output.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 349_output.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 365_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 392argument.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 401argument.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 410argument.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 421argument.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 441argument.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 449argument.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 457argument.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 467argument.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 500argument.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 515argument.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
LexicalAndXml\LexicalErrorTests.cs (1)
821int {{new string('\\', 200)}}𫓧𫓧 = 1;
Parsing\ParsingErrorRecoveryTests.cs (1)
7917var source = new string(',', numTokens);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
TestAttributesVisitor.cs (1)
116return new string(' ', level * 4);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Formatting\FormattingTests.cs (1)
10359lines[i] = new string(' ', count: 8) + lines[i];
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (14)
EditorAdapter\TextSpanExtensionsTest.cs (2)
37var snapshot = EditorFactory.CreateBuffer(exportProvider, new string('a', 10)).CurrentSnapshot; 49var snapshot = EditorFactory.CreateBuffer(exportProvider, new string('a', 10)).CurrentSnapshot;
EmbeddedLanguages\StackFrame\StackFrameSyntaxFactory.cs (1)
134=> CreateTrivia(StackFrameKind.WhitespaceTrivia, new string(' ', count));
Tagging\TagSpanIntervalTreeTests.cs (11)
61buffer.Insert(0, new string('c', 100)); 72buffer.Insert(0, new string('c', 100)); 83var (tree, buffer) = CreateTree(new string('c', 100), [.. Enumerable.Range(50, count: 50).Select(s => new Span(s, 1))]); 84buffer.Insert(0, new string('c', 100)); 97var (tree, buffer) = CreateTree(new string('c', 100), [.. Enumerable.Range(0, count: 100).Select(s => new Span(s, 1))]); 98buffer.Insert(0, new string('c', 100)); 112var (tree, buffer) = CreateTree(new string('c', 100), [.. Enumerable.Range(0, count: 100).Select(s => new Span(s, 1))]); 115buffer.Insert(0, new string('c', 50)); 126var (tree, buffer) = CreateTree(new string('c', 100), [.. Enumerable.Range(0, count: 100).Select(s => new Span(s, 1))]); 129buffer.Insert(50, new string('c', 50)); 140var (tree, buffer) = CreateTree(new string('c', 100), [.. Enumerable.Range(0, count: 100).Select(s => new Span(s, 1))]);
Microsoft.CodeAnalysis.Features (2)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
801yield return new SymbolDisplayPart(SymbolDisplayPartKind.Space, null, new string(' ', count));
MetadataAsSource\AbstractMetadataAsSourceService.DocCommentFormatter.cs (1)
23private static readonly string s_indent = new(' ', s_indentSize * 2);
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\SourceMarkers.cs (1)
35=> s_tags.Replace(source, m => new string(' ', m.Length));
Microsoft.CodeAnalysis.InteractiveHost (1)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
29internal static readonly string DirectorySeparatorStr = new(DirectorySeparatorChar, 1);
Microsoft.CodeAnalysis.LanguageServer (1)
Testing\TestRunner.TestRunHandler.cs (1)
192var indentation = new string(' ', count);
Microsoft.CodeAnalysis.Test.Utilities (4)
Compilation\OperationTreeVerifier.cs (1)
42_currentIndent = new string(' ', initialIndent);
Diagnostics\DiagnosticDescription.cs (1)
608return new string(' ', 4 * indentDepth) + d.ToString();
MarkedSource\SourceWithMarkedNodes.cs (1)
82return s_tags.Replace(source, m => new string(' ', m.Length));
Metadata\MetadataReaderUtils.cs (1)
411=> elementType + "[" + new string(',', shape.Rank) + "]";
Microsoft.CodeAnalysis.UnitTests (20)
CryptoBlobParserTests.cs (4)
167new string('0', 160 * 2), // 160 * 2 - the length of a public key, 2 - 2 chars per byte 168new string('0', 596 * 2), // 596 * 2 - the length of a key pair, 2 - 2 chars per byte 169"0702000000240000DEADBEEF" + new string('0', 584 * 2), // private key blob without magic private key 170"0602000000240000DEADBEEF" + new string('0', 136 * 2), // public key blob without magic public key
MetadataReferences\ModuleMetadataTests.cs (1)
125Assert.Throws<PathTooLongException>(() => ModuleMetadata.CreateFromFile(systemDrive + @":\" + new string('x', 1000)));
ResourceDescriptionTests.cs (2)
51new ResourceDescription(new string('e', 1024), data, true); 52new ResourceDescription("x", new string('e', 260), data, true);
Text\SourceTextTests.cs (1)
368var expected = new string('l', SourceText.LargeObjectHeapLimitInChars);
Text\TextChangeTests.cs (11)
231var text = SourceText.From(new string('.', 2048), Encoding.Unicode, SourceHashAlgorithms.Default); // start bigger than GetText() copy buffer 286new TextChange(new TextSpan(8, 2), new string('a', 10)), 287new TextChange(new TextSpan(15, 2), new string('a', 10))); 347var str = new String('.', 1024); 367var str = new String('.', 1024); 487var a = new string('a', 64); 488var b = new string('b', 64); 510Assert.Equal(new string('c', t.Segments[2].Length), t.Segments[2].ToString()); 516var a = new string('a', 64); 517var b = new string('b', 64); 518var c = new string('c', 64);
Text\TextSpanTest.cs (1)
230Assert.NotEqual<object>(new string('a', 3), span1);
Microsoft.CodeAnalysis.Workspaces (8)
Classification\Classifier.cs (1)
150yield return new SymbolDisplayPart(SymbolDisplayPartKind.Space, null, new string(' ', count));
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
29internal static readonly string DirectorySeparatorStr = new(DirectorySeparatorChar, 1);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
511var text = new String(chars, 1);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.FormattedWhitespace.cs (1)
42return new string(' ', Spaces);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (2)
98return new string('\t', numberOfTabs) + new string(' ', numberOfSpaces);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (2)
32s_spaceCache[i] = new string(' ', i); 951return new string(' ', space);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
29internal static readonly string DirectorySeparatorStr = new(DirectorySeparatorChar, 1);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
511var text = new String(chars, 1);
Microsoft.CodeAnalysis.Workspaces.UnitTests (14)
Differencing\LongestCommonSubsequenceTests.cs (7)
310var x9 = new string('x', 9); 311var x10 = new string('x', 10); 312var x99 = new string('x', 99); 313var x1000 = new string('x', 1000); 315var y1000 = new string('y', 1000); 319var sx1000 = s + new string('x', 1000); 320var sx100000000 = s + new string('x', 100000000);
ObjectSerializationTests.cs (2)
640TestRoundTripString(new String((char)code, 1)); 677var largeString = new string('a', 1024);
SolutionTests\SolutionTests.cs (1)
5858var lastContents = $"#if true //{new string('.', i)}//";
WorkspaceServiceTests\TemporaryStorageServiceTests.cs (4)
38var text = SourceText.From(new string(' ', 4096) + "public class A {}"); 46text = SourceText.From(new string(' ', 1024 * 1024) + "public class A {}"); 280var text = SourceText.From(new string(' ', 4096) + "public class A {}", Encoding.ASCII); 288text = SourceText.From(new string(' ', 1024 * 1024) + "public class A {}");
Microsoft.DotNet.AsmDiff (2)
DiffRecorder.cs (1)
37WriteToken(DiffTokenKind.Indent, new string(' ', IndentLevel * 4));
MarkdownDiffExporter.cs (1)
125string indent = new string(' ', level * 4);
Microsoft.DotNet.Build.Tasks.Installers (2)
src\GenerateJsonObjectString.cs (2)
14private static readonly string __indent1 = new string(' ', 4); 15private static readonly string __indent2 = new string(' ', 8);
Microsoft.DotNet.XUnitAssert.Tests (16)
AsyncCollectionAssertsTests.cs (16)
645 "Actual: " + new string(' ', expectedType.Length) + " null", 755 var paddingBlanks = new string(' ', padding); 797 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 800 " " + new string(' ', padding) + " ↑ (pos 0)", 878 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 881 " " + new string(' ', padding) + " ↑ (pos 0)", 930 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 933 " " + new string(' ', padding) + " ↑ (pos 0)", 970 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 973 " " + new string(' ', padding) + " ↑ (pos 0)", 1031 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 1034 " " + new string(' ', padding) + " ↑ (pos 0)", 1237 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 1240 " " + new string(' ', padding) + " ↑ (pos 0)", 1364 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 1367 " " + new string(' ', padding) + " ↑ (pos 0)",
Microsoft.Extensions.Caching.SqlServer.Tests (1)
SqlServerCacheWithDatabaseTest.cs (1)
97var key = new string('a', SqlParameterCollectionExtensions.CacheItemIdColumnWidth);
Microsoft.Extensions.Compliance.Abstractions.Tests (5)
Redaction\RedactionAbstractionsExtensionsTest.cs (2)
54var data = new string('*', length); 55var data2 = new string('c', length);
Redaction\RedactorTest.cs (3)
34var data = new string('*', length); 46var data = new string('3', 3); 58var data = new string('3', 3);
Microsoft.Extensions.Compliance.Redaction.Tests (5)
ErasingRedactorTests.cs (4)
29var oneLength = redactor.GetRedactedLength(new string('a', 1)); 30var twoLength = redactor.GetRedactedLength(new string('a', 12)); 31var threeLength = redactor.GetRedactedLength(new string('a', 82)); 40var input = new string('G', 20);
HmacRedactorTest.cs (1)
41var str = new string('a', i);
Microsoft.Extensions.Compliance.Testing.Tests (1)
FakeRedactorTests.cs (1)
46var redacted = redactor.Redact(new string('*', 100));
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (1)
Linux\OSFileSystemTests.cs (1)
68Assert.True(b.AsSpan(0, written).SequenceEqual(new string(Content, written).AsSpan()));
Microsoft.Extensions.Http.Diagnostics.Tests (1)
HttpHeadersRedactorTests.cs (1)
30string longStr = new('z', 312);
Microsoft.Extensions.Logging.Console (1)
SimpleConsoleFormatter.cs (1)
16private static readonly string _messagePadding = new string(' ', GetLogLevelString(LogLevel.Information).Length + LoglevelPadding.Length);
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Emitter.cs (1)
124nestedIndentation = new string(' ', nestedIndentation.Length - 4);
Microsoft.Extensions.Options.SourceGeneration (1)
EmitterBase.cs (1)
33padding[i] = new string(' ', i * IndentChars);
Microsoft.Extensions.Primitives (1)
InplaceStringBuilder.cs (1)
146_value ??= new string('\0', _capacity);
Microsoft.Extensions.Telemetry (2)
Latency\Internal\LatencyConsoleExporter.cs (1)
28private static readonly Func<int, string> _dashes = Memoize.Function<int, string>(num => new('-', num));
Logging\ExtendedLogger.cs (1)
181var indentStr = new string(' ', indent);
Microsoft.Extensions.Telemetry.Abstractions.Tests (1)
Logging\TagProviderAttributeTests.cs (1)
34Assert.Throws<ArgumentException>(() => new TagProviderAttribute(typeof(object), new string(' ', 3)));
Microsoft.Extensions.Telemetry.Tests (1)
Logging\JustInTimeRedactorTests.cs (1)
28string longRedactorPrefix = new('X', 256);
Microsoft.Gen.ComplianceReports (1)
src\Generators\Shared\EmitterBase.cs (1)
28padding[i] = new string(' ', i * IndentChars);
Microsoft.Gen.ContextualOptions (1)
src\Generators\Shared\EmitterBase.cs (1)
28padding[i] = new string(' ', i * IndentChars);
Microsoft.Gen.Logging (1)
src\Generators\Shared\EmitterBase.cs (1)
28padding[i] = new string(' ', i * IndentChars);
Microsoft.Gen.Logging.Generated.Tests (15)
LogPropertiesRedactionTests.cs (14)
36["p1.StringPropertyBase"] = new('-', classToRedact.StringPropertyBase.Length), 62["p1.StringPropertyBase"] = new('-', classToRedact.StringPropertyBase.Length), 84["classToLog.StringProperty"] = new('+', classToRedact.StringProperty.Length), 85["classToLog.StringPropertyBase"] = new('-', classToRedact.StringPropertyBase.Length), 87["classToLog.GetOnlyProperty"] = new('-', classToRedact.GetOnlyProperty.Length), 89["classToLog.TransitiveProp.TransitiveStringProp"] = new('-', classToRedact.TransitiveProp.TransitiveStringProp.Length), 91["classToLog.NonFormattableProperty"] = new('-', classToRedact.NonFormattableProperty.ToString().Length), 115["classToLog.StringProperty"] = new('+', classToRedact.StringProperty.Length), 116["classToLog.StringPropertyBase"] = new('-', classToRedact.StringPropertyBase.Length), 118["classToLog.GetOnlyProperty"] = new('-', classToRedact.GetOnlyProperty.Length), 120["classToLog.TransitiveProp.TransitiveStringProp"] = new('-', classToRedact.TransitiveProp.TransitiveStringProp.Length), 122["classToLog.NonFormattableProperty"] = new('-', classToRedact.NonFormattableProperty.ToString().Length), 146["complexParam.TransitiveStringProp"] = new('-', classToRedact.TransitiveStringProp.Length), 172["complexParam.TransitiveStringProp"] = new('-', classToRedact.TransitiveStringProp.Length),
SimpleRedactors.cs (1)
29var redacted = new string(_replacement, len);
Microsoft.Gen.MetadataExtractor (1)
src\Generators\Shared\EmitterBase.cs (1)
28padding[i] = new string(' ', i * IndentChars);
Microsoft.Gen.Metrics (1)
src\Generators\Shared\EmitterBase.cs (1)
28padding[i] = new string(' ', i * IndentChars);
Microsoft.Gen.MetricsReports (1)
src\Generators\Shared\EmitterBase.cs (1)
28padding[i] = new string(' ', i * IndentChars);
Microsoft.Maui.Controls.Build.Tasks (46)
DebugXamlCTask.cs (16)
19 LoggingHelper.LogMessage(Normal, $"{new string(' ', 0)}Preparing debug code for xamlc, assembly: {Assembly}"); 27 LoggingHelper.LogMessage(Low, $"{new string(' ', 2)}Adding searchpath {searchpath}"); 43 LoggingHelper.LogMessage(Low, $"{new string(' ', 2)}Module: {module.Name}"); 46 LoggingHelper.LogMessage(Low, $"{new string(' ', 4)}Resource: {resource.Name}"); 49 LoggingHelper.LogMessage(Low, $"{new string(' ', 6)}skipped."); 55 LoggingHelper.LogMessage(Low, $"{new string(' ', 6)}no type found... skipped."); 62 LoggingHelper.LogMessage(Low, $"{new string(' ', 6)}no InitializeComponent found... skipped."); 68 LoggingHelper.LogMessage(Low, $"{new string(' ', 6)}Creating empty {typeDef.Name}.__InitComponentRuntime"); 71 LoggingHelper.LogMessage(Low, $"{new string(' ', 8)}done."); 72 LoggingHelper.LogMessage(Low, $"{new string(' ', 6)}Copying body of InitializeComponent to __InitComponentRuntime"); 80 LoggingHelper.LogMessage(Low, $"{new string(' ', 8)}done."); 102 LoggingHelper.LogMessage(Low, $"{new string(' ', 6)}Replacing body of {typeDef.Name}.{typeDef.Name} (bool {altCtor.Parameters[0].Name})"); 105 LoggingHelper.LogMessage(Low, $"{new string(' ', 6)}Adding {typeDef.Name}.{typeDef.Name} (bool useCompiledXaml)"); 150 LoggingHelper.LogMessage(Low, $"{new string(' ', 8)}done."); 154 LoggingHelper.LogMessage(Normal, $"{new string(' ', 0)}Writing the assembly."); 160 LoggingHelper.LogMessage(Normal, $"{new string(' ', 2)}done.");
XamlCTask.cs (30)
160 LoggingHelper.LogMessage(Normal, $"{new string(' ', 0)}Compiling Xaml, assembly: {Assembly}"); 166 LoggingHelper.LogMessage(Normal, $"{new string(' ', 2)}Assembly file not found. Skipping XamlC."); 185 LoggingHelper.LogMessage(Low, $"{new string(' ', 2)}Adding searchpath {searchpath}"); 191 LoggingHelper.LogMessage(Low, $"{new string(' ', 2)}Ignoring dependency and reference paths due to an unsupported resolver"); 232 LoggingHelper.LogMessage(Low, $"{new string(' ', 2)}Module: {module.Name}"); 236 LoggingHelper.LogMessage(Low, $"{new string(' ', 4)}Resource: {resource.Name}"); 240 LoggingHelper.LogMessage(Low, $"{new string(' ', 6)}skipped."); 246 LoggingHelper.LogMessage(Low, $"{new string(' ', 6)}no type found... skipped."); 267 LoggingHelper.LogMessage(Low, $"{new string(' ', 6)}has XamlCompilationAttribute set to Skip and not Compile... skipped."); 274 LoggingHelper.LogMessage(Low, $"{new string(' ', 6)}no InitializeComponent found... skipped."); 284 LoggingHelper.LogMessage(Low, $"{new string(' ', 6)}Parsing Xaml"); 291 LoggingHelper.LogMessage(Low, $"{new string(' ', 8)}failed."); 297 LoggingHelper.LogMessage(Low, $"{new string(' ', 8)}failed."); 302 LoggingHelper.LogMessage(Low, $"{new string(' ', 8)}done."); 306 LoggingHelper.LogMessage(Low, $"{new string(' ', 6)}Replacing {0}.InitializeComponent ()"); 311 LoggingHelper.LogMessage(Low, $"{new string(' ', 8)}failed."); 344 LoggingHelper.LogMessage(Low, $"{new string(' ', 6)}Removing UnconditionalSuppressMessageAttribute from InitializeComponent()"); 351 LoggingHelper.LogMessage(Low, $"{new string(' ', 8)}done."); 358 LoggingHelper.LogMessage(Low, $"{new string(' ', 6)}Optimizing IL"); 360 LoggingHelper.LogMessage(Low, $"{new string(' ', 8)}done."); 366 LoggingHelper.LogMessage(Low, $"{new string(' ', 4)}Changing the module MVID"); 368 LoggingHelper.LogMessage(Low, $"{new string(' ', 6)}done."); 373 LoggingHelper.LogMessage(Low, $"{new string(' ', 4)}Removing compiled xaml resources"); 376 LoggingHelper.LogMessage(Low, $"{new string(' ', 6)}Removing {resource.Name}"); 378 LoggingHelper.LogMessage(Low, $"{new string(' ', 8)}done."); 384 LoggingHelper.LogMessage(Low, $"{new string(' ', 0)}ValidateOnly=True. Skipping writing assembly."); 389 LoggingHelper.LogMessage(Low, $"{new string(' ', 0)}No compiled resources. Skipping writing assembly."); 393 LoggingHelper.LogMessage(Low, $"{new string(' ', 0)}Writing the assembly"); 400 LoggingHelper.LogMessage(Low, $"{new string(' ', 2)}done."); 404 LoggingHelper.LogMessage(Low, $"{new string(' ', 2)}failed.");
Microsoft.ML.Core (1)
Environment\ConsoleEnvironment.cs (1)
128wr.Write(new string(' ', commChannel.Depth * 2));
Microsoft.ML.Data (1)
Evaluators\EvaluatorUtils.cs (1)
1619string pad = new string(' ', paddingLen - 9);
Microsoft.ML.Maml (1)
HelpCommand.cs (1)
356string indent = new string(' ', indentLen);
Microsoft.ML.Samples (2)
Dynamic\TensorFlow\ImageClassification.cs (1)
65Console.WriteLine(new string('-', 10));
Dynamic\Transforms\ApplyOnnxModel.cs (1)
44Console.WriteLine(new string('-', 10));
Microsoft.ML.Samples.GPU (1)
docs\samples\Microsoft.ML.Samples\Dynamic\TensorFlow\ImageClassification.cs (1)
65Console.WriteLine(new string('-', 10));
Microsoft.ML.Tokenizers.Tests (1)
PreTokenizerTests.cs (1)
50new string(' ', 100),
Microsoft.Net.Http.Headers.Tests (2)
ContentDispositionHeaderValueTest.cs (2)
228contentDisposition.FileNameStar = new string('a', 400); // 400 is larger to the max stackallow size 229Assert.Equal($"UTF-8\'\'{new string('a', 400)}", contentDisposition.Parameters.First().Value.AsSpan());
Microsoft.NET.StringTools (3)
InternableString.cs (1)
240string result = new string((char)0, Length);
WeakStringCacheInterner.cs (2)
140result.AppendLine($"\n{new string('=', 41 - (title.Length / 2))}{title}{new string('=', 41 - (title.Length / 2))}");
Microsoft.NET.StringTools.net35 (2)
WeakStringCacheInterner.cs (2)
140result.AppendLine($"\n{new string('=', 41 - (title.Length / 2))}{title}{new string('=', 41 - (title.Length / 2))}");
Microsoft.NET.StringTools.net35.UnitTests (1)
WeakStringCache_Tests.cs (1)
127AddString(new string('r', 500), "test", (string cachedString) =>
Microsoft.NET.StringTools.UnitTests (1)
WeakStringCache_Tests.cs (1)
127AddString(new string('r', 500), "test", (string cachedString) =>
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\Strings.vb (1)
1545sDigitsAfterDecimal = "." & (New System.String("0"c, NumDigitsAfterDecimal))
MSBuild (2)
XMake.cs (2)
441Console.WriteLine("\n{0}{1}{0}", new string('=', 41 - ("Process".Length / 2)), "Process"); 449Console.WriteLine("{0}{0}", new string('=', 41));
PresentationCore (3)
MS\Internal\TextFormatting\TextStore.cs (1)
839charBuffer = new StringCharacterBuffer(new string('A', stringLength));
System\Windows\Input\TextCompositionManager.cs (1)
622string inputText = new string(textInput.CharacterCode, 1);
System\Windows\InterOp\HwndSource.cs (1)
2041string text = new string((char)msg.wParam, 1);
PresentationFramework (11)
System\Windows\Controls\ItemContainerGenerator.cs (1)
1131string indent = new String(' ', level);
System\Windows\Documents\RtfToXamlReader.cs (5)
8793dn.AppendXamlEncoded(new string(singleChar, 1)); 9299ProcessText(new string('\x200e', 1)); 9302ProcessText(new string('\x200f', 1)); 11474token.Text = new string('\xA0', 1); // Unicode NBSP 11485token.Text = new string('\x2011', 1);
System\Windows\Documents\TextTreeDumper.cs (1)
115indent = new string(' ', depth*2);
System\Windows\Documents\TextTreeText.cs (4)
189InsertText(rootTextBlock, offset, new string((char)0xffff, 1)); 198InsertText(rootTextBlock, offset, new string((char)0xbeef, 2)); 202InsertText(rootTextBlock, offset, new string((char)0xbeef, 1)); 203InsertText(rootTextBlock, offset + childSymbolCount + 1, new string((char)0x0, 1));
PresentationUI (1)
MS\Internal\Documents\Application\DocumentPropertiesDialog.cs (1)
224new String('#', decimalPlaces));
SecurityWebSite (1)
BearerAuth.cs (1)
15Key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128)));
ServerComparison.FunctionalTests (1)
ResponseCompressionTests.cs (1)
29private static readonly string HelloWorldBody = "Hello World;" + new string('a', 20);
ServerComparison.TestSites (1)
StartupResponseCompression.cs (1)
22var helloWorldBody = "Hello World;" + new string('a', 20);
Sockets.FunctionalTests (2)
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (2)
197var largeString = new string('a', maxBytesPreCompleted + 1); 934var headerValue = new string('a', headerSize);
Stress.ApiService (4)
ConsoleStresser.cs (3)
152Console.WriteLine(new string('!', 1000)); 157Console.Write(new string(i % 2 == 0 ? 'a' : 'b', 50)); 168Console.Write(new string(i % 2 == 0 ? 'a' : 'b', 50));
Program.cs (1)
242var line = new string((char)('a' + i), 256);
StringTools.Benchmark (1)
SpanBasedStringBuilder_Benchmark.cs (1)
33_subStrings[i] = new string('a', SubstringLengths);
System.Configuration.ConfigurationManager (3)
System\Configuration\XmlUtilWriter.cs (3)
27private static readonly string s_spaces8 = new string(Space, 8); 28private static readonly string s_spaces4 = new string(Space, 4); 29private static readonly string s_spaces2 = new string(Space, 2);
System.Drawing.Common.Tests (7)
System\Drawing\ImageTests.cs (2)
523string fileName = new('a', 261); 531string fileName = new('a', 261);
System\Drawing\Imaging\ImageAttributesTests.cs (1)
1105string fileNameTooLong = new('a', short.MaxValue);
System\Drawing\Imaging\MetafileTests.cs (3)
80yield return new object[] { new string('a', 261) }; 435string fileName = GetPath(new string('a', short.MaxValue)); 710string fileName = GetPath(new string('a', 261));
System\Drawing\Text\PrivateFontCollectionTests.cs (1)
115() => fontCollection.AddFontFile(new string('a', 261)));
System.Linq.Expressions (3)
System\Linq\Expressions\DebugViewWriter.cs (1)
178Write(new string(' ', Depth));
System\Linq\Expressions\Interpreter\LightLambda.cs (2)
120_indent = new string(' ', _indent.Length + 2); 125_indent = new string(' ', _indent.Length - 2);
System.Private.CoreLib (5)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\DebugProvider.cs (1)
108return _indentString = new string(' ', indentCount);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (1)
295return rank == 1 ? "[*]" : "[" + new string(',', rank - 1) + "]";
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (1)
96"[" + new string(',', rank - 1) + "]";
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureArrayType.cs (1)
38return "[" + new string(',', _rank - 1) + "]";
src\libraries\System.Private.CoreLib\src\System\Reflection\TypeInfo.cs (1)
144"[" + new string(',', rank - 1) + "]";
System.Reflection.Emit (1)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (1)
295return rank == 1 ? "[*]" : "[" + new string(',', rank - 1) + "]";
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\General\Helpers.cs (1)
98return "[" + new string(',', rank - 1) + "]";
System.Runtime.Serialization.Formatters (1)
System\Runtime\Serialization\FormatterServices.cs (1)
348typeName + "[" + new string(',', rank - 1) + "]";
System.ServiceModel.NetNamedPipe.Tests (2)
NetNamedPipeBindingTest.cs (2)
25string result = (string)m.Invoke(t, new object[] { "hostname", new string('a', 128), true }); 31result = (string)m.Invoke(t, new object[] { "hostname", new string('a', 128), true });
System.Text.RegularExpressions (4)
System\Text\RegularExpressions\RegexInterpreterCode.cs (1)
234string Indent() => new string(' ', Math.Max(1, 25 - sb.Length));
System\Text\RegularExpressions\RegexNode.cs (3)
186Str = new string(Ch, N); 2699Str = new string(Ch, max); 2861sb.Append(new string(' ', stack.Count * 2)).Append(curNode.Describe()).AppendLine();
System.Text.RegularExpressions.Generator (4)
RegexGenerator.Emitter.cs (1)
5585writer.WriteLine($"/// {new string(' ', depth * 4)}{BulletPoint} {tag}{EscapeXmlComment(nodeDescription)}<br/>");
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (3)
186Str = new string(Ch, N); 2699Str = new string(Ch, max); 2861sb.Append(new string(' ', stack.Count * 2)).Append(curNode.Describe()).AppendLine();
System.Windows.Forms (3)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
2076newMatchingText = new string(keyChar, 1);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1928text = new string(s_passwordReplaceChar, text.Length);
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (1)
277? new string(Owner is TextBox textBox
System.Windows.Forms.Primitives.Tests (3)
Interop\Richedit\CHARFORMAT2WTests.cs (1)
30string bigString = new('*', 32);
Interop\User32\GetWindowTextTests.cs (1)
25string longText = new('X', 50);
Interop\User32\LOGFONTWTests.cs (1)
27string bigString = new('*', 32);
System.Windows.Forms.Tests (28)
System\Windows\Forms\ControlTests.Handlers.cs (1)
4752string longString = new('a', 65536);
System\Windows\Forms\ControlTests.Methods.cs (2)
4943string longString = new('a', 65536); 5217string longString = new('a', 65536);
System\Windows\Forms\DataFormatsTests.ClipboardTests.cs (2)
18uint longManuallyRegisteredFormatId = PInvokeCore.RegisterClipboardFormat(new string('a', 255)); 20yield return new object[] { (int)longManuallyRegisteredFormatId, new string('a', 255) };
System\Windows\Forms\DataFormatsTests.cs (1)
116yield return new object[] { new string('a', 256) };
System\Windows\Forms\DragDropHelperTests.cs (2)
62yield return new object[] { new DataObject(), DropImageType.Copy, new string('*', (int)PInvokeCore.MAX_PATH), string.Empty }; 63yield return new object[] { new DataObject(), DropImageType.Copy, string.Empty, new string('*', (int)PInvokeCore.MAX_PATH) };
System\Windows\Forms\ListBoxTests.cs (1)
6098yield return new object[] { new string('a', 41), "System.Windows.Forms.ListBox, Items.Count: 2, Items[0]: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" };
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (6)
149ListViewItem listViewItem = AssignItemToListView(listView, new ListViewItem(new string('t', 500))); 169ListViewItem listViewItem = AssignItemToListView(listView, new ListViewItem(new string('t', 1))); 179ListViewItem listViewItem = new(new string('t', 20)); 181listViewItem.SubItems.Add(new ListViewSubItem(listViewItem, new string('t', 10))); 195ListViewItem listViewItem = new(new string('t', 10)); 196ListViewSubItem listViewSubItem = new(listViewItem, new string('t', 20));
System\Windows\Forms\NativeWindowTests.cs (2)
138yield return new object[] { new string('a', short.MaxValue + 1), new string('a', short.MaxValue) };
System\Windows\Forms\NotifyIconTests.cs (8)
340yield return new object[] { visible, icon, new string('a', NotifyIcon.MaxTextSize), new string('a', NotifyIcon.MaxTextSize) }; 392yield return new object[] { visible, null, new string('a', NotifyIcon.MaxTextSize), new string('a', NotifyIcon.MaxTextSize), 0 }; 396yield return new object[] { false, new Icon("bitmaps/10x16_one_entry_32bit.ico"), new string('a', NotifyIcon.MaxTextSize), new string('a', NotifyIcon.MaxTextSize), 0 }; 398yield return new object[] { true, new Icon("bitmaps/10x16_one_entry_32bit.ico"), new string('a', NotifyIcon.MaxTextSize), new string('a', NotifyIcon.MaxTextSize), 1 };
System\Windows\Forms\RichTextBoxTests.ClipboardTests.cs (1)
35{ new string('a', 10000) },
System\Windows\Forms\ToolStripTextBoxTests.cs (1)
292_toolStripTextBox.Text = new string('a', textLength.Value);
TextBoxBaseTests.cs (1)
6851Text = new string('a', 41)
UIAutomationClientSideProviders (3)
MS\Internal\AutomationProxies\WindowsEditBox.cs (3)
598string s = new string('E', 1); 723string s = new string('E', 1); 782string s = new string(ch, 1);
VBCSCompiler.UnitTests (1)
CompilerServerTests.cs (1)
290var newTempDir = _tempDirectory.CreateDirectory(new string('a', 100 - _tempDirectory.Path.Length));
xunit.assert (20)
Sdk\ArgumentFormatter.cs (4)
60 internal static readonly string EllipsisInBrackets = "[" + new string((char)0x00B7, 3) + "]"; 138 public static string Ellipsis { get; } = new string((char)0x00B7, 3); 494 arraySuffix += string.Format(CultureInfo.CurrentCulture, "[{0}]", new string(',', rank - 1)); 526 result = string.Format(CultureInfo.CurrentCulture, "{0}<{1}>", result, new string(',', typeInfo.GenericTypeParameters.Length - 1));
Sdk\Exceptions\AllException.cs (2)
47 var indexSpaces = new string(' ', maxItemIndexLength); 49 var wrapSpaces = Environment.NewLine + new string(' ', maxWrapIndent);
Sdk\Exceptions\CollectionException.cs (1)
81 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint);
Sdk\Exceptions\DoesNotContainException.cs (5)
50 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint); 77 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint); 144 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint); 171 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint); 201 new string(' ', failurePointerIndent),
Sdk\Exceptions\DoesNotMatchException.cs (1)
49 new string(' ', failurePointerIndent),
Sdk\Exceptions\EqualException.cs (5)
31 static readonly string newLineAndIndent = Environment.NewLine + new string(' ', 10); // Length of "Expected: " and "Actual: " 124 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2}{3})", Environment.NewLine, new string(' ', expectedPointer.Value), mismatchedIndex, expectedTypeText); 129 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2191 (pos {2}{3})", Environment.NewLine, new string(' ', actualPointer.Value), mismatchedIndex, actualTypeText); 162 message += string.Format(CultureInfo.CurrentCulture, "{0}{1}\u2193 (pos {2})", newLineAndIndent, new string(' ', expectedPointer), expectedIndex); 167 message += string.Format(CultureInfo.CurrentCulture, "{0}{1}\u2191 (pos {2})", newLineAndIndent, new string(' ', actualPointer), actualIndex);
Sdk\Exceptions\NotEqualException.cs (2)
98 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', expectedPointer.Value), mismatchedIndex); 103 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2191 (pos {2})", Environment.NewLine, new string(' ', actualPointer.Value), mismatchedIndex);