180 references to new
dotnet-svcutil-lib (42)
FrameworkFork\Microsoft.Xml\Xml\BinHexEncoder.cs (1)
67return new String(outArray, 0, lenOut);
FrameworkFork\Microsoft.Xml\Xml\Cache\XPathDocumentBuilder.cs (2)
374WriteString(new string(buffer, index, count), TextBlockType.Text); 387WriteString(new string(buffer, index, count), TextBlockType.Text);
FrameworkFork\Microsoft.Xml\Xml\Cache\XPathDocumentNavigator.cs (1)
922return new string(buf, 0, idx);
FrameworkFork\Microsoft.Xml\Xml\Core\QueryOutputWriter.cs (2)
284_wrapped.WriteCData(new string(buffer, index, count)); 310_wrapped.WriteCData(new string(buffer, index, count));
FrameworkFork\Microsoft.Xml\Xml\Core\QueryOutputWriterV1.cs (2)
240_wrapped.WriteCData(new string(buffer, index, count)); 274_wrapped.WriteCData(new string(buffer, index, count));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlAutoDetectWriter.cs (2)
153WriteString(new string(buffer, index, count)); 158WriteRaw(new string(buffer, index, count));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlEventCache.cs (2)
380WriteString(new string(buffer, index, count)); 385WriteRaw(new string(buffer, index, count));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlRawWriter.cs (2)
174WriteString(new string(buffer, index, count)); 180WriteString(new string(buffer, index, count));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (6)
3857string badVersion = new string(_ps.chars, _ps.charPos, pos - _ps.charPos); 3862string encName = new string(_ps.chars, _ps.charPos, pos - _ps.charPos); 4760args[3] = new string(_ps.chars, _ps.charPos, endPos - _ps.charPos); 5014string val = new string(chars, _ps.charPos, pos - _ps.charPos); 8927return new string(_ps.chars, _ps.charPos, pos - _ps.charPos); 8932return new string(_ps.chars, _ps.charPos, 1);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImplHelpers.cs (2)
469_value = new string(_chars, _valueStartPos, _valueLength); 576_value = new string(_chars, _valueStartPos, _valueLength);
FrameworkFork\Microsoft.Xml\Xml\Dom\DocumentXmlWriter.cs (2)
344WriteString(new string(buffer, index, count)); 349WriteString(new string(buffer, index, count));
FrameworkFork\Microsoft.Xml\Xml\NameTable.cs (1)
130return AddEntry(new string(key, start, len), hashCode);
FrameworkFork\Microsoft.Xml\Xml\schema\DtdParser.cs (5)
3249return new string(_chars, _tokenStartPos, _curPos - _tokenStartPos); 3261return new string(_chars, _tokenStartPos, _curPos - _tokenStartPos - 1); 3273string val = (_stringBuilder.Length == 0) ? new string(_chars, _tokenStartPos, _curPos - _tokenStartPos - 1) : _stringBuilder.ToString(); 3609return new string(_chars, startPos, len > 0 ? len : 1); 3614return new string(_chars, startPos, 1);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (2)
1048string lengthString = new String(chars, pos + 1, len); 1086soapArrayInfo.qname = new String(chars, 0, pos + 1);
FrameworkFork\System.Runtime.Serialization\System\Xml\UniqueId.cs (2)
144_s = new string(chars, offset, count); 388_s = new string(chars, 0, length);
FrameworkFork\System.Runtime.Serialization\System\Xml\ValueHandle.cs (1)
835return new string(chars, 0, 2);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseWriter.cs (2)
1016WriteAttributeText(new string(chars, offset, count)); 1073WriteAttributeText(new string(chars, offset, count));
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBinaryWriter.cs (1)
650_attributeValue.WriteText(new string(chars, offset, count));
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBufferReader.cs (3)
523string value = new string(chars, 0, charCount); 617return new string(chars, 0, charCount); 703return new string(chars, 0, charCount);
FrameworkFork\System.ServiceModel\Internals\System\Runtime\UrlUtility.cs (1)
475return new String(_charBuffer, 0, _numChars);
InMemory.FunctionalTests (4)
RequestTests.cs (1)
639var id = new string(buffer, 0, offset);
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (3)
121$"Actual:{Environment.NewLine}{new string(actual, 0, offset)}{Environment.NewLine}", 125var actualText = new string(actual, 0, offset); 134var text = new string(ch, 0, count);
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgeryTokenSerializer.cs (1)
168return new string(chars, startIndex: 0, length: outputLength);
Microsoft.AspNetCore.Components.Server (1)
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\MessagePackReader.cs (1)
1127string value = new string(charArray, 0, initializedChars);
Microsoft.AspNetCore.HttpLogging (1)
W3CLoggingMiddleware.cs (1)
262return new string(src, 0, len);
Microsoft.AspNetCore.Mvc.ViewFeatures (3)
Buffers\ViewBufferTextWriter.cs (3)
88Buffer.AppendHtml(new string(buffer, index, count)); 194Buffer.AppendHtml(new string(buffer, index, count)); 229Buffer.AppendHtml(new string(value, start, offset));
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Buffers\PagedBufferedTextWriterTest.cs (1)
174var chunk = new string(Content, offset, chunkSize);
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
IISExpressDeployer.cs (1)
511var className = new string(buffer, 0, length);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (3)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (3)
121$"Actual:{Environment.NewLine}{new string(actual, 0, offset)}{Environment.NewLine}", 125var actualText = new string(actual, 0, offset); 134var text = new string(ch, 0, count);
Microsoft.AspNetCore.Shared.Tests (1)
WebEncodersTests.cs (1)
82var encodedString = new string(output, startIndex: 4, length: numEncodedChars);
Microsoft.Build.Framework (2)
NativeMethods.cs (2)
1045string fullPath = new(fullPathBuffer, 0, length); 1085string fullPath = new(fullPathBuffer, 0, length);
Microsoft.Build.UnitTests.Shared (1)
DriveMapping.cs (1)
75return new string(buffer, 4, buffer.Length - 4);
Microsoft.CodeAnalysis (1)
InternalUtilities\StringTable.cs (1)
497var text = new String(chars, start, len);
Microsoft.CodeAnalysis.CodeStyle (1)
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
497var text = new String(chars, start, len);
Microsoft.CodeAnalysis.CSharp (1)
Parser\SlidingTextWindow.cs (1)
465return new string(_characterWindow, offset, length);
Microsoft.CodeAnalysis.UnitTests (5)
XmlDocumentationCommentTextReaderTests.cs (5)
31XmlDocumentationCommentTextReader.Reader.CurrentEnd, new string(buffer, 0, charsRead)); 36Assert.Equal(" ", new string(buffer, 0, charsRead)); 46XmlDocumentationCommentTextReader.Reader.CurrentEnd, new string(buffer, 0, charsRead)); 56XmlDocumentationCommentTextReader.Reader.CurrentEnd, new string(buffer, 0, charsRead)); 66XmlDocumentationCommentTextReader.Reader.CurrentEnd, new string(buffer, 0, charsRead));
Microsoft.CodeAnalysis.Workspaces (1)
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
497var text = new String(chars, start, len);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (1)
497var text = new String(chars, start, len);
Microsoft.Extensions.Compliance.Abstractions (1)
Redaction\Redactor.cs (1)
53var redactedString = new string(buffer, 0, charsWritten);
Microsoft.Extensions.Compliance.Abstractions.Tests (3)
Redaction\RedactorTest.cs (3)
252Assert.Equal(data.ToString(), new string(buffer, 0, charsWritten)); 270Assert.Equal(data.ToString(), new string(buffer, 0, charsWritten)); 288Assert.Equal(data.ToString("R"), new string(buffer, 0, charsWritten));
Microsoft.ML.Core (2)
Data\ModelHeader.cs (2)
592return new string(chars, 0, cch); 617return new string(chars, 0, cch);
Microsoft.ML.Tokenizers (4)
Model\EnglishRobertaTokenizer.cs (1)
295string result = new string(buffer, 0, i);
Normalizer\BertNormalizer.cs (1)
116string result = index == 0 ? string.Empty : new string(buffer, 0, index).Normalize(NormalizationForm.FormC);
Normalizer\LowerCaseNormalizer.cs (1)
50string result = new string(arrayPoolArray, 0, length);
Normalizer\UpperCaseNormalizer.cs (1)
50string result = new string(arrayPoolArray, 0, length);
Microsoft.NET.StringTools.net35 (1)
InternableString.Simple.cs (1)
18return new string(charArray, start, length);
MSBuildTaskHost (2)
NativeMethods.cs (2)
1045string fullPath = new(fullPathBuffer, 0, length); 1085string fullPath = new(fullPathBuffer, 0, length);
PresentationFramework (8)
System\Windows\Documents\ImmComposition.cs (2)
1405surrounding = surrounding.Insert(0, new string(buffer, 0, copied)); 1456surrounding += new string(buffer, 0, copied);
System\Windows\Documents\RangeContentEnumerator.cs (1)
109_currentCache = new string(_buffer, 0, offset);
System\Windows\Documents\Speller.cs (1)
944string word = new(data.TextMap.Text, sTextRange.Start, sTextRange.Length);
System\Windows\Documents\TextFindEngine.cs (1)
244string textString = new string(findText, textStartIndex, findTextLength);
System\Windows\Documents\TextStore.cs (3)
463"text:", startIndex, endIndex, cchReq, charsCopied, new String(text, 0, charsCopied), 480"text:", startIndex, endIndex, cch, new String(text, 0, cch)); 663flags, new String(text, 0, cch));
ScenarioTests.Common.Tests (1)
ScenarioTestHelpers.cs (1)
246return new string(chars, 0, chars.Length);
Sockets.BindTests (3)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (3)
121$"Actual:{Environment.NewLine}{new string(actual, 0, offset)}{Environment.NewLine}", 125var actualText = new string(actual, 0, offset); 134var text = new string(ch, 0, count);
Sockets.FunctionalTests (3)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (3)
121$"Actual:{Environment.NewLine}{new string(actual, 0, offset)}{Environment.NewLine}", 125var actualText = new string(actual, 0, offset); 134var text = new string(ch, 0, count);
System.Data.Common (18)
System\Data\Filter\BinaryNode.cs (1)
1652substring = new string(constchars, 0, newLength);
System\Data\Filter\ExpressionParser.cs (14)
217throw ExprException.MissingOperator(new string(_text, _start, _pos - _start)); 282str = new string(_text, _start, _pos - _start); 286str = new string(_text, _start, _pos - _start); 290str = new string(_text, _start, _pos - _start); 297str = new string(_text, _start + 1, _pos - _start - 2); 304str = new string(_text, _start + 1, _pos - _start - 2); 517throw ExprException.MissingOperator(new string(_text, _start, _pos - _start)); 544throw ExprException.UnknownToken(new string(_text, _start, _pos - _start), _start + 1); 974throw ExprException.UnknownToken(new string(text, _start, _pos - _start), _start + 1); 1069throw ExprException.InvalidNameBracketing(new string(text, _start, (_pos - 1) - _start)); 1092throw ExprException.InvalidDate(new string(text, _start, (_pos - 1) - _start)); 1094throw ExprException.InvalidDate(new string(text, _start, _pos - _start)); 1114string name = new string(text, _start, _pos - _start); 1167throw ExprException.InvalidString(new string(text, _start, (_pos - 1) - _start));
System\Data\Filter\NameNode.cs (2)
209throw ExprException.InvalidName(new string(text, saveStart, savePos - saveStart)); 211return new string(text, start, pos - start);
System\Data\SQLTypes\SQLChars.cs (1)
518writer.WriteString(new string(value, 0, (int)(Length)));
System.Net.Http (1)
System\Net\Http\Headers\HeaderDescriptor.cs (1)
268decoded = new string(rented, 0, charsWritten);
System.Net.HttpListener (1)
System\Net\HttpListenerRequest.cs (1)
526return new string(_charBuffer, 0, _numChars);
System.Net.Requests (1)
System\Net\CommandStream.cs (1)
600string szResponse = new string(chars, 0, numChars);
System.Net.Security (1)
System\Net\Security\SslApplicationProtocol.cs (1)
104return new string(byteChars, 0, byteChars.Length - 1);
System.Private.CoreLib (4)
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.Icu.cs (1)
578CultureInfo ci = CultureInfo.GetCultureInfo(new string(chars, index, length));
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (2)
929retVal = new string(charBuffer, charPos, idxOfNewline); 976retVal = new string(arrayPoolBuffer, 0, arrayPoolBufferPos);
src\libraries\System.Private.CoreLib\src\System\Net\WebUtility.cs (1)
664return new string(_charBuffer!, 0, _numChars);
System.Private.DataContractSerialization (9)
System\Runtime\Serialization\Json\XmlJsonWriter.cs (2)
410WriteString(new string(buffer, index, count)); 699WriteString(new string(buffer, index, count));
System\Text\BinHexEncoding.cs (1)
45throw new FormatException(SR.Format(SR.XmlInvalidBinHexSequence, new string(chars, error, 2), error));
System\Xml\UniqueId.cs (1)
112_s = new string(chars, offset, count);
System\Xml\XmlBaseWriter.cs (2)
1037WriteAttributeText(new string(chars, offset, count)); 1089WriteAttributeText(new string(chars, offset, count));
System\Xml\XmlBufferReader.cs (3)
480string value = new string(chars, 0, charCount); 542return new string(chars, 0, charCount); 628return new string(chars, 0, charCount);
System.Private.Uri (2)
System\Uri.cs (2)
1046return new string(result, 0, count); 5033return new string(dest, 0, count);
System.Private.Xml (36)
System\Xml\Cache\XPathDocumentBuilder.cs (2)
383WriteString(new string(buffer, index, count), TextBlockType.Text); 396WriteString(new string(buffer, index, count), TextBlockType.Text);
System\Xml\Core\QueryOutputWriter.cs (2)
285_wrapped.WriteCData(new string(buffer, index, count)); 311_wrapped.WriteCData(new string(buffer, index, count));
System\Xml\Core\QueryOutputWriterV1.cs (2)
244_wrapped.WriteCData(new string(buffer, index, count)); 280_wrapped.WriteCData(new string(buffer, index, count));
System\Xml\Core\XmlAutoDetectWriter.cs (2)
152WriteString(new string(buffer, index, count)); 157WriteRaw(new string(buffer, index, count));
System\Xml\Core\XmlEventCache.cs (2)
373WriteString(new string(buffer, index, count)); 378WriteRaw(new string(buffer, index, count));
System\Xml\Core\XmlRawWriter.cs (2)
167WriteString(new string(buffer, index, count)); 173WriteString(new string(buffer, index, count));
System\Xml\Core\XmlRawWriterAsync.cs (2)
132return WriteStringAsync(new string(buffer, index, count)); 138return WriteStringAsync(new string(buffer, index, count));
System\Xml\Core\XmlTextReaderImpl.cs (6)
3795string badVersion = new string(_ps.chars, _ps.charPos, pos - _ps.charPos); 3800string encName = new string(_ps.chars, _ps.charPos, pos - _ps.charPos); 4661args[3] = new string(_ps.chars, _ps.charPos, endPos - _ps.charPos); 4886string val = new string(chars, _ps.charPos, pos - _ps.charPos); 8792return new string(_ps.chars, _ps.charPos, pos - _ps.charPos); 8797return new string(_ps.chars, _ps.charPos, 1);
System\Xml\Core\XmlTextReaderImplAsync.cs (4)
1376string badVersion = new string(_ps.chars, _ps.charPos, pos - _ps.charPos); 1381string encName = new string(_ps.chars, _ps.charPos, pos - _ps.charPos); 2294args[3] = new string(_ps.chars, _ps.charPos, endPos - _ps.charPos); 2529string val = new string(chars, _ps.charPos, pos - _ps.charPos);
System\Xml\Core\XmlTextReaderImplHelpers.cs (2)
452_value = new string(_chars, _valueStartPos, _valueLength); 569_value = new string(_chars, _valueStartPos, _valueLength);
System\Xml\Dom\DocumentXmlWriter.cs (2)
343WriteString(new string(buffer, index, count)); 348WriteString(new string(buffer, index, count));
System\Xml\NameTable.cs (1)
109return AddEntry(new string(key, start, len), hashCode);
System\Xml\Schema\DtdParser.cs (5)
3173return new string(_chars, _tokenStartPos, _curPos - _tokenStartPos); 3185return new string(_chars, _tokenStartPos, _curPos - _tokenStartPos - 1); 3197string val = (_stringBuilder.Length == 0) ? new string(_chars, _tokenStartPos, _curPos - _tokenStartPos - 1) : _stringBuilder.ToString(); 3524return new string(_chars, startPos, len > 0 ? len : 1); 3529return new string(_chars, startPos, 1);
System\Xml\XPath\Internal\StringFunctions.cs (2)
252return new string(chars, 0, modifyPos + 1); 282return new string(chars, 0, modifyPos + 1);
System.Private.Xml.Linq (2)
System\Xml\Linq\XNodeBuilder.cs (2)
76AddString(new string(buffer, index, count)); 158AddString(new string(buffer, index, count));
System.Windows.Forms.Primitives (1)
System\Windows\Forms\Internals\UnicodeCharBuffer.cs (1)
33string result = new(_buffer, _offset, i - _offset);
UIAutomationClient (1)
MS\Internal\Automation\Misc.cs (1)
708return new string(ach, 0, dest);
UIAutomationClientSideProviders (3)
MS\Internal\AutomationProxies\CommonXSendMessage.cs (1)
131return new string(achRes, 0, length);
MS\Internal\AutomationProxies\Misc.cs (1)
1661return new string(ach, 0, dest);
MS\Internal\AutomationProxies\WindowsHyperlink.cs (1)
316return new string(ach, 0, dest);
UIAutomationTypes (1)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (1)
2406string result = new string(buffer, offset, i - offset);