536 references to string
BasicWebSite (1)
Controllers\TempDataController.cs (1)
95TempData["LargeValue"] = new string(character, size);
CodeGenerator (1)
FeatureCollectionGenerator.cs (1)
32{new string(' ', className.Length)}{feature}")}
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),
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));
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)
279EventLogHelpers.VerifyEventLogEvent(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); 1029var expectedLogString = new string('a', 16); 1033var 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); 1029var expectedLogString = new string('a', 16); 1033var 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); 1029var expectedLogString = new string('a', 16); 1033var 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)
279EventLogHelpers.VerifyEventLogEvent(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); 1029var expectedLogString = new string('a', 16); 1033var 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 (2)
ILLink.RoslynAnalyzer (1)
TrimAnalysis\TrimDataFlowAnalysis.cs (1)
168 TraceWrite (new string ('\t', level));
InMemory.FunctionalTests (59)
ChunkedRequestTests.cs (6)
285Assert.Equal(new string('a', requestsReceived), request.GetTrailer("X-Trailer-Header").ToString()); 333string.Concat("X-Trailer-Header: ", new string('a', i)), 416Assert.Equal(new string('a', requestsReceived), request.GetTrailer("X-Trailer-Header").ToString()); 464string.Concat("X-Trailer-Header: ", new string('a', i)), 599Assert.Equal(new string('a', requestsReceived), request.GetTrailer("X-Trailer-Header").ToString()); 638string.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)
1936await context.Response.WriteAsync(new string('!', 65536)); 2906new KeyValuePair<string, string>(InternalHeaderNames.Method, new string('A', 8192 / 2)), 2907new KeyValuePair<string, string>(InternalHeaderNames.Path, "/" + new string('A', 8192 / 2)), 3691context.Response.Headers["A"] = new string('a', headerValueLength); 3692context.Response.Headers["B"] = new string('b', headerValueLength);
Http2\Http2StreamTests.cs (11)
787new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET" + new string('a', 1024 * 3)), 788new KeyValuePair<string, string>(InternalHeaderNames.Path, "/Hello/How/Are/You/" + new string('a', 1024 * 3)), 790new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost" + new string('a', 1024 * 3) + ":80"), 2406var largeHeader = new string('a', 1024 * 3); 2601context.Response.AppendTrailer("too_long", new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize)); 3192context.Response.Headers["too_long"] = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); 3398var fisrtPartOfResponse = Encoding.ASCII.GetBytes(new string('a', memory.Length)); 3432Assert.Equal(Encoding.ASCII.GetBytes(new string('a', 4102)), dataFrame.PayloadSequence.ToArray()); 3451var fisrtPartOfResponse = Encoding.ASCII.GetBytes(new string('a', memory.Length)); 3485Assert.Equal(Encoding.ASCII.GetBytes(new string('a', 4102)), dataFrame.PayloadSequence.ToArray()); 5328var fisrtPartOfResponse = Encoding.ASCII.GetBytes(new String('a', sizeHint));
Http2\Http2TestBase.cs (2)
35protected static readonly string _4kHeaderValue = new string('a', 4096); 112protected static readonly byte[] _maxData = Encoding.ASCII.GetBytes(new string('a', Http2PeerSettings.MinAllowedMaxFrameSize));
Http3\Http3StreamTests.cs (7)
138new KeyValuePair<string, string>("test", new string('a', 1024 * 32 + 1)) 537new KeyValuePair<string, string>(InternalHeaderNames.Method, "GET" + new string('a', 1024 * 3)), 538new KeyValuePair<string, string>(InternalHeaderNames.Path, "/Hello/How/Are/You/" + new string('a', 1024 * 3)), 540new KeyValuePair<string, string>(InternalHeaderNames.Authority, "localhost" + new string('a', 1024 * 3) + ":80"), 2718new KeyValuePair<string, string>(InternalHeaderNames.Method, new string('A', 8192 / 2)), 2719new KeyValuePair<string, string>(InternalHeaderNames.Path, "/" + new string('A', 8192 / 2)), 2765context.Response.Headers["BigHeader"] = new string('!', 100);
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)
889var expectedBody = new string('a', 1024 * 4); 1025var expectedBody = new string('a', 1024 * 4); 1072var expectedBody = new string('a', 1024 * 4);
MaxRequestBodySizeTests.cs (1)
278var payload = new string('A', payloadSize);
ResponseTests.cs (2)
3166var expectedString = new string('a', expectedLength); 3196var 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)
420await ctx.Response.WriteAsync(new string('a', length)); 957var fileContent = new string('a', 200000);
Interop.FunctionalTests (11)
Http3\Http3RequestTests.cs (2)
1215feature.Trailers.Append($"trailer-{i}", new string('!', i)); 1255Assert.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);
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)
50var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128))); 86var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128))); 872var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128))); 916var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128))); 1308var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(new string('a', 128)));
Microsoft.AspNetCore.Components.Forms.Tests (1)
ReverseStringBuilderTest.cs (1)
130expected = new string(c, ReverseStringBuilder.MinimumRentedArraySize) + expected;
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)
40var expected = new string('a', 1024 * 1024); 53var expected = new string('a', 1024 * 1024);
JsonOutputFormatterTestBase.cs (1)
157var expectedName = "This is long so we can test large objects " + new string('a', 1024 * 65);
NewtonsoftJsonOutputFormatterTest.cs (1)
26description = "This is long so we can test large objects " + new string('a', 1024 * 65),
RequestFormLimitsTest.cs (1)
101kvps.Add(new KeyValuePair<string, string>("key1", new string('a', 1024)));
RequestSizeLimitTest.cs (2)
30kvps.Add(new KeyValuePair<string, string>("SampleString", new string('p', 1024))); 68var expected = $"{{\"sampleInt\":10,\"sampleString\":\"{new string('p', 1024)}\"}}";
SimpleWithWebApplicationBuilderTests.cs (2)
262content.Add(new StringContent(new string('a', 42)), "file", "file.txt"); 285content.Add(new StringContent(new string('a', 42)), "file", "file.txt");
TempDataInCookiesTest.cs (1)
66var 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 (17)
Http1\Http1ConnectionTests.cs (2)
714var payload = Encoding.UTF8.GetBytes("hello, web browser" + new string(' ', 512) + "\n"); 728var payload = Encoding.UTF8.GetBytes("hello, web browser" + new string(' ', 512) + "\n");
Http2\Http2HPackEncoderTests.cs (1)
389headers.Append("x-Custom", new string('!', (int)Http2PeerSettings.DefaultHeaderTableSize));
HttpParserTests.cs (1)
687var 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)
137writer.WriteAscii(new string((char)i, 1)); 161var testString = new string(' ', stringLength);
src\Shared\test\Shared.Tests\runtime\Http2\HPackDecoderTest.cs (6)
588string string8193 = new string('a', MaxHeaderFieldSize + 1); 606string string8191 = new string('a', MaxHeaderFieldSize - 1); 607string string8193 = new string('a', MaxHeaderFieldSize + 1); 608string string8194 = new string('a', MaxHeaderFieldSize + 2); 641string string8193 = new string('a', MaxHeaderFieldSize + 1); 664string 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 (7)
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);
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)
588string string8193 = new string('a', MaxHeaderFieldSize + 1); 606string string8191 = new string('a', MaxHeaderFieldSize - 1); 607string string8193 = new string('a', MaxHeaderFieldSize + 1); 608string string8194 = new string('a', MaxHeaderFieldSize + 2); 641string string8193 = new string('a', MaxHeaderFieldSize + 1); 664string 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)
2815var 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)
56hubMessage = 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)
5209await client.InvokeAsync(nameof(MethodHub.Echo), new object[] { new string('x', 500) }).DefaultTimeout();
Microsoft.AspNetCore.TestHost.Tests (4)
ClientHandlerTests.cs (3)
545throw new InvalidOperationException(new string('a', 1024 * 32)); 561throw new InvalidOperationException(new string('a', 1024 * 32)); 577throw 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 (23)
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) + "𐐀";
Microsoft.Build (16)
BackEnd\Components\Scheduler\Scheduler.cs (3)
2486string durationBar = new string(barSegment, durationElementCount / scale); 2531new String(' ', postPad), 2786new string(' ', indent * 2),
Evaluation\Evaluator.cs (1)
793string line = new string('#', 100) + "\n";
Evaluation\Preprocessor.cs (8)
102destinationDocument.AppendChild(destinationDocument.CreateComment("\r\n" + new String('=', 140) + "\r\n" + _project.FullPath.Replace("--", "__") + "\r\n" + new String('=', 140) + "\r\n")); 313$"\r\n{new String('=', 140)}\r\n{importTag}\r\n\r\n{resolved.FullPath.Replace("--", "__")}\r\n{new String('=', 140)}\r\n")); 321destination.AppendChild(destinationDocument.CreateComment("\r\n" + new String('=', 140) + "\r\n </Import>\r\n" + new String('=', 140) + "\r\n")); 325destination.AppendChild(destinationDocument.CreateComment("\r\n" + new String('=', 140) + "\r\n </Import>\r\n\r\n" + _filePaths.Peek()?.Replace("--", "__") + "\r\n" + new String('=', 140) + "\r\n"));
FileMatcher.cs (1)
29private static readonly string s_directorySeparator = new string(Path.DirectorySeparatorChar, 1);
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.Engine (2)
Shared\FileMatcher.cs (2)
24private static readonly string directorySeparator = new string(Path.DirectorySeparatorChar, 1); 25private static readonly string altDirectorySeparator = new string(Path.AltDirectorySeparatorChar, 1);
Microsoft.Build.Engine.OM.UnitTests (1)
Definition\Project_Tests.cs (1)
3289var longString = new string('a', 1000);
Microsoft.Build.Engine.UnitTests (16)
CommunicationUtilities_Tests.cs (1)
44string 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)
109string tooLong = "c:\\" + new string('C', 6000);
Evaluation\Expander_Tests.cs (1)
1054<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)
501string 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.Core (1)
FileMatcher.cs (1)
29private static readonly string s_directorySeparator = new string(Path.DirectorySeparatorChar, 1);
Microsoft.Build.Tasks.UnitTests (12)
DownloadFile_Tests.cs (1)
40Content = new StringContent(new String('!', 10000000)),
FileStateTests.cs (3)
37new FileState(new String('x', 5000)); 51delegate () { var x = new FileInfo(new String('x', 5000)).LastWriteTime; }, 52delegate () { 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.Core (1)
FileMatcher.cs (1)
29private static readonly string s_directorySeparator = new string(Path.DirectorySeparatorChar, 1);
Microsoft.Build.Utilities.UnitTests (5)
ToolLocationHelper_Tests.cs (4)
1349string pathTooLong = new string('a', 500); 1620string 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.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)
AsyncCollectionAssertTests.cs (16)
643 "Actual: " + new string(' ', expectedType.Length) + " null", 753 var paddingBlanks = new string(' ', padding); 795 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 798 " " + new string(' ', padding) + " ↑ (pos 0)", 876 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 879 " " + new string(' ', padding) + " ↑ (pos 0)", 928 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 931 " " + new string(' ', padding) + " ↑ (pos 0)", 968 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 971 " " + new string(' ', padding) + " ↑ (pos 0)", 1029 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 1032 " " + new string(' ', padding) + " ↑ (pos 0)", 1235 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 1238 " " + new string(' ', padding) + " ↑ (pos 0)", 1362 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 1365 " " + new string(' ', padding) + " ↑ (pos 0)",
Microsoft.Extensions.Caching.SqlServer.Tests (1)
SqlServerCacheWithDatabaseTest.cs (1)
97var key = new string('a', SqlParameterCollectionExtensions.CacheItemIdColumnWidth);
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.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);
Microsoft.NET.StringTools (2)
InternableString.cs (1)
240string result = new string((char)0, Length);
WeakStringCacheInterner.cs (1)
140result.AppendLine(string.Format("\n{0}{1}{0}", new string('=', 41 - (title.Length / 2)), title));
Microsoft.NET.StringTools.net35 (1)
WeakStringCacheInterner.cs (1)
140result.AppendLine(string.Format("\n{0}{1}{0}", new string('=', 41 - (title.Length / 2)), title));
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\Strings.vb (1)
1545sDigitsAfterDecimal = "." & (New System.String("0"c, NumDigitsAfterDecimal))
MSBuild (4)
XMake.cs (4)
427Console.WriteLine("\n{0}{1}{0}", new string('=', 41 - ("Process".Length / 2)), "Process"); 435Console.WriteLine("{0}{0}", new string('=', 41)); 495Console.WriteLine("\n{0}{1}{0}", new string('=', 41 - (category.CategoryName.Length / 2)), category.CategoryName); 505Console.WriteLine("{0}{0}", new string('=', 41));
PresentationCore (3)
MS\Internal\TextFormatting\TextStore.cs (1)
855charBuffer = new StringCharacterBuffer(new string('A', stringLength));
System\Windows\Input\TextCompositionManager.cs (1)
617string inputText = new string(textInput.CharacterCode, 1);
System\Windows\InterOp\HwndSource.cs (1)
2062string text = new string((char)msg.wParam, 1);
PresentationFramework (11)
System\Windows\Controls\ItemContainerGenerator.cs (1)
1138string indent = new String(' ', level);
System\Windows\Documents\RtfToXamlReader.cs (5)
8782dn.AppendXamlEncoded(new string(singleChar, 1)); 9290ProcessText(new string('\x200e', 1)); 9293ProcessText(new string('\x200f', 1)); 11574token.Text = new string('\xA0', 1); // Unicode NBSP 11585token.Text = new string('\x2011', 1);
System\Windows\Documents\TextTreeDumper.cs (1)
119indent = new string(' ', depth*2);
System\Windows\Documents\TextTreeText.cs (4)
192InsertText(rootTextBlock, offset, new string((char)0xffff, 1)); 201InsertText(rootTextBlock, offset, new string((char)0xbeef, 2)); 205InsertText(rootTextBlock, offset, new string((char)0xbeef, 1)); 206InsertText(rootTextBlock, offset + childSymbolCount + 1, new string((char)0x0, 1));
PresentationUI (1)
MS\Internal\Documents\Application\DocumentPropertiesDialog.cs (1)
238new 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)
204var largeString = new string('a', maxBytesPreCompleted + 1); 914var headerValue = new string('a', headerSize);
StringTools.Benchmark (1)
SpanBasedStringBuilder_Benchmark.cs (1)
33_subStrings[i] = new string('a', SubstringLengths);
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.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
649string ind = new string(' ', indent);
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); 2692Str = new string(Ch, max); 2854sb.Append(new string(' ', stack.Count * 2)).Append(curNode.Describe()).AppendLine();
System.Text.RegularExpressions.Generator (4)
RegexGenerator.Emitter.cs (1)
5559writer.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); 2692Str = new string(Ch, max); 2854sb.Append(new string(' ', stack.Count * 2)).Append(curNode.Describe()).AppendLine();
UIAutomationClientSideProviders (3)
MS\Internal\AutomationProxies\WindowsEditBox.cs (3)
603string s = new string('E', 1); 726string s = new string('E', 1); 785string s = new string(ch, 1);
xunit.assert (20)
Sdk\ArgumentFormatter.cs (4)
42 internal static readonly string EllipsisInBrackets = "[" + new string((char)0x00B7, 3) + "]"; 92 public static string Ellipsis { get; } = new string((char)0x00B7, 3); 431 arraySuffix += string.Format(CultureInfo.CurrentCulture, "[{0}]", new string(',', rank - 1)); 463 result = string.Format(CultureInfo.CurrentCulture, "{0}<{1}>", result, new string(',', typeInfo.GenericTypeParameters.Length - 1));
Sdk\Exceptions\AllException.cs (2)
43 var indexSpaces = new string(' ', maxItemIndexLength); 45 var wrapSpaces = Environment.NewLine + new string(' ', maxWrapIndent);
Sdk\Exceptions\CollectionException.cs (1)
57 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint);
Sdk\Exceptions\DoesNotContainException.cs (5)
42 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint); 69 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint); 136 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint); 163 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint); 193 new string(' ', failurePointerIndent),
Sdk\Exceptions\DoesNotMatchException.cs (1)
43 new string(' ', failurePointerIndent),
Sdk\Exceptions\EqualException.cs (5)
25 static readonly string newLineAndIndent = Environment.NewLine + new string(' ', 10); // Length of "Expected: " and "Actual: " 118 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2}{3})", Environment.NewLine, new string(' ', expectedPointer.Value), mismatchedIndex, expectedTypeText); 123 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2191 (pos {2}{3})", Environment.NewLine, new string(' ', actualPointer.Value), mismatchedIndex, actualTypeText); 156 message += string.Format(CultureInfo.CurrentCulture, "{0}{1}\u2193 (pos {2})", newLineAndIndent, new string(' ', expectedPointer), expectedIndex); 161 message += string.Format(CultureInfo.CurrentCulture, "{0}{1}\u2191 (pos {2})", newLineAndIndent, new string(' ', actualPointer), actualIndex);
Sdk\Exceptions\NotEqualException.cs (2)
92 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', expectedPointer.Value), mismatchedIndex); 97 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2191 (pos {2})", Environment.NewLine, new string(' ', actualPointer.Value), mismatchedIndex);