16462 references to Length
aspire (310)
aspire-managed (2)
Aspire.Azure.Messaging.ServiceBus (3)
Aspire.Azure.Npgsql (1)
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL (1)
Aspire.Cli.EndToEnd.Tests (26)
Aspire.Cli.Tests (27)
Aspire.Dashboard (371)
Aspire.Dashboard.Components.Tests (4)
Aspire.Dashboard.Tests (4)
Aspire.Deployment.EndToEnd.Tests (18)
Aspire.EndToEnd.Tests (1)
Aspire.Hosting (273)
Aspire.Hosting.Analyzers (6)
Aspire.Hosting.Analyzers.Tests (1)
Aspire.Hosting.Azure (59)
Aspire.Hosting.Azure.AppContainers (6)
Aspire.Hosting.Azure.AppService (1)
Aspire.Hosting.Azure.Functions (7)
Aspire.Hosting.Azure.KeyVault (1)
Aspire.Hosting.Azure.Kubernetes (5)
Aspire.Hosting.Azure.Sql (1)
Aspire.Hosting.Azure.Tests (5)
Aspire.Hosting.Azure.WebPubSub (6)
Aspire.Hosting.Blazor (2)
Aspire.Hosting.Browsers (19)
Aspire.Hosting.Browsers.Tests (19)
Aspire.Hosting.CodeGeneration.Go (3)
Aspire.Hosting.CodeGeneration.Java (17)
Aspire.Hosting.CodeGeneration.Python (8)
Aspire.Hosting.CodeGeneration.Rust (1)
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
Aspire.Hosting.CodeGeneration.TypeScript (9)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
Aspire.Hosting.DevTunnels (6)
Aspire.Hosting.Docker (5)
Aspire.Hosting.Dotnet (12)
Aspire.Hosting.EntityFrameworkCore (6)
Aspire.Hosting.Foundry (4)
Aspire.Hosting.GitHub.Models (2)
Aspire.Hosting.Go (2)
Aspire.Hosting.Integration.Analyzers (6)
Aspire.Hosting.Java (24)
Aspire.Hosting.Java.Tests (2)
Aspire.Hosting.JavaScript (8)
Aspire.Hosting.Kubernetes (10)
Aspire.Hosting.Maui (8)
Aspire.Hosting.OpenAI (6)
Aspire.Hosting.Orleans (1)
Aspire.Hosting.RabbitMQ (4)
Aspire.Hosting.Radius (17)
Aspire.Hosting.RemoteHost (25)
Aspire.Hosting.Rust (18)
Aspire.Hosting.Rust.Tests (3)
Aspire.Hosting.Sdk.Tests (2)
Aspire.Hosting.SqlServer.Tests (1)
Aspire.Hosting.Tasks (3)
Aspire.Hosting.Testing (4)
Aspire.Hosting.Testing.Tests (9)
Aspire.Hosting.Tests (22)
Dashboard\DashboardServiceTests.cs (7)
71l => Assert.Equal(LongLineCharacters, l.Text.Split(' ')[1].Length),
72l => Assert.Equal(LongLineCharacters, l.Text.Split(' ')[1].Length));
76l => Assert.Equal(LongLineCharacters, l.Text.Split(' ')[1].Length),
124l => Assert.Equal(DashboardServiceImpl.LogMaxBatchCharacters, l.Text.Length));
128l => Assert.Equal(LongLineCharacters, l.Text.Split(' ')[1].Length),
129l => Assert.Equal(LongLineCharacters, l.Text.Split(' ')[1].Length));
133l => Assert.Equal(LongLineCharacters, l.Text.Split(' ')[1].Length));
Aspire.Hosting.TestUtilities (4)
Aspire.Playground.Tests (5)
Aspire.Templates.Tests (1)
Aspire.TerminalHost (4)
Aspire.TestTools (2)
Aspire.TestUtilities (1)
BasketService (24)
blazor-gateway (1)
cdac-build-tool (7)
ConfigurationSchemaGenerator (7)
crossgen2 (2)
Crossgen2Tasks (3)
csc (3)
CSharpSyntaxGenerator (9)
DevTunnels.ApiService (1)
dotnet (106)
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.11.0-1.26424.106\contentFiles\cs\net11.0\BuildProtocol.cs (1)
648writer.Write(value.Length);
dotnet-aot (19)
dotnet-dev-certs (9)
dotnet-format (10)
dotnet-getdocument (7)
dotnet-Microsoft.XmlSerializer.Generator (6)
dotnet-openapi (7)
dotnet-razorpagegenerator (6)
dotnet-sourcelink (6)
dotnet-sql-cache (7)
dotnet-suggest (12)
dotnet-svcutil-lib (1398)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (38)
476if (url == null || url.Length == 0)
516if (context == null || context.BaseURI == null || context.BaseURI.Length == 0)
583if (url.Length == 0)
614if (context.BaseURI != null && context.BaseURI.Length > 0 &&
617if (baseUriStr.Length > 0)
707if (context.BaseURI != null && context.BaseURI.Length > 0 &&
710if (baseUriStr.Length > 0)
2439if (_ps.baseUriStr.Length > 0 && _ps.baseUri == null && _xmlResolver != null)
2656Debug.Assert((systemId != null && systemId.Length > 0) || (publicId != null && publicId.Length > 0));
2692RegisterConsumedCharacters(internalDtd.Length, false);
3030int len = str.Length;
3032str.CopyTo(0, _ps.chars, 0, str.Length);
3133Debug.Assert(_url != null && _url.Length > 0);
4462if (prefixLen == _lastPrefix.Length && XmlConvert.StrEqual(chars, startPos, prefixLen, _lastPrefix))
4605string qname = (prefix.Length == 0) ? defaultAttributeInfo.LocalName : (prefix + ':' + defaultAttributeInfo.LocalName);
4625int prefLen = startTagNode.prefix.Length;
4626int locLen = startTagNode.localName.Length;
4638if (startTagNode.prefix.Length == 0)
5030if (attr.prefix.Length == 0)
5091if (_curNode.prefix.Length == 0)
5106if (at.type == XmlNodeType.Attribute && at.prefix.Length > 0)
5177if (ns.Length == 0)
6305_curNode.lineInfo.linePos += _curNode.localName.Length;
7825if (prefixLen == _lastPrefix.Length && XmlConvert.StrEqual(_ps.chars, startPos, prefixLen, _lastPrefix))
7944if (uri.Length == 0 && prefix.Length > 0)
7958if (prefix.Length == 0)
8188RegisterConsumedCharacters(entity.Text.Length, true);
8958if (Ref.Equal(_nodes[i].localName, name) && _nodes[i].prefix.Length == 0)
9316if (defAttrInfo.Prefix.Length > 0)
9369if (prefix.Length == 0 && ns.Length > 0)
9405NodeData attr = AddAttribute(localName, prefix, prefix.Length > 0 ? null : localName);
9417if (attr.prefix.Length == 0)
9427if (_nodes[_index].prefix.Length == 0)
9701Debug.Assert(endPos < str.Length);
9745int len = value.Length;
FrameworkFork\Microsoft.Xml\Xml\schema\DtdParser.cs (23)
281if (docTypeName == null || docTypeName.Length == 0)
301if (systemId != null && systemId.Length > 0)
311if (publicId != null && publicId.Length > 0)
321if (internalSubset != null && internalSubset.Length > 0)
481if (_systemId != null && _systemId.Length > 0)
496if (_systemId != null && _systemId.Length > 0)
694if (attrDef != null && attrDef.Prefix.Length > 0 && attrDef.Prefix.Equals("xml") && attrDef.Name.Name == "space")
718if (attrDef.Prefix.Length > 0 && attrDef.Prefix.Equals("xml"))
956SendValidationEvent(_curPos - name.Name.Length, XmlSeverityType.Error, ResXml.Sch_DupElementDecl, GetNameString());
1240entity.DeclaredURI = (_externalDtdBaseUri.Length == 0) ? _documentBaseUri : _externalDtdBaseUri;
1344SendValidationEvent(_curPos - notationName.Name.Length, XmlSeverityType.Error, ResXml.Sch_DupNotation, notationName.Name);
1377UndeclaredNotation un = new UndeclaredNotation(notationName, LineNo, LinePos - notationName.Length);
1507Throw(_curPos - systemId.Length - 1, ResXml.Xml_FragmentId, new string[] { systemId.Substring(systemId.IndexOf('#')), systemId });
1525ThrowInvalidChar(_curPos - 1 - publicId.Length + i, publicId, i);
3333Throw(_curPos - entityName.Name.Length - 1, ResXml.Xml_InvalidParEntityRef);
3343Throw(_curPos - entityName.Name.Length - 1, paramEntity ? ResXml.Xml_RecursiveParEntity : ResXml.Xml_RecursiveGenEntity, entityName.Name);
3357if (entity.Text.Length == 0)
3436SendValidationEvent(_curPos - entityName.Name.Length - 1, XmlSeverityType.Error, ResXml.Xml_UndeclaredParEntity, entityName.Name);
3445SendValidationEvent(_curPos - entityName.Name.Length - 1, XmlSeverityType.Error, ResXml.Xml_UndeclaredEntity, entityName.Name);
3450Throw(_curPos - entityName.Name.Length - 1, ResXml.Xml_UndeclaredEntity, entityName.Name);
3458Throw(_curPos - entityName.Name.Length - 1, ResXml.Xml_UnparsedEntityRef, entityName.Name);
3463Throw(_curPos - entityName.Name.Length - 1, ResXml.Xml_ExternalEntityInAttValue, entityName.Name);
3624int len = value.Length;
FrameworkFork\Microsoft.Xml\Xml\schema\Inference\infer.cs (62)
270if (ns.Length != 0)
346if (childURI.Length == 0)
362if (childURI.Length != 0)
366if (prefix.Length != 0 && String.Compare(prefix, "xml", StringComparison.OrdinalIgnoreCase) != 0)
377if (childURI.Length != 0) //BUGBUG It need not be an attribute reference if there is a namespace, it can be attribute with attributeFormDefault = qualified
487if (childURI.Length != 0)
502Debug.Assert(targetNS == null || targetNS.Length > 0, "targetns for schema is empty");
557if (prefix.Length != 0)
1065if (childURI.Length == 0)
1442if (attr.RefName.Name.Length == 0)
1771if (s.Length == 0) return TF_string;
1798if (i == s.Length)
1817i++; if (i == s.Length) return TF_decimal | TF_float | TF_double | TF_string; //"9999.9" was matched
1830i++; if (i == s.Length) return TF_string;
1843i++; if (i == s.Length) return TF_string; //".9999e+" was matched
1849i++; if (i == s.Length) return TF_float | TF_double | TF_string; //".9999e+99" was matched
1856i++; if (i == s.Length) return TF_string;
1872i++; if (i == s.Length) return TF_string;
1886i++; if (i == s.Length) return TF_string;
1897i++; if (i == s.Length) return TF_string; //"P999" was matched
1914if (i == s.Length)
1930i++; if (i == s.Length) return TF_string; //"P999Y9" was matched
1945if (i == s.Length)
1961i++; if (i == s.Length) return TF_string; //"P999Y999M9" was matched
1974if (i == s.Length)
1987i++; if (i == s.Length) return TF_string; //"P999Y999M9999DT" was matched
1993i++; if (i == s.Length) return TF_string; //"___T9" was matched
2012if (i == s.Length)
2022i++; if (i == s.Length) return TF_string; //"___T999H9" was matched
2039if (i == s.Length)
2049i++; if (i == s.Length) return TF_string; //"___T999H999M9" was matched
2064if (i == s.Length)
2074i++; if (i == s.Length) return TF_string; //"___T999H999M999.9" was matched
2087if (i == s.Length)
2105if (i == s.Length)
2136if (i == s.Length)
2165if (i == s.Length)
2190if (i == s.Length)
2218i++; if (i == s.Length) return TF_string; //"9999-"
2221i++; if (i == s.Length) return TF_string; //"9999-9"
2225if (i == s.Length)
2245i++; if (i == s.Length) return TF_string; //"9999-99-"
2248i++; if (i == s.Length) return TF_string; //"9999-99-9"
2251i++; if (i == s.Length) return DateTime(s, bDate, bTime); //"9999-99-99"
2271if (i == s.Length)
2286i++; if (i == s.Length) return TF_string;
2289i++; if (i == s.Length) return TF_string;
2292i++; if (i == s.Length) return TF_string;
2296i++; if (i == s.Length) return TF_string;
2299i++; if (i == s.Length) return TF_string;
2303if (i == s.Length)
2317i++; if (i == s.Length) return TF_string;
2320i++; if (i == s.Length) return TF_string;
2323i++; if (i == s.Length) return TF_string;
2327i++; if (i == s.Length) return TF_string;
2330i++; if (i == s.Length) return TF_string;
2333i++; if (i == s.Length) return TF_string;
2336i++; if (i == s.Length) return TF_string;
2339i++; if (i == s.Length) return TF_string;
2342i++; if (i == s.Length) return DateTime(s, bDate, bTime);
2357i++; if (i == s.Length) return TF_string;
2361i++; if (i == s.Length) return DateTime(s, bDate, bTime);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlWriterDelegator.cs (1)
85if (ns.Length == 0)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationDescription.cs (1)
43if (name.Length == 0)
FrameworkFork\System.ServiceModel\System\ServiceModel\MessageContractMemberAttribute.cs (1)
31if (value.Length > 0)
FrameworkFork\System.Web.Services\Services\Description\ServiceDescriptionSerializer.cs (80)
681if ((((global::System.String)o.@Encoding) != null) && (((global::System.String)o.@Encoding).Length != 0))
730if ((((global::System.String)o.@Encoding) != null) && (((global::System.String)o.@Encoding).Length != 0))
1141if ((((global::System.String)o.@Namespace) != null) && (((global::System.String)o.@Namespace).Length != 0))
1145if ((((global::System.String)o.@Encoding) != null) && (((global::System.String)o.@Encoding).Length != 0))
1181if ((((global::System.String)o.@Namespace) != null) && (((global::System.String)o.@Namespace).Length != 0))
1185if ((((global::System.String)o.@Encoding) != null) && (((global::System.String)o.@Encoding).Length != 0))
1223if ((((global::System.String)o.@Encoding) != null) && (((global::System.String)o.@Encoding).Length != 0))
1227if ((((global::System.String)o.@Namespace) != null) && (((global::System.String)o.@Namespace).Length != 0))
1265if ((((global::System.String)o.@Encoding) != null) && (((global::System.String)o.@Encoding).Length != 0))
1269if ((((global::System.String)o.@Namespace) != null) && (((global::System.String)o.@Namespace).Length != 0))
1306if ((((global::System.String)o.@Encoding) != null) && (((global::System.String)o.@Encoding).Length != 0))
1310if ((((global::System.String)o.@Namespace) != null) && (((global::System.String)o.@Namespace).Length != 0))
1348if ((((global::System.String)o.@Encoding) != null) && (((global::System.String)o.@Encoding).Length != 0))
1352if ((((global::System.String)o.@Namespace) != null) && (((global::System.String)o.@Namespace).Length != 0))
1841if ((((global::System.String)o.@ParameterOrderString) != null) && (((global::System.String)o.@ParameterOrderString).Length != 0))
2861if ((((global::System.String)o.@Name) != null) && (((global::System.String)o.@Name).Length != 0))
3006if ((((global::System.String)o.@XPath) != null) && (((global::System.String)o.@XPath).Length != 0))
5245((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
5348((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
5434((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
5712((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
5806((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
5909((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
6166((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
7196((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
7837((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
7925((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
8019((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
8101((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
8183((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
8261((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
8352((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
8425((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
8538((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
8660((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
8760((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
8838((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
8918((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
8996((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
9085((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
9197((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
9289((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
9393((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
9483((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
9623((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
9710((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
9797((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
9884((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
9971((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
10058((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
10145((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
10232((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
10319((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
10406((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
10493((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
10580((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
10662((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
10858((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
10968((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
11059((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
11142((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
11234((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
11346((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
11477((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
11569((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
11681((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
11769((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
11886((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
11963((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
12056((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
12153((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
12301((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
12394((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
12510((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
12625((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
12732((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
12815((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
12917((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
12999((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
13081((Microsoft.Xml.Serialization.XmlSerializerNamespaces)o.@Namespaces).Add(Reader.Name.Length == 5 ? "" : Reader.LocalName, Reader.Value);
dotnet-svcutil-lib.Tests (3)
dotnet-svcutil.xmlserializer (17)
dotnet-user-jwts (11)
dotnet-user-secrets (7)
dotnet-watch (7)
EventSourceGenerator (1)
GenerateAnalyzerNuspec (12)
GenerateDocumentationAndConfigFiles (194)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (6)
145for (var i = 0; i < text.Length; i++)
611var tokenPosition = lastText.ConvertTabToSpace(Options.TabSize, initialColumn, lastText.Length);
741for (var i = this.OriginalString.Length - 1; i >= 0; i--)
889spaces: text.ConvertTabToSpace(Options.TabSize, lineColumn.With(whitespaceBetween).Column, text.Length),
925spaces: lineText.GetColumnFromLineOffset(lineText.Length, Options.TabSize),
931spaces: text.ConvertTabToSpace(Options.TabSize, initialColumn, text.Length),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
391if (name.Length > 0)
GetDocument.Insider (7)
HelixTestTasks (1)
ILAssembler (5)
ilc (13)
ILCompiler.Compiler (46)
ILCompiler.MetadataTransform (9)
ILCompiler.ReadyToRun (36)
ILCompiler.RyuJit (14)
ILCompiler.TypeSystem (17)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\Utilities\CustomAttributeTypeNameFormatter.cs (1)
133if (ns.Length > 0)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\Utilities\ExceptionTypeNameFormatter.cs (1)
101if (ns.Length > 0)
illink (34)
ILLink.RoslynAnalyzer (28)
ILLink.Tasks (4)
Infrastructure.Tests (39)
installer.tasks (2)
Microsoft.Analyzers.Extra (4)
Microsoft.Analyzers.Extra.Tests (2)
Microsoft.Analyzers.Local (3)
Microsoft.Analyzers.Local.Tests (2)
Microsoft.Arcade.Common (9)
Microsoft.AspNetCore (1)
Microsoft.AspNetCore.Antiforgery (9)
Microsoft.AspNetCore.App.Analyzers (24)
Microsoft.AspNetCore.Authentication.BearerToken (1)
Microsoft.AspNetCore.Authentication.Cookies (9)
Microsoft.AspNetCore.Authentication.JwtBearer (1)
Microsoft.AspNetCore.Authentication.Negotiate (6)
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
Microsoft.AspNetCore.Components (51)
Microsoft.AspNetCore.Components.AI (6)
Microsoft.AspNetCore.Components.AI.SourceGenerators (1)
Microsoft.AspNetCore.Components.Endpoints (21)
Microsoft.AspNetCore.Components.QuickGrid (4)
Microsoft.AspNetCore.Components.Server (4)
Microsoft.AspNetCore.Components.Web (3)
Microsoft.AspNetCore.Components.WebAssembly (5)
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
Microsoft.AspNetCore.Components.WebView (3)
Microsoft.AspNetCore.Cryptography.Internal (1)
Microsoft.AspNetCore.Cryptography.KeyDerivation (5)
Microsoft.AspNetCore.DataProtection (4)
Microsoft.AspNetCore.DataProtection.Abstractions (6)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (2)
Microsoft.AspNetCore.Diagnostics (4)
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Microsoft.AspNetCore.Diagnostics.Middleware.PerformanceTests (1)
Microsoft.AspNetCore.Grpc.JsonTranscoding (29)
Microsoft.AspNetCore.HeaderParsing (2)
Microsoft.AspNetCore.HostFiltering (1)
Microsoft.AspNetCore.Hosting (5)
Microsoft.AspNetCore.Http (14)
Microsoft.AspNetCore.Http.Abstractions (29)
Microsoft.AspNetCore.Http.Connections (6)
Microsoft.AspNetCore.Http.Connections.Client (1)
Microsoft.AspNetCore.Http.Extensions (17)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (4)
Microsoft.AspNetCore.Http.Results (3)
Microsoft.AspNetCore.HttpLogging (6)
Microsoft.AspNetCore.HttpOverrides (2)
Microsoft.AspNetCore.Identity.UI (4)
Microsoft.AspNetCore.InternalTesting (11)
Microsoft.AspNetCore.JsonPatch (3)
Microsoft.AspNetCore.JsonPatch.SystemTextJson (3)
Microsoft.AspNetCore.Localization (2)
Microsoft.AspNetCore.Mvc.Abstractions (11)
Microsoft.AspNetCore.Mvc.Core (77)
Microsoft.AspNetCore.Mvc.Localization (3)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (6)
Microsoft.AspNetCore.Mvc.Razor (10)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (21)
src\aspnetcore\src\Mvc\Mvc.RazorPages\src\ApplicationModels\PageRouteModelFactory.cs (13)
93areaRootEndIndex >= relativePath.Length - 1 || // There's at least one token after the area root.
102if (areaEndIndex == -1 || areaEndIndex == relativePath.Length)
110if (string.Compare(relativePath, areaEndIndex, AreaPagesRoot, 0, AreaPagesRoot.Length, StringComparison.OrdinalIgnoreCase) != 0)
117var pageNameIndex = areaEndIndex + AreaPagesRoot.Length - 1;
118var viewEnginePath = relativePath.Substring(pageNameIndex, relativePath.Length - pageNameIndex - RazorViewEngine.ViewExtension.Length);
131var startIndex = rootDirectory.Length - 1;
132var endIndex = path.Length - RazorViewEngine.ViewExtension.Length;
144return string.Create(1 + areaName.Length + viewEnginePath.Length, (areaName, viewEnginePath), (span, tuple) =>
152span = span.Slice(areaNameValue.Length);
176if (directory.Length > 1 && !directory.EndsWith('/'))
Microsoft.AspNetCore.Mvc.RazorPages (22)
ApplicationModels\PageRouteModelFactory.cs (13)
93areaRootEndIndex >= relativePath.Length - 1 || // There's at least one token after the area root.
102if (areaEndIndex == -1 || areaEndIndex == relativePath.Length)
110if (string.Compare(relativePath, areaEndIndex, AreaPagesRoot, 0, AreaPagesRoot.Length, StringComparison.OrdinalIgnoreCase) != 0)
117var pageNameIndex = areaEndIndex + AreaPagesRoot.Length - 1;
118var viewEnginePath = relativePath.Substring(pageNameIndex, relativePath.Length - pageNameIndex - RazorViewEngine.ViewExtension.Length);
131var startIndex = rootDirectory.Length - 1;
132var endIndex = path.Length - RazorViewEngine.ViewExtension.Length;
144return string.Create(1 + areaName.Length + viewEnginePath.Length, (areaName, viewEnginePath), (span, tuple) =>
152span = span.Slice(areaNameValue.Length);
176if (directory.Length > 1 && !directory.EndsWith('/'))
Microsoft.AspNetCore.Mvc.TagHelpers (7)
Microsoft.AspNetCore.Mvc.ViewFeatures (11)
Microsoft.AspNetCore.OpenApi (5)
Microsoft.AspNetCore.OpenApi.SourceGenerators (2)
Microsoft.AspNetCore.OutputCaching (5)
Microsoft.AspNetCore.ResponseCaching (5)
Microsoft.AspNetCore.Rewrite (8)
Microsoft.AspNetCore.Routing (60)
Microsoft.AspNetCore.Server.HttpSys (22)
Microsoft.AspNetCore.Server.IIS (19)
Microsoft.AspNetCore.Server.Kestrel.Core (93)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (3)
Microsoft.AspNetCore.Session (2)
Microsoft.AspNetCore.Watch.BrowserRefresh (1)
Microsoft.AspNetCore.WebSockets (5)
Microsoft.AspNetCore.WebUtilities (24)
Microsoft.Build (341)
BackEnd\Components\Logging\BuildErrorTelemetryTracker.cs (9)
153if (errorCode!.Length < 2)
174('C', 'V') when errorCode.Length >= 3 && char.ToUpperInvariant(errorCode[2]) == 'T' => ErrorCategory.NativeToolchain, // CVT*
178('I', 'D') when errorCode.Length >= 3 && char.ToUpperInvariant(errorCode[2]) == 'E' => ErrorCategory.CodeAnalysis, // IDE*
181('L', 'N') when errorCode.Length >= 3 && char.ToUpperInvariant(errorCode[2]) == 'K' => ErrorCategory.NativeToolchain, // LNK*
185('M', 'S') when errorCode.Length >= 3 && char.ToUpperInvariant(errorCode[2]) == 'B' => CategorizeMSBError(errorCode.AsSpan()),
208=> errorCode.Length >= 3 && char.ToUpperInvariant(errorCode[2]) == 'P';
215=> errorCode.Length >= 6 &&
227if (value.Length < 2)
239('V', 'B') => value.Length >= 3 && char.ToUpperInvariant(value[2]) == 'C', // VBC* -> VB compiler
Construction\ProjectItemElement.cs (15)
105ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || (Remove.Length == 0 && Update.Length == 0), "OM_OneOfAttributeButNotMore", ElementName, XMakeAttributes.include, XMakeAttributes.remove, XMakeAttributes.update);
127ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || Remove.Length == 0, "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.exclude, XMakeAttributes.remove);
128ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || Update.Length == 0, "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.exclude, XMakeAttributes.update);
149ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || (Include.Length == 0 && Update.Length == 0), "OM_OneOfAttributeButNotMore", ElementName, XMakeAttributes.include, XMakeAttributes.remove, XMakeAttributes.update);
168ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || (Remove.Length == 0 && Include.Length == 0), "OM_OneOfAttributeButNotMore", ElementName, XMakeAttributes.include, XMakeAttributes.remove, XMakeAttributes.update);
191ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || RemoveMetadata.Length != 0, "OM_MatchOnMetadataOnlyApplicableToRemoveItems", ElementName, XMakeAttributes.matchOnMetadata);
211ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || MatchOnMetadata.Length != 0, "OM_MatchOnMetadataOptionsOnlyApplicableToItemsWithMatchOnMetadata", ElementName, XMakeAttributes.matchOnMetadataOptions);
232ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || RemoveMetadata.Length == 0, "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.removeMetadata, XMakeAttributes.keepMetadata);
253ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || KeepMetadata.Length == 0, "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.keepMetadata, XMakeAttributes.removeMetadata);
480ErrorUtilities.VerifyThrowInvalidOperation(parent.Parent is ProjectTargetElement || (Include.Length > 0 || Update.Length > 0 || Remove.Length > 0), "OM_ItemsOutsideTargetMustHaveIncludeOrUpdateOrRemove");
Evaluation\Expander.PropertyExpander.cs (12)
157results.Add(expression.AsMemory(propertyStartIndex, expression.Length - propertyStartIndex));
158sourceIndex = expression.Length;
178else if ((expression.Length - (propertyStartIndex + 2)) > 9 && tryExtractRegistryFunction && s_invariantCompareInfo.IndexOf(expression, "Registry:", propertyStartIndex + 2, 9, CompareOptions.OrdinalIgnoreCase) == propertyStartIndex + 2)
226if (value.Length > CharacterLimitPerExpansion)
244if (expression.Length - sourceIndex > 0)
246results.Add(expression.AsMemory(sourceIndex, expression.Length - sourceIndex));
271if (Char.IsWhiteSpace(propertyBody[0]) || Char.IsWhiteSpace(propertyBody[propertyBody.Length - 1]))
452return LookupProperty(properties, propertyName, 0, propertyName.Length - 1, elementLocation, propertiesUseTracker);
473if (startIndex != 0 || endIndex != propertyName.Length)
513if (elementLocation.File.Length == 0)
545int rootLength = Path.GetPathRoot(directory).Length;
581string valueName = lastAtSignOffset == -1 || lastAtSignOffset == registryLocation.Length - 1
Evaluation\Expander\WellKnownFunctions.cs (8)
271else if (string.Equals(methodName, nameof(string.Length), StringComparison.OrdinalIgnoreCase))
275returnVal = text.Length;
294if (ParseArgs.TryGetArg(args, out string? separator) && separator?.Length == 1)
307else if (ParseArgs.TryGetArgs(args, out totalWidth, out string? paddingChar) && paddingChar?.Length == 1)
320else if (ParseArgs.TryGetArgs(args, out totalWidth, out string? paddingChar) && paddingChar?.Length == 1)
328if (ParseArgs.TryGetArg(args, out string? trimChars) && trimChars?.Length > 0)
336if (ParseArgs.TryGetArg(args, out string? trimChars) && trimChars?.Length > 0)
888if (ParseArgs.TryGetArg(args, out string? arg0) && arg0?.Length == 1)
Evaluation\ExpressionShredder.cs (7)
76GetReferencedItemNamesAndMetadata(expression, 0, expression.Length, ref pair, ShredderOptions.All);
89GetReferencedItemNamesAndMetadata(expression, 0, expression.Length, ref pair, ShredderOptions.MetadataOutsideTransforms);
103return GetReferencedItemExpressions(expression, 0, expression.Length);
540int length = expression.Length;
608while (i < expression.Length && i < end)
697=> Sink(expression, ref i, expression.Length, c);
740=> SinkWhitespace(expression, ref i, expression.Length);
Evaluation\ProjectParser.cs (10)
298XmlAttributeWithLocation errorAttribute = remove.Length > 0 ? (XmlAttributeWithLocation)element.Attributes[XMakeAttributes.remove] : (XmlAttributeWithLocation)element.Attributes[XMakeAttributes.update];
306ProjectXmlUtilities.VerifyThrowProjectInvalidAttribute(exclude.Length == 0 || include.Length > 0, (XmlAttributeWithLocation)element.Attributes[XMakeAttributes.exclude]);
309ProjectErrorUtilities.VerifyThrowInvalidProject(include.Length > 0 || element.Attributes[XMakeAttributes.include] == null, element.Location, "MissingRequiredAttribute", XMakeAttributes.include, itemType);
312ProjectErrorUtilities.VerifyThrowInvalidProject(remove.Length > 0 || element.Attributes[XMakeAttributes.remove] == null, element.Location, "MissingRequiredAttribute", XMakeAttributes.remove, itemType);
315ProjectErrorUtilities.VerifyThrowInvalidProject(update.Length > 0 || element.Attributes[XMakeAttributes.update] == null, element.Location, "MissingRequiredAttribute", XMakeAttributes.update, itemType);
410ProjectErrorUtilities.VerifyThrowInvalidProject(!(parent is ProjectItemElement) || ((ProjectItemElement)parent).Remove.Length == 0, element.Location, "ChildElementsBelowRemoveNotAllowed", element.Name);
529ProjectErrorUtilities.VerifyThrowInvalidProject(element.GetAttribute(XMakeAttributes.taskName).Length > 0, element.Location, "ProjectTaskNameEmpty");
535(assemblyName.Length > 0) ^ (assemblyFile.Length > 0),
Microsoft.Build.Framework (203)
Microsoft.Build.Tasks.CodeAnalysis (21)
Microsoft.Build.Tasks.Core (114)
src\msbuild\src\Shared\AssemblyFolders\AssemblyFoldersEx.cs (3)
370if ((version.Length > 0) && version[0] is 'v' or 'V')
378if (String.Compare(version, 0, targetRuntimeVersion, 0, targetRuntimeVersion.Length, StringComparison.OrdinalIgnoreCase) == 0)
409if (String.Compare(version, 0, targetRuntimeVersion, 0, targetRuntimeVersion.Length, StringComparison.OrdinalIgnoreCase) == 0)
Microsoft.Build.Tasks.Git (54)
Microsoft.Build.Utilities.Core (14)
src\msbuild\src\Shared\AssemblyFolders\AssemblyFoldersEx.cs (3)
370if ((version.Length > 0) && version[0] is 'v' or 'V')
378if (String.Compare(version, 0, targetRuntimeVersion, 0, targetRuntimeVersion.Length, StringComparison.OrdinalIgnoreCase) == 0)
409if (String.Compare(version, 0, targetRuntimeVersion, 0, targetRuntimeVersion.Length, StringComparison.OrdinalIgnoreCase) == 0)
Microsoft.CodeAnalysis (275)
DocumentationComments\XmlDocumentationCommentTextReader.XmlStream.cs (9)
64_position = RootStart.Length;
108_position += EncodeAndAdvance(CurrentStart, _position - RootStart.Length, buffer, ref index, ref count);
111_position += EncodeAndAdvance(_text, _position - RootStart.Length - CurrentStart.Length, buffer, ref index, ref count);
114_position += EncodeAndAdvance(CurrentEnd, _position - RootStart.Length - CurrentStart.Length - _text.Length, buffer, ref index, ref count);
129if (destCount == 0 || srcIndex < 0 || srcIndex >= src.Length)
134int charCount = Math.Min(src.Length - srcIndex, destCount);
Microsoft.CodeAnalysis.Analyzers (213)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (6)
145for (var i = 0; i < text.Length; i++)
611var tokenPosition = lastText.ConvertTabToSpace(Options.TabSize, initialColumn, lastText.Length);
741for (var i = this.OriginalString.Length - 1; i >= 0; i--)
889spaces: text.ConvertTabToSpace(Options.TabSize, lineColumn.With(whitespaceBetween).Column, text.Length),
925spaces: lineText.GetColumnFromLineOffset(lineText.Length, Options.TabSize),
931spaces: text.ConvertTabToSpace(Options.TabSize, initialColumn, text.Length),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
391if (name.Length > 0)
Microsoft.CodeAnalysis.AnalyzerUtilities (191)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (6)
145for (var i = 0; i < text.Length; i++)
611var tokenPosition = lastText.ConvertTabToSpace(Options.TabSize, initialColumn, lastText.Length);
741for (var i = this.OriginalString.Length - 1; i >= 0; i--)
889spaces: text.ConvertTabToSpace(Options.TabSize, lineColumn.With(whitespaceBetween).Column, text.Length),
925spaces: lineText.GetColumnFromLineOffset(lineText.Length, Options.TabSize),
931spaces: text.ConvertTabToSpace(Options.TabSize, initialColumn, text.Length),
Microsoft.CodeAnalysis.CodeStyle (202)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (6)
145for (var i = 0; i < text.Length; i++)
611var tokenPosition = lastText.ConvertTabToSpace(Options.TabSize, initialColumn, lastText.Length);
741for (var i = this.OriginalString.Length - 1; i >= 0; i--)
889spaces: text.ConvertTabToSpace(Options.TabSize, lineColumn.With(whitespaceBetween).Column, text.Length),
925spaces: lineText.GetColumnFromLineOffset(lineText.Length, Options.TabSize),
931spaces: text.ConvertTabToSpace(Options.TabSize, initialColumn, text.Length),
Microsoft.CodeAnalysis.CodeStyle.Fixes (12)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
391if (name.Length > 0)
Microsoft.CodeAnalysis.CSharp (103)
Microsoft.CodeAnalysis.CSharp.CodeStyle (26)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (12)
Microsoft.CodeAnalysis.CSharp.Features (76)
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (6)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\CSharpIdentifiersShouldNotContainUnderscores.Fixer.cs (1)
21if (result.Length == 0)
Microsoft.CodeAnalysis.CSharp.Workspaces (34)
Microsoft.CodeAnalysis.Extensions.Package (18)
Microsoft.CodeAnalysis.Features (226)
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexEmbeddedCompletionProvider.cs (33)
234context.AddIfMissing("{n}", Regex_match_exactly_n_times_short, Regex_match_exactly_n_times_long, parentOpt: null, positionOffset: "{".Length, insertionText: "{}");
235context.AddIfMissing("{n}?", Regex_match_exactly_n_times_lazy_short, Regex_match_exactly_n_times_lazy_long, parentOpt: null, positionOffset: "{".Length, insertionText: "{}?");
237context.AddIfMissing("{n,}", Regex_match_at_least_n_times_short, Regex_match_at_least_n_times_long, parentOpt: null, positionOffset: "{".Length, insertionText: "{,}");
238context.AddIfMissing("{n,}?", Regex_match_at_least_n_times_lazy_short, Regex_match_at_least_n_times_lazy_long, parentOpt: null, positionOffset: "{".Length, insertionText: "{,}?");
240context.AddIfMissing("{m,n}", Regex_match_between_m_and_n_times_short, Regex_match_between_m_and_n_times_long, parentOpt: null, positionOffset: "{".Length, insertionText: "{,}");
241context.AddIfMissing("{m,n}?", Regex_match_between_m_and_n_times_lazy_short, Regex_match_between_m_and_n_times_lazy_long, parentOpt: null, positionOffset: "{".Length, insertionText: "{,}?");
281var description = longDesc.Length > 0
306context.AddIfMissing($"( {Regex_subexpression} )", Regex_matched_subexpression_short, Regex_matched_subexpression_long, parentOpt, positionOffset: "(".Length, insertionText: "()");
307context.AddIfMissing($"(?< {Regex_name} > {Regex_subexpression} )", Regex_named_matched_subexpression_short, Regex_named_matched_subexpression_long, parentOpt, positionOffset: "(?<".Length, insertionText: "(?<>)");
308context.AddIfMissing($"(?< {Regex_name1} - {Regex_name2} > {Regex_subexpression} )", Regex_balancing_group_short, Regex_balancing_group_long, parentOpt, positionOffset: "(?<".Length, insertionText: "(?<->)");
309context.AddIfMissing($"(?: {Regex_subexpression} )", Regex_noncapturing_group_short, Regex_noncapturing_group_long, parentOpt, positionOffset: "(?:".Length, insertionText: "(?:)");
310context.AddIfMissing($"(?= {Regex_subexpression} )", Regex_zero_width_positive_lookahead_assertion_short, Regex_zero_width_positive_lookahead_assertion_long, parentOpt, positionOffset: "(?=".Length, insertionText: "(?=)");
311context.AddIfMissing($"(?! {Regex_subexpression} )", Regex_zero_width_negative_lookahead_assertion_short, Regex_zero_width_negative_lookahead_assertion_long, parentOpt, positionOffset: "(?!".Length, insertionText: "(?!)");
312context.AddIfMissing($"(?<= {Regex_subexpression} )", Regex_zero_width_positive_lookbehind_assertion_short, Regex_zero_width_positive_lookbehind_assertion_long, parentOpt, positionOffset: "(?<=".Length, insertionText: "(?<=)");
313context.AddIfMissing($"(?<! {Regex_subexpression} )", Regex_zero_width_negative_lookbehind_assertion_short, Regex_zero_width_negative_lookbehind_assertion_long, parentOpt, positionOffset: "(?<!".Length, insertionText: "(?<!)");
314context.AddIfMissing($"(?> {Regex_subexpression} )", Regex_atomic_group_short, Regex_atomic_group_long, parentOpt, positionOffset: "(?>".Length, insertionText: "(?>)");
316context.AddIfMissing($"(?( {Regex_expression} ) {Regex_yes} | {Regex_no} )", Regex_conditional_expression_match_short, Regex_conditional_expression_match_long, parentOpt, positionOffset: "(?(".Length, insertionText: "(?()|)");
317context.AddIfMissing($"(?( {Regex_name_or_number} ) {Regex_yes} | {Regex_no} )", Regex_conditional_group_match_short, Regex_conditional_group_match_long, parentOpt, positionOffset: "(?(".Length, insertionText: "(?()|)");
319context.AddIfMissing($"(?# {Regex_comment} )", Regex_inline_comment_short, Regex_inline_comment_long, parentOpt, positionOffset: "(?#".Length, insertionText: "(?#)");
320context.AddIfMissing($"(?imnsx-imnsx)", Regex_inline_options_short, Regex_inline_options_long, parentOpt, positionOffset: "(?".Length, insertionText: "(?)");
321context.AddIfMissing($"(?imnsx-imnsx: {Regex_subexpression} )", Regex_group_options_short, Regex_group_options_long, parentOpt, positionOffset: "(?".Length, insertionText: "(?:)");
333context.AddIfMissing($"[ {Regex_character_group} ]", Regex_positive_character_group_short, Regex_positive_character_group_long, parentOpt, positionOffset: "[".Length, insertionText: "[]");
334context.AddIfMissing($"[ firstCharacter-lastCharacter ]", Regex_positive_character_range_short, Regex_positive_character_range_long, parentOpt, positionOffset: "[".Length, insertionText: "[-]");
335context.AddIfMissing($"[^ {Regex_character_group} ]", Regex_negative_character_group_short, Regex_negative_character_group_long, parentOpt, positionOffset: "[^".Length, insertionText: "[^]");
336context.AddIfMissing($"[^ firstCharacter-lastCharacter ]", Regex_negative_character_group_short, Regex_negative_character_range_long, parentOpt, positionOffset: "[^".Length, insertionText: "[^-]");
337context.AddIfMissing($"[ {Regex_base_group} -[ {Regex_excluded_group} ] ]", Regex_character_class_subtraction_short, Regex_character_class_subtraction_long, parentOpt, positionOffset: "[".Length, insertionText: "[-[]]");
357context.AddIfMissing($@"\k< {Regex_name_or_number} >", Regex_named_backreference_short, Regex_named_backreference_long, parentOpt, @"\k<".Length, insertionText: @"\k<>");
365context.AddIfMissing(@"\1-9", Regex_numbered_backreference_short, Regex_numbered_backreference_long, parentOpt, @"\".Length, @"\");
377context.AddIfMissing(@"\x##", Regex_hexadecimal_escape_short, Regex_hexadecimal_escape_long, parentOpt, @"\x".Length, @"\x");
378context.AddIfMissing(@"\u####", Regex_unicode_escape_short, Regex_unicode_escape_long, parentOpt, @"\u".Length, @"\u");
379context.AddIfMissing(@"\cX", Regex_control_character_short, Regex_control_character_long, parentOpt, @"\c".Length, @"\c");
383context.AddIfMissing(@"\p{...}", Regex_unicode_category_short, Regex_unicode_category_long, parentOpt, @"\p".Length, @"\p");
384context.AddIfMissing(@"\P{...}", Regex_negative_unicode_category_short, Regex_negative_unicode_category_long, parentOpt, @"\P".Length, @"\P");
Microsoft.CodeAnalysis.NetAnalyzers (62)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\IdentifiersShouldNotContainUnderscores.Fixer.cs (1)
50if (newName.Length == 0)
Microsoft.CodeAnalysis.Razor.Compiler (222)
Language\Legacy\CSharpCodeParser.cs (27)
295CurrentToken.Content.Length > 0 &&
302_tokenizer.Reset(Context.Source.Position - split.right.Content.Length);
354new SourceSpan(CurrentStart, CurrentToken.Content.Length));
412new SourceSpan(CurrentStart, CurrentToken.Content.Length)));
424new SourceSpan(CurrentStart, CurrentToken.Content.Length),
1225new SourceSpan(CurrentStart, currentDirective.Length), currentDirective));
1247var errorLength = /* @ */ 1 + SyntaxConstants.CSharp.TagHelperPrefixKeyword.Length;
1383new SourceSpan(valueStartLocation.Value, rawValue.Length), keyword));
1472new SourceSpan(directiveLocation, Math.Max(text?.Length ?? 0, 1)), text ?? string.Empty));
1528new SourceSpan(directiveLocation, prefix.Length),
1588new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive));
1655new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive));
1684new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive));
1699new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive));
1714new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive));
1732new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive));
1753new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive, CurrentToken.Content, lastSeenMemberIdentifier ?? string.Empty));
1783new SourceSpan(CurrentStart, CurrentToken.Content.Length),
1846new SourceSpan(CurrentStart, CurrentToken.Content.Length),
1958var errorLength = /* @ */ 1 + descriptor.Directive.Length;
1994currentIdentifierLength += token.Content.Length;
2007identifierLength += token.Content.Length;
2019identifierLength += token.Content.Length;
2040new SourceSpan(CurrentStart, CurrentToken.Content.Length), descriptor.Directive, "{"));
2232new SourceSpan(CurrentStart, CurrentToken.Content.Length)));
2510new SourceSpan(block.Start, block.Name.Length)));
2755new SourceSpan(CurrentStart, CurrentToken.Content.Length), CurrentToken.Content));
Language\Legacy\HtmlMarkupParser.cs (18)
160new SourceSpan(CurrentStart, CurrentToken.Content.Length)));
340tracker.TagName.Length),
410if (CurrentToken.Kind == SyntaxKind.Text && CurrentToken.Content.Length > 0 && CurrentToken.Content[0] == ':')
553new SourceSpan(SourceLocationTracker.Advance(endTagStartLocation, "</"), Math.Max(endTagName.Length, 1)), endTagName));
571tracker.TagName.Length),
663tagName.Length == 0 &&
701tagName.Length == 0 ? tagStartLocation : SourceLocationTracker.Advance(tagStartLocation, "<"),
702Math.Max(tagName.Length, 1)),
1559new SourceSpan(SourceLocationTracker.Advance(tagStart, "</"), ScriptTagName.Length),
1832(trimmedStartContent.Length == 4 ||
2171for (var i = 0; i < CurrentToken.Content.Length; i++)
2191position + sequence.Length <= CurrentToken.Content.Length)
2193var possibleStart = CurrentToken.Content.AsSpan(position, sequence.Length);
2204var (sequenceToken, _) = Language.SplitToken(right, sequence.Length, SyntaxKind.Text);
2205var postSequenceBookmark = bookmark.AbsoluteIndex + preSequence.Content.Length + sequenceToken.Content.Length;
2218Context.Source.Position = bookmark.AbsoluteIndex + preSequence.Content.Length;
Language\Legacy\TagHelperParseTreeRewriter.cs (7)
142var source = new SourceSpan(SourceLocationTracker.Advance(startTag.GetSourceLocation(_source), "<"), tagName.Length);
187new SourceSpan(SourceLocationTracker.Advance(endTag.GetSourceLocation(_source), "</"), tagName.Length), tagName));
368new SourceSpan(SourceLocationTracker.Advance(endTag.GetSourceLocation(_source), "</"), tagName.Length),
515new SourceSpan(errorStart, tagName.Length), tagName));
532new SourceSpan(errorStart, tagName.Length), tagName));
705new SourceSpan(errorStart, tagName.Length),
723new SourceSpan(errorStart, tagName.Length),
Microsoft.CodeAnalysis.Rebuild (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (196)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (6)
145for (var i = 0; i < text.Length; i++)
611var tokenPosition = lastText.ConvertTabToSpace(Options.TabSize, initialColumn, lastText.Length);
741for (var i = this.OriginalString.Length - 1; i >= 0; i--)
889spaces: text.ConvertTabToSpace(Options.TabSize, lineColumn.With(whitespaceBetween).Column, text.Length),
925spaces: lineText.GetColumnFromLineOffset(lineText.Length, Options.TabSize),
931spaces: text.ConvertTabToSpace(Options.TabSize, initialColumn, text.Length),
Microsoft.CodeAnalysis.Scripting (16)
Microsoft.CodeAnalysis.VisualBasic (113)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (6)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (9)
Microsoft.CodeAnalysis.VisualBasic.Features (31)
Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers (6)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\BasicIdentifiersShouldNotContainUnderscores.Fixer.vb (1)
19If result.Length = 0 Then
Microsoft.CodeAnalysis.VisualBasic.Workspaces (28)
Microsoft.CodeAnalysis.Workspaces (262)
PatternMatching\PatternMatcher.cs (12)
154for (var i = 0; i < pattern.Length; i++)
166for (var i = 0; i < pattern.Length; i++)
182var candidateLength = candidate.Length;
190if (patternChunk.Text.Length == candidateLength)
220PatternMatchKind.Prefix, punctuationStripped, isCaseSensitive, matchedSpan: GetMatchedSpan(0, patternChunk.Text.Length));
245matchedSpan: GetMatchedSpan(caseSensitiveIndex, patternChunk.Text.Length));
260matchedSpan: GetMatchedSpan(caseInsensitiveIndex, patternChunk.Text.Length));
275matchedSpan: GetMatchedSpan(hump.Start, patternChunk.Text.Length));
300if (patternIsLowercase && caseInsensitiveIndex > 0 && patternChunk.Text.Length >= 3)
307matchedSpan: GetMatchedSpan(caseSensitiveIndex, patternChunk.Text.Length));
325for (var i = 0; i < text.Length; i++)
453=> PartStartsWith(candidate, candidatePart, pattern, new TextSpan(0, pattern.Length), compareOptions);
Shared\Utilities\XmlFragmentParser.cs (9)
150_position = s_rootStart.Length;
173_position += EncodeAndAdvance(s_currentStart, _position - s_rootStart.Length, buffer, ref index, ref count);
176_position += EncodeAndAdvance(_text, _position - s_rootStart.Length - s_currentStart.Length, buffer, ref index, ref count);
179_position += EncodeAndAdvance(s_currentEnd, _position - s_rootStart.Length - s_currentStart.Length - _text.Length, buffer, ref index, ref count);
193if (destCount == 0 || srcIndex < 0 || srcIndex >= src.Length)
198var charCount = Math.Min(src.Length - srcIndex, destCount);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (6)
145for (var i = 0; i < text.Length; i++)
611var tokenPosition = lastText.ConvertTabToSpace(Options.TabSize, initialColumn, lastText.Length);
741for (var i = this.OriginalString.Length - 1; i >= 0; i--)
889spaces: text.ConvertTabToSpace(Options.TabSize, lineColumn.With(whitespaceBetween).Column, text.Length),
925spaces: lineText.GetColumnFromLineOffset(lineText.Length, Options.TabSize),
931spaces: text.ConvertTabToSpace(Options.TabSize, initialColumn, text.Length),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
391if (name.Length > 0)
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (44)
Microsoft.CSharp (8)
Microsoft.Data.Analysis (11)
Microsoft.Data.Analysis.Tests (9)
Microsoft.Deployment.DotNet.Releases (11)
Microsoft.Diagnostics.DataContractReader.Contracts (8)
Microsoft.Diagnostics.DataContractReader.DataGenerator (2)
Microsoft.Diagnostics.DataContractReader.Legacy (15)
Microsoft.Diagnostics.NETCore.Client (9)
Microsoft.DiaSymReader (9)
Microsoft.DotNet.ApiCompat.Task (1)
Microsoft.DotNet.Arcade.Sdk (11)
Microsoft.DotNet.ArcadeLogging (1)
Microsoft.DotNet.Build.Tasks.Feed (1)
Microsoft.DotNet.Build.Tasks.Installers (9)
Microsoft.DotNet.Build.Tasks.Packaging (14)
Microsoft.DotNet.Build.Tasks.TargetFramework (1)
Microsoft.DotNet.Build.Tasks.Templating (3)
Microsoft.DotNet.Build.Tasks.VisualStudio (4)
Microsoft.DotNet.Build.Tasks.Workloads (4)
Microsoft.DotNet.Cli.CoreUtils (8)
Microsoft.DotNet.Cli.Definitions (22)
Microsoft.DotNet.Cli.Telemetry (5)
Microsoft.DotNet.Cli.Utils (22)
Microsoft.DotNet.HotReload.Utils.Generator.Frontend (5)
Microsoft.DotNet.HotReload.Watch (16)
Microsoft.DotNet.HotReload.WebAssembly.Browser (1)
Microsoft.DotNet.PackageValidation (2)
Microsoft.DotNet.ProjectTools (1)
Microsoft.DotNet.SdkResolver (1)
Microsoft.DotNet.SourceBuild.Tasks (7)
Microsoft.DotNet.TemplateLocator (15)
Microsoft.DotNet.XliffTasks (9)
Microsoft.Extensions.AI (4)
Microsoft.Extensions.AI.Abstractions (21)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Microsoft.Extensions.AI.Evaluation.NLP (5)
Microsoft.Extensions.AI.Evaluation.Quality (1)
Microsoft.Extensions.AI.Evaluation.Reporting (2)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (2)
Microsoft.Extensions.AI.Integration.Tests (5)
Microsoft.Extensions.AI.OpenAI (10)
Microsoft.Extensions.AI.OpenAI.Tests (1)
Microsoft.Extensions.Caching.Hybrid (9)
Microsoft.Extensions.Caching.Hybrid.Tests (1)
Microsoft.Extensions.Compliance.Abstractions (2)
Microsoft.Extensions.Compliance.Abstractions.Tests (12)
Microsoft.Extensions.Compliance.Redaction (4)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
116count = s.Length;
Microsoft.Extensions.Compliance.Redaction.Tests (4)
Microsoft.Extensions.Compliance.Testing (4)
Microsoft.Extensions.Configuration (5)
Microsoft.Extensions.Configuration.Abstractions (1)
Microsoft.Extensions.Configuration.Binder (1)
Microsoft.Extensions.Configuration.Binder.SourceGeneration (4)
Microsoft.Extensions.Configuration.EnvironmentVariables (10)
Microsoft.Extensions.Configuration.Ini (5)
Microsoft.Extensions.Configuration.KeyPerFile (2)
Microsoft.Extensions.Configuration.Xml (3)
Microsoft.Extensions.DataIngestion (9)
Microsoft.Extensions.DataIngestion.Markdig (1)
Microsoft.Extensions.DataIngestion.MarkItDown (1)
Microsoft.Extensions.DependencyInjection (8)
Microsoft.Extensions.DependencyModel (5)
Microsoft.Extensions.Diagnostics (8)
Microsoft.Extensions.Diagnostics.Abstractions (2)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (1)
Microsoft.Extensions.Diagnostics.HealthChecks.ResourceUtilization (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
116count = s.Length;
Microsoft.Extensions.Diagnostics.Probes (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
116count = s.Length;
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
116count = s.Length;
Microsoft.Extensions.DotNetDeltaApplier (1)
Microsoft.Extensions.FileProviders.Embedded (12)
Microsoft.Extensions.FileProviders.Physical (9)
Microsoft.Extensions.FileSystemGlobbing (13)
Microsoft.Extensions.Hosting (2)
Microsoft.Extensions.Hosting.Systemd (1)
Microsoft.Extensions.Http (4)
Microsoft.Extensions.Http.Diagnostics (8)
Microsoft.Extensions.Http.Diagnostics.Tests (3)
Microsoft.Extensions.Http.Resilience (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
116count = s.Length;
Microsoft.Extensions.Http.Resilience.Tests (8)
Microsoft.Extensions.Identity.Core (3)
Microsoft.Extensions.Identity.Stores (1)
Microsoft.Extensions.Localization (1)
Microsoft.Extensions.Logging (2)
Microsoft.Extensions.Logging.Abstractions (8)
Microsoft.Extensions.Logging.AzureAppServices (1)
Microsoft.Extensions.Logging.Console (9)
Microsoft.Extensions.Logging.EventLog (4)
Microsoft.Extensions.Logging.EventSource (5)
Microsoft.Extensions.Logging.Generators (6)
Microsoft.Extensions.Options (1)
Microsoft.Extensions.Options.SourceGeneration (8)
Microsoft.Extensions.Primitives (9)
Microsoft.Extensions.ServiceDiscovery (1)
Microsoft.Extensions.ServiceDiscovery.Dns (4)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (5)
Microsoft.Extensions.ServiceDiscovery.Yarp (1)
Microsoft.Extensions.Telemetry (23)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Data.Validation\LengthAttribute.cs (1)
116count = s.Length;
Microsoft.Extensions.Telemetry.Abstractions (2)
Microsoft.Extensions.Telemetry.Tests (2)
Microsoft.Extensions.Validation.ValidationsGenerator (1)
Microsoft.Extensions.WebEncoders (3)
Microsoft.Gen.BuildMetadata (4)
Microsoft.Gen.BuildMetadata.Unit.Tests (1)
Microsoft.Gen.ComplianceReports (5)
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
Microsoft.Gen.ContextualOptions (2)
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
Microsoft.Gen.Logging (10)
Microsoft.Gen.Logging.Generated.Tests (16)
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),
Microsoft.Gen.Logging.Unit.Tests (2)
Microsoft.Gen.MetadataExtractor (5)
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
Microsoft.Gen.Metrics (5)
Microsoft.Gen.Metrics.Unit.Tests (1)
Microsoft.Gen.MetricsReports (2)
Microsoft.Gen.MetricsReports.Unit.Tests (1)
Microsoft.Interop.ComInterfaceGenerator (5)
Microsoft.Interop.JavaScript.JSImportGenerator (3)
Microsoft.Interop.LibraryImportGenerator (3)
Microsoft.Interop.LibraryImportGenerator.Downlevel (2)
Microsoft.Interop.SourceGeneration (2)
Microsoft.Maui (9)
Microsoft.Maui.Controls (22)
Microsoft.Maui.Controls.Build.Tasks (10)
Microsoft.Maui.Controls.DesignTools (3)
Microsoft.Maui.Controls.SourceGen (6)
Microsoft.Maui.Controls.Xaml (27)
Microsoft.Maui.Essentials (8)
Microsoft.Maui.Graphics (17)
Microsoft.Maui.Graphics.Skia (1)
Microsoft.Maui.Graphics.Text.Markdig (1)
Microsoft.Maui.Resizetizer (1)
Microsoft.ML.AutoML (11)
Microsoft.ML.AutoML.SourceGenerator (31)
Microsoft.ML.CodeGenerator (60)
Microsoft.ML.Core (51)
Microsoft.ML.Data (38)
Microsoft.ML.EntryPoints (2)
Microsoft.ML.FastTree (5)
Microsoft.ML.GenAI.Core (5)
Microsoft.ML.GenAI.Mistral (3)
Microsoft.ML.ImageAnalytics (1)
Microsoft.ML.IntegrationTests (1)
Microsoft.ML.InternalCodeAnalyzer (5)
Microsoft.ML.LightGbm (2)
Microsoft.ML.Maml (4)
Microsoft.ML.OnnxConverter (100)
Microsoft.ML.OnnxTransformer (100)
Microsoft.ML.PerformanceTests (2)
Microsoft.ML.Predictor.Tests (19)
Microsoft.ML.ResultProcessor (2)
Microsoft.ML.Samples (7)
Microsoft.ML.Samples.GPU (7)
Microsoft.ML.StandardTrainers (3)
Microsoft.ML.Sweeper (1)
Microsoft.ML.TensorFlow (3)
Microsoft.ML.TensorFlow.Tests (1)
Microsoft.ML.TestFramework (8)
Microsoft.ML.TestFrameworkCommon (2)
Microsoft.ML.Tests (2)
Microsoft.ML.Tokenizers (134)
Microsoft.ML.Tokenizers.Tests (133)
BpeTests.cs (11)
331char[] destinationBuffer = new char[expectedDecoded.Length];
345Assert.True(charactersWritten < expectedDecoded.Length);
354Assert.Equal(expectedDecoded.Length, charactersWritten);
490Assert.Equal(text.Length, length);
493Assert.Equal(text.Length, length);
848char[] destinationBuffer = new char[beginningOfSentenceToken.Length + text.Length];
855Assert.Equal(OperationStatus.DestinationTooSmall, tokenizer.Decode(ids, destinationBuffer.AsSpan(0, text.Length - 1), considerSpecialTokens: false, out idsConsumed, out charsWritten));
857Assert.True(charsWritten < text.Length);
858Assert.Equal(OperationStatus.DestinationTooSmall, tokenizer.Decode(ids, destinationBuffer.AsSpan(0, text.Length), considerSpecialTokens: true, out idsConsumed, out charsWritten));
860Assert.True(charsWritten <= text.Length);
CodeGenTests.cs (72)
304char[] destinationBuffer = new char[expectedDecoded.Length];
318Assert.True(charactersWritten < expectedDecoded.Length);
327Assert.Equal(expectedDecoded.Length, charactersWritten);
381Assert.Equal(text.Length, length);
384Assert.Equal(text.Length, length);
388Assert.Equal(text.Length, length);
391Assert.Equal(text.Length, length);
395Assert.Equal(text.Length, length);
398Assert.Equal(text.Length, length);
468int expectedIndex = offsets.Length > 1 && offsets[offsets.Length - 1].Index == offsets[offsets.Length - 2].Index ? text.Length : offsets[offsets.Length - 1].Index;
469int expectedTokenCount = expectedIndex == text.Length ? 0 : 1;
484expectedIndex = offsets.Length > 1 && expectedOffsetsWithSpace[expectedOffsetsWithSpace.Length - 1].Index == expectedOffsetsWithSpace[expectedOffsetsWithSpace.Length - 2].Index ? text.Length : expectedOffsetsWithSpace[expectedOffsetsWithSpace.Length - 1].Index;
485expectedTokenCount = expectedIndex == text.Length ? 0 : 1;
640Assert.Equal(text.Length, length);
643Assert.Equal(text.Length, length);
646Assert.Equal(text.Length, length);
649Assert.Equal(text.Length, length);
652Assert.Equal(text.Length, length);
655Assert.Equal(text.Length, length);
691Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
696Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
701Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
706Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
715Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
720Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
725Assert.NotEqual(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
730Assert.NotEqual(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
735Assert.NotEqual(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
740Assert.NotEqual(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
773Assert.Equal(text.Length, length);
776Assert.Equal(text.Length, length);
779Assert.Equal(text.Length, length);
782Assert.Equal(text.Length, length);
785Assert.Equal(text.Length, length);
788Assert.Equal(text.Length, length);
827Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
833Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
839Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
845Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
857Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
863Assert.Equal(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
869Assert.NotEqual(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
875Assert.NotEqual(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
881Assert.NotEqual(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
887Assert.NotEqual(new Range(text.Length, text.Length), encoding[encoding.Count - 1].Offset);
927Assert.Equal(text.Length, length);
930Assert.Equal(text.Length, length);
933Assert.Equal(text.Length, length);
936Assert.Equal(text.Length, length);
939Assert.Equal(text.Length, length);
942Assert.Equal(text.Length, length);
1017calculatedLengthUsingOffsets = expectedTokenCountFromEnd > 0 ? offsets[offsets.Length - expectedTokenCountFromEnd].Index : input.Length;
LlamaTests.cs (20)
300char[] destinationBuffer = new char[expectedDecoded.Length];
314Assert.True(charactersWritten < expectedDecoded.Length);
323Assert.Equal(expectedDecoded.Length, charactersWritten);
387Span<char> destinationBuffer = stackalloc char[llamaTokenizer.EndOfSentenceToken.Length];
389Assert.Equal(llamaTokenizer.EndOfSentenceToken.Length, charactersWritten);
536expectedOffsets1 = addEndOfSentence ? expectedOffsets1.Concat(new[] { (normalizedText.Length, 0) }).ToArray() : expectedOffsets1;
560Assert.Equal(normalizedText.Length, length);
563Assert.Equal(normalizedText.Length, length);
594Assert.Equal(normalizedText.Length, length);
692Assert.Equal(index, accumulatedString.Length);
701Assert.Equal(index, normalizedText!.Length - accumulatedStringFromEnd.Length);
841char[] destinationBuffer = new char[decodedWithNoSpecialTokens.Length];
855Assert.Equal(decodedWithNoSpecialTokens.Length, charactersWritten);
858destinationBuffer = new char[textWithSpecialTokens.Length];
869Assert.Equal(textWithSpecialTokens.Length, charactersWritten);
883destinationBuffer = new char[decodedWithNoSpecialTokens.Length + 1]; // one extra for suffix
894Assert.Equal(decodedWithNoSpecialTokens.Length, charactersWritten);
897destinationBuffer = new char[textWithSpecialTokens.Length + 1];
913Assert.Equal(textWithSpecialTokens.Length, charactersWritten);
UnigramTests.cs (8)
305Assert.True(writableTokens[writableTokens.Count - 1].Offset.Equals(new Range(normalized.Length, normalized.Length)));
500IReadOnlyList<int> ids2 = index < normalized.Length ? _unigramTokenizer.EncodeToIds(normalized!.Substring(index), addBeginningOfSentence: false, addEndOfSentence: false, considerNormalization: false) : new List<int>();
506ids2 = index < normalized.Length ? _unigramTokenizer.EncodeToIds(normalized!.Substring(index).AsSpan(), addBeginningOfSentence: false, addEndOfSentence: false, considerNormalization: false) : new List<int>();
512ids2 = index < normalized.Length ? _unigramTokenizer.EncodeToIds(normalized!.Substring(index), addBeginningOfSentence: false, addEndOfSentence: false, considerNormalization: false) : new List<int>();
518ids2 = index < normalized.Length ? _unigramTokenizer.EncodeToIds(normalized!.Substring(index).AsSpan(), addBeginningOfSentence: false, addEndOfSentence: false, considerNormalization: false) : new List<int>();
540char[] buffer = new char[decodedString.Length];
547for (int i = 0; i < decodedString.Length - 1; i++)
Microsoft.ML.TorchSharp (5)
Microsoft.ML.Transforms (5)
Microsoft.ML.Vision (2)
Microsoft.NET.Build.Containers (15)
LocalDaemons\ContainerArchive.cs (5)
64await WriteImageLayersAsync(writer, image, sourceReference, d => $"{d.Substring("sha256:".Length)}/layer.tar", cancellationToken, layerTarballPaths)
204string manifestPath = $"{BlobsPath}/{image.ManifestDigest.Substring("sha256:".Length)}";
227image.Manifest.Length,
254await WriteImageLayersAsync(writer, image, sourceReference, d => $"{BlobsPath}/{d.Substring("sha256:".Length)}", cancellationToken)
289multiArchImage.ImageIndex.Length,
LocalDaemons\DockerCli.cs (5)
316await WriteImageLayers(writer, image, sourceReference, d => $"{d.Substring("sha256:".Length)}/layer.tar", cancellationToken, layerTarballPaths)
454string manifestPath = $"{_blobsPath}/{image.ManifestDigest.Substring("sha256:".Length)}";
476image.Manifest.Length,
496await WriteImageLayers(writer, image, sourceReference, d => $"{_blobsPath}/{d.Substring("sha256:".Length)}", cancellationToken)
558multiArchImage.ImageIndex.Length,
Microsoft.NET.Build.Extensions.Tasks (10)
Microsoft.NET.Build.Tasks (39)
Microsoft.NET.HostModel (3)
Microsoft.Net.Http.Headers (41)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (3)
Microsoft.NET.Sdk.Publish.Tasks (19)
Microsoft.NET.Sdk.Razor.Tasks (7)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (17)
Microsoft.NET.Sdk.WorkloadManifestReader (15)
Microsoft.NET.StringTools (11)
Microsoft.Private.Windows.Core (18)
System\Private\Windows\Ole\Composition.ManagedToNativeAdapter.cs (7)
337sizeInBytes += (uint)(file.Length + 1) * sizeof(char);
367fileBuffer[file.Length] = '\0';
368fileBuffer = fileBuffer[(file.Length + 1)..];
378int byteCount = PInvokeCore.WideCharToMultiByte(PInvokeCore.CP_ACP, 0, value, value.Length, null, 0, null);
386PInvokeCore.WideCharToMultiByte(PInvokeCore.CP_ACP, 0, value, value.Length, (PSTR)buffer.Pointer, byteCount, null);
396uint byteCount = (uint)value.Length * sizeof(char) + sizeof(char);
408span[value.Length] = '\0';
Microsoft.SourceLink.AzureDevOpsServer.Git (8)
Microsoft.SourceLink.AzureRepos.Git (9)
Microsoft.SourceLink.Bitbucket.Git (7)
Microsoft.SourceLink.Common (5)
Microsoft.SourceLink.Gitea (7)
Microsoft.SourceLink.Gitee (7)
Microsoft.SourceLink.GitHub (7)
Microsoft.SourceLink.GitLab (7)
Microsoft.SourceLink.GitWeb (7)
Microsoft.SourceLink.Tools.Package (6)
Microsoft.TemplateEngine.Cli (29)
Microsoft.TemplateEngine.Core (4)
Microsoft.TemplateEngine.Edge (20)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (14)
Microsoft.TemplateEngine.Utils (35)
InMemoryFileSystem.cs (14)
39string rel = path.Substring(_root.FullPath.Length).Trim('/', '\\');
69string rel = path.Substring(_root.FullPath.Length).Trim('/', '\\');
104string rel = path.Substring(_root.FullPath.Length).Trim('/', '\\');
142string rel = directory.Substring(_root.FullPath.Length).Trim('/', '\\');
179string rel = path.Substring(_root.FullPath.Length).Trim('/', '\\');
259string rel = path.Substring(_root.FullPath.Length).Trim('/', '\\');
341string rel = directoryName.Substring(_root.FullPath.Length).Trim('/', '\\');
443string rel = path.Substring(_root.FullPath.Length).Trim('/', '\\');
469string rel = file.Substring(_root.FullPath.Length).Trim('/', '\\');
499string rel = path.Substring(_root.FullPath.Length).Trim('/', '\\');
557string rel = file.Substring(_root.FullPath.Length).Trim('/', '\\');
589string rel = file.Substring(_root.FullPath.Length).Trim('/', '\\');
620string rel = file.Substring(_root.FullPath.Length).Trim('/', '\\');
651string rel = file.Substring(_root.FullPath.Length).Trim('/', '\\');
Microsoft.TestPlatform.AdapterUtilities (19)
Microsoft.TestPlatform.Build (4)
Microsoft.TestPlatform.CommunicationUtilities (3)
Microsoft.TestPlatform.CoreUtilities (1)
Microsoft.TestPlatform.CrossPlatEngine (1)
Microsoft.TestPlatform.Filter.Source (7)
Microsoft.TestPlatform.Utilities (6)
Microsoft.VisualBasic.Core (154)
Microsoft.VisualBasic.Forms (1)
Microsoft.VisualStudio.TestPlatform.Common (14)
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (14)
Microsoft.VisualStudio.TestPlatform.ObjectModel (10)
Microsoft.Web.Xdt.Extensions (1)
Microsoft.Web.XmlTransform (9)
Microsoft.Win32.Registry (9)
Mono.Cecil (18)
Mono.Cecil.Pdb (1)
Mono.Cecil.Rocks (1)
MSBuild (34)
MyFrontend (24)
NuGet.Build.Tasks (4)
NuGet.Build.Tasks.Pack (2)
NuGet.CommandLine.XPlat (11)
NuGet.Commands (20)
NuGet.Common (21)
NuGet.Configuration (14)
NuGet.DependencyResolver.Core (4)
NuGet.Frameworks (6)
NuGet.LibraryModel (10)
LibraryDependencyTargetUtils.cs (10)
30var segment = StringSegment.CreateTrimmed(flag, 0, flag.Length - 1);
59if (start >= flag.Length)
68end = flag.Length;
79if ("package".Length == flag.Length && string.Compare(flag.String, flag.Start, "package", 0, flag.Length, StringComparison.OrdinalIgnoreCase) == 0)
83else if ("project".Length == flag.Length && string.Compare(flag.String, flag.Start, "project", 0, flag.Length, StringComparison.OrdinalIgnoreCase) == 0)
87else if ("externalproject".Length == flag.Length && string.Compare(flag.String, flag.Start, "externalproject", 0, flag.Length, StringComparison.OrdinalIgnoreCase) == 0)
91else if ("reference".Length == flag.Length && string.Compare(flag.String, flag.Start, "reference", 0, flag.Length, StringComparison.OrdinalIgnoreCase) == 0)
95else if ("assembly".Length == flag.Length && string.Compare(flag.String, flag.Start, "assembly", 0, flag.Length, StringComparison.OrdinalIgnoreCase) == 0)
99else if ("winmd".Length == flag.Length && string.Compare(flag.String, flag.Start, "winmd", 0, flag.Length, StringComparison.OrdinalIgnoreCase) == 0)
103else if ("all".Length == flag.Length && string.Compare(flag.String, flag.Start, "all", 0, flag.Length, StringComparison.OrdinalIgnoreCase) == 0)
NuGet.PackageManagement (16)
NuGet.Packaging (72)
NuGet.ProjectModel (8)
NuGet.Protocol (10)
NuGet.Versioning (26)
PresentationBuildTasks (129)
PresentationCore (127)
System\Windows\Media\FormattedText.cs (22)
225_latestPosition = _formatRuns.SetValue(0, _text.Length, runProps, _latestPosition);
287ArgumentOutOfRangeException.ThrowIfGreaterThan(startIndex, _text.Length);
291if (count < 0 || limit < startIndex || limit > _text.Length)
309SetForegroundBrush(foregroundBrush, 0, _text.Length);
358SetFontFamily(fontFamily, 0, _text.Length);
380SetFontFamily(fontFamily, 0, _text.Length);
434SetFontSize(emSize, 0, _text.Length);
486SetCulture(culture, 0, _text.Length);
541SetNumberSubstitution(numberSubstitution, 0, _text.Length);
604SetFontWeight(weight, 0, _text.Length);
654SetFontStyle(style, 0, _text.Length);
705SetFontStretch(stretch, 0, _text.Length);
756SetFontTypeface(typeface, 0, _text.Length);
806SetTextDecorations(textDecorations, 0, _text.Length);
964if (_that._text.Length == 0)
1009if (_textStorePosition + _currentLine.Length < _that._text.Length)
1086Debug.Assert(_that._text.Length > 0 && textSourcePosition + line.Length <= _that._text.Length + 1);
1091Math.Min(textSourcePosition + line.Length - 1, _that._text.Length - 1)
1538return BuildHighlightGeometry(origin, 0, _text.Length);
1709if (_text.Length == 0)
1815if (textSourceCharacterIndex >= _that._text.Length)
PresentationFramework (414)
System\Windows\Documents\TextFindEngine.cs (18)
111SafeNativeMethods.GetStringTypeEx(0 /* ignored */, SafeNativeMethods.CT_CTYPE1, [findPattern[findPattern.Length - 1]], new Span<UInt16>(ref endCharType1));
206int textBlockLength = Math.Max(TextBlockLength, findPattern.Length * 2 * 2);
228if (!matchDiacritics || findTextLength >= findPattern.Length)
279if (findTextLength > findPattern.Length)
283navigator.MoveByOffset(matchLast ? - findTextPositionMap[findText.Length - findTextLength + findPattern.Length] : findTextPositionMap[findTextLength - findPattern.Length]);
414int searchLength = textString.Length;
424matchLength = findPattern.Length;
444searchLength = textString.Length - searchStart;
469int startIndex = matchLast ? textString.Length - 1 : 0;
470int endIndex = matchLast ? -1 : textString.Length;
521for (int j = i; j < textString.Length; j++)
551for (int j = i; j < textString.Length; j++)
553if (compareInfo.Compare(textString, i, j - i + 1, findPattern, 0, findPattern.Length, options) == 0 &&
575sourceString, sourceString.Length, findString, findString.Length, out found);
783for (int index = 0; index < textString.Length; index++)
822int textLength = textString.Length;
PresentationUI (1)
Publishers.AppHost (1)
ReachFramework (24)
RepoTasks (2)
ResultsOfTGenerator (1)
Roslyn.Diagnostics.Analyzers (194)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (6)
145for (var i = 0; i < text.Length; i++)
611var tokenPosition = lastText.ConvertTabToSpace(Options.TabSize, initialColumn, lastText.Length);
741for (var i = this.OriginalString.Length - 1; i >= 0; i--)
889spaces: text.ConvertTabToSpace(Options.TabSize, lineColumn.With(whitespaceBetween).Column, text.Length),
925spaces: lineText.GetColumnFromLineOffset(lineText.Length, Options.TabSize),
931spaces: text.ConvertTabToSpace(Options.TabSize, initialColumn, text.Length),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
391if (name.Length > 0)
Roslyn.Diagnostics.CSharp.Analyzers (36)
Roslyn.Diagnostics.VisualBasic.Analyzers (9)
rzc (14)
sdk-tasks (3)
SelectTests (14)
Shared (2)
Stress.AppHost (3)
Stress.TelemetryService (84)
SuperFileCheck (1)
System.CodeDom (45)
System.Collections.Immutable (35)
System\Collections\Frozen\String\KeyAnalyzer.cs (10)
112static (string s, int index, int count) => s.AsSpan(s.Length + index, count));
258public override bool Equals(string? x, string? y) => x.AsSpan(IsLeft ? Index : (x!.Length + Index), Count).SequenceEqual(y.AsSpan(IsLeft ? Index : (y!.Length + Index), Count));
259public override int GetHashCode(string s) => Hashing.GetHashCodeOrdinal(s.AsSpan(IsLeft ? Index : (s.Length + Index), Count));
264public override bool Equals(string? x, string? y) => x.AsSpan(IsLeft ? Index : (x!.Length + Index), Count).Equals(y.AsSpan(IsLeft ? Index : (y!.Length + Index), Count), StringComparison.OrdinalIgnoreCase);
265public override int GetHashCode(string s) => Hashing.GetHashCodeOrdinalIgnoreCase(s.AsSpan(IsLeft ? Index : (s.Length + Index), Count));
270public override bool Equals(string? x, string? y) => x.AsSpan(IsLeft ? Index : (x!.Length + Index), Count).Equals(y.AsSpan(IsLeft ? Index : (y!.Length + Index), Count), StringComparison.OrdinalIgnoreCase);
271public override int GetHashCode(string s) => Hashing.GetHashCodeOrdinalIgnoreCaseAscii(s.AsSpan(IsLeft ? Index : (s.Length + Index), Count));
System.CommandLine (37)
System.CommandLine.StaticCompletions (3)
System.ComponentModel.Annotations (12)
System.ComponentModel.Composition (8)
System.ComponentModel.TypeConverter (30)
System.Composition.Convention (9)
System.Configuration.ConfigurationManager (65)
System.Console (14)
System.Data.Common (190)
System.Data.Odbc (86)
System\Data\Odbc\OdbcDataReader.cs (22)
1161int cachedObjectLength = isCharsBuffer ? ((string)cachedObj).Length : ((byte[])cachedObj).Length;
2747if ((localcmdtext.Length > 0) && (localcmdtext[0] == ','))
2751if ((localcmdtext.Length == 2) &&
2758if ((localcmdtext.Length > 0) && (localcmdtext[0] == ','))
2846if ((str != null) && (str.Length > 0))
2851Debug.Assert(str.Length > 1, "Illegal string, only one char that is a quote");
2852Debug.Assert(str[str.Length - 1] == quoteChar, "Missing quote at end of string that begins with quote");
2853if (str.Length > 1 && str[str.Length - 1] == quoteChar)
2855str = str.Substring(1, str.Length - 2);
2884for (parts = 0; (parts < qualifiers.Length) && (currentPos < name.Length); ++parts)
2889if (useQuotes && (name.IndexOf(quotePrefix!, currentPos, quotePrefix!.Length, StringComparison.Ordinal) == currentPos))
2893currentPos += quotePrefix.Length; // move past the quotePrefix
2896while (currentPos < name.Length)
2902currentPos = name.Length;
2907currentPos += quoteSuffix.Length; // move past the quoteSuffix
2910if ((currentPos < name.Length) && (name.IndexOf(quoteSuffix, currentPos, quoteSuffix.Length, StringComparison.Ordinal) == currentPos))
2913currentPos += quoteSuffix.Length; // move past the second quoteSuffix
2925if (currentPos < name.Length)
2931currentPos = name.Length;
2936currentPos += Separator.Length;
System.Data.OleDb (60)
System.Diagnostics.DiagnosticSource (48)
System\Diagnostics\DsesFilterAndTransform.cs (13)
59int endIdx = filterAndPayloadSpecs.Length;
112Debug.Assert(filterAndPayloadSpec != null && startIdx >= 0 && startIdx <= endIdx && endIdx <= filterAndPayloadSpec.Length);
219int colonIdx = filterAndPayloadSpec.IndexOf(':', startIdx + c_ActivitySourcePrefix.Length, endIdx - startIdx - c_ActivitySourcePrefix.Length);
222startIdx + c_ActivitySourcePrefix.Length,
223(colonIdx >= 0 ? colonIdx : endIdx) - startIdx - c_ActivitySourcePrefix.Length)
253|| !double.TryParse(suffixPart.Slice(c_ParentRatioSamplerPrefix.Length, endingLocation - c_ParentRatioSamplerPrefix.Length), NumberStyles.Float, CultureInfo.InvariantCulture, out double ratio))
267suffixPart.Slice(c_ParentRateLimitingSamplerPrefix.Length, endingLocation - c_ParentRateLimitingSamplerPrefix.Length),
326if (activityName.Length > 0 && activitySourceName.Length == 1 && activitySourceName[0] == '*')
603Debug.Assert(transformSpec != null && startIdx >= 0 && startIdx < endIdx && endIdx <= transformSpec.Length);
1020newSerializableArgs = new TransformSpec(eventSource, property.Name, 0, property.Name.Length, newSerializableArgs);
System.Diagnostics.EventLog (21)
System.Diagnostics.PerformanceCounter (39)
System.Diagnostics.Process (26)
System.Diagnostics.TextWriterTraceListener (9)
System.Diagnostics.TraceSource (1)
System.DirectoryServices (175)
System\DirectoryServices\ActiveDirectory\ActiveDirectorySite.cs (6)
927if (Utils.Compare(objectCategoryValue, 0, ocValue.Length, ocValue, 0, ocValue.Length) == 0)
936if (Utils.Compare(objectCategoryValue, 0, ocValue.Length, ocValue, 0, ocValue.Length) != 0)
1127if (siteName.Length == 0)
1340if (domainName != null && domainName.Length > 0)
System\DirectoryServices\ActiveDirectory\Utils.cs (58)
149if ((dsNameResultItem.name.Length - 1) == dsNameResultItem.name.IndexOf('/'))
151dnsName = dsNameResultItem.name.Substring(0, dsNameResultItem.name.Length - 1);
329if ((objectCategoryValue.Length >= ntdsdsa.Length) && (Utils.Compare(objectCategoryValue, 0, ntdsdsa.Length, ntdsdsa, 0, ntdsdsa.Length) == 0))
388if ((objectCategoryValue.Length >= ntdsdsa.Length) && (Utils.Compare(objectCategoryValue, 0, ntdsdsa.Length, ntdsdsa, 0, ntdsdsa.Length) == 0))
477if (dnComponents[i].Name!.Length == 0)
483if (dnComponents[i].Value!.Length == 0)
513if (dnComponents[i].Name!.Length == 0)
519if (dnComponents[i].Value!.Length == 0)
543for (int i = 0; i < distinguishedName.Length; i++)
554if (i < (distinguishedName.Length - 1))
567if (i == (distinguishedName.Length - 1))
598if ((context.UserName != null) && (context.UserName.Length > 0))
1187if ((propertyNameWithRangeInfo.Length >= propertyToLoad.Length) && (Utils.Compare(propertyToLoad, 0, propertyToLoad.Length, propertyNameWithRangeInfo, 0, propertyToLoad.Length) != 0))
1377if (ntdsaFilter.ToString().Length == 0)
1484if ((objectCategory.Length >= objectCategoryValue.Length) && (Utils.Compare(objectCategory, 0, objectCategoryValue.Length, objectCategoryValue, 0, objectCategoryValue.Length) == 0))
1492if ((objectCategory.Length >= roObjectCategoryValue.Length) && (Utils.Compare(objectCategory, 0, roObjectCategoryValue.Length, roObjectCategoryValue, 0, roObjectCategoryValue.Length) == 0))
1514if ((property.Length >= PropertyManager.MsDSHasInstantiatedNCs.Length) && (Utils.Compare(property, 0, PropertyManager.MsDSHasInstantiatedNCs.Length, PropertyManager.MsDSHasInstantiatedNCs, 0, PropertyManager.MsDSHasInstantiatedNCs.Length) == 0))
1537Debug.Assert(dnString.Length > 10, "ConfigurationSet::GetReplicaList - dnWithBinary is not in the expected format.");
1539if (((dnString.Length - 13) >= partitionName!.Length) && (Utils.Compare(dnString, 13, partitionName.Length, partitionName, 0, partitionName.Length) == 0))
1560if ((!foundPartitionEntry) && ((propertyName.Length >= propertyWithRangeInfo.Length) && (Utils.Compare(propertyName, 0, propertyWithRangeInfo.Length, propertyWithRangeInfo, 0, propertyWithRangeInfo.Length) != 0)))
1674Debug.Assert(dnString.Length > 10, "ConfigurationSet::GetReplicaList - dnWithBinary is not in the expected format.");
1676if (((dnString.Length - 13) >= partitionName!.Length) && (Utils.Compare(dnString, 13, partitionName.Length, partitionName, 0, partitionName.Length) == 0))
1694if ((!foundPartitionEntry) && ((propertyName.Length >= propertyWithRangeInfo2.Length) && (Utils.Compare(propertyName, 0, propertyWithRangeInfo2.Length, propertyWithRangeInfo2, 0, propertyWithRangeInfo2.Length) != 0)))
1784StringBuilder str = new StringBuilder(2 * filterValue.Length);
1788for (int i = index; i < filterValue.Length; i++)
1859cchCount1 = s1.Length;
1860cchCount2 = s2.Length;
1914serverName = serverName.Substring(1, serverName.Length - 2); //2 for []
System\DirectoryServices\DirectoryEntry.cs (8)
201if (guid.Length == 32)
759if (propertyName.Length > 0)
884if (System.DirectoryServices.ActiveDirectory.Utils.Compare(childPath, 0, parentPath.Length, parentPath, 0, parentPath.Length) == 0)
891if (System.DirectoryServices.ActiveDirectory.Utils.Compare(childPath, 0, parentPath.Length, parentPath, 0, parentPath.Length, compareFlags) != 0)
893childPath = parentPath + childPath.Substring(parentPath.Length);
997rangeName = rangeName.Remove(rangeName.Length - 1, 1);
System.DirectoryServices.AccountManagement (47)
System.DirectoryServices.Protocols (10)
System.Drawing.Common (23)
System.Drawing.Primitives (11)
System.Formats.Nrbf (4)
System.Formats.Tar (26)
System.IO.Compression.ZipFile (8)
System.IO.FileSystem.AccessControl (22)
System.IO.FileSystem.DriveInfo (3)
System.IO.FileSystem.Watcher (21)
System.IO.IsolatedStorage (5)
System.IO.MemoryMappedFiles (4)
System.IO.Packaging (52)
System.IO.Pipes (1)
System.IO.Ports (9)
System.Linq.Expressions (3)
System.Management (119)
System\Management\ManagementQuery.cs (65)
124q = q.Remove(0, token.Length).TrimStart(null);
133q = q.Remove(0, op.Length).TrimStart(null);
136if (0 == q.Length)
143i = q.Length; // No WS => consume entire string
146q = q.Remove(0, tokenValue.Length).TrimStart(null);
155q = q.Remove(0, token.Length).TrimStart(null);
675if (p.IsClass && (p.NamespacePath.Length == 0))
920if ((className == null) || (className.Length == 0))
948if ((Condition != null) && (Condition.Length != 0))
995if (tempProp.Length > 0)
1029condition = q.Substring(keyword.Length).Trim();
1041q = q.Remove(0, keyword.Length).TrimStart(null);
1055q = q.Remove(0, keyword.Length).TrimStart(null);
1063q = q.Remove(0, keyword.Length).TrimStart(null);
1066if (0 < q.Length)
1074q = q.Remove(0, keyword.Length);
1077if ((0 == q.Length) || !char.IsWhiteSpace(q[0]))
1270if ((p.IsClass || p.IsInstance) && (p.NamespacePath.Length == 0))
1563if ((sourceObject == null) || (sourceObject.Length == 0))
1570if (!(RelatedClass.Length == 0) ||
1571!(RelationshipClass.Length == 0) ||
1572!(RelatedQualifier.Length == 0) ||
1573!(RelationshipQualifier.Length == 0) ||
1574!(RelatedRole.Length == 0) ||
1575!(ThisRole.Length == 0) ||
1582if (!(RelatedClass.Length == 0))
1586if (!(RelationshipClass.Length == 0))
1590if (!(RelatedRole.Length == 0))
1594if (!(ThisRole.Length == 0))
1598if (!(RelatedQualifier.Length == 0))
1602if (!(RelationshipQualifier.Length == 0))
1649q = q.Remove(0, TokenAssociators.Length);
1652if ((0 == q.Length) || !char.IsWhiteSpace(q[0]))
1662q = q.Remove(0, TokenOf.Length).TrimStart(null);
1679if (0 < q.Length)
1685q = q.Remove(0, TokenWhere.Length);
1688if ((0 == q.Length) || !char.IsWhiteSpace(q[0]))
1728else if (0 == q.Length)
1897if ((p.IsClass || p.IsInstance) && (p.NamespacePath.Length == 0))
2098if ((sourceObject == null) || (sourceObject.Length == 0))
2105if (!(RelationshipClass.Length == 0) ||
2106!(RelationshipQualifier.Length == 0) ||
2107!(ThisRole.Length == 0) ||
2114if (!(RelationshipClass.Length == 0))
2118if (!(ThisRole.Length == 0))
2122if (!(RelationshipQualifier.Length == 0))
2166q = q.Remove(0, TokenReferences.Length);
2169if ((0 == q.Length) || !char.IsWhiteSpace(q[0]))
2179q = q.Remove(0, TokenOf.Length).TrimStart(null);
2196if (0 < q.Length)
2202q = q.Remove(0, TokenWhere.Length);
2205if ((0 == q.Length) || !char.IsWhiteSpace(q[0]))
2236else if (0 == q.Length)
2485if (p.IsClass && (p.NamespacePath.Length == 0))
2962if ((eventClassName == null) || (eventClassName.Length == 0))
2979if (!(Condition.Length == 0))
2998if (!(HavingCondition.Length == 0))
3035q = q.Remove(0, keyword.Length).TrimStart(null);
3058if ((q.Length >= keyword.Length) && ((i = q.ToLowerInvariant().IndexOf(keyword, StringComparison.Ordinal)) != -1)) //found
3072q = q.Remove(0, keyword.Length);
3086if (tempProp.Length > 0)
3111q = q.Remove(0, keyword.Length);
3113if (q.Length == 0) //bad query
3127condition = w.Substring(keyword.Length);
System.Net.Http (241)
System.Net.Http.Json (3)
System.Net.Http.WinHttpHandler (5)
System.Net.HttpListener (47)
System.Net.Mail (75)
System\Net\Mail\MailPriority.cs (12)
278EnvelopeHeaders.InternalSet(xSenderHeader, sender.Encode(xSenderHeader.Length, allowUnicode));
286EnvelopeHeaders.InternalAdd(headerName, address.Encode(headerName.Length, allowUnicode));
290EnvelopeHeaders.InternalAdd(headerName, address.Encode(headerName.Length, allowUnicode));
294EnvelopeHeaders.InternalAdd(headerName, address.Encode(headerName.Length, allowUnicode));
312Headers.InternalAdd(headerName, Sender.Encode(headerName.Length, allowUnicode));
320Headers.InternalAdd(headerName, From!.Encode(headerName.Length, allowUnicode));
325Headers.InternalAdd(headerName, To.Encode(headerName.Length, allowUnicode));
335Headers.InternalAdd(headerName, CC.Encode(headerName.Length, allowUnicode));
345Headers.InternalAdd(headerName, ReplyTo.Encode(headerName.Length, allowUnicode));
349Headers.InternalAdd(headerName, ReplyToList.Encode(headerName.Length, allowUnicode));
393headerName.Length));
439headerName.Length);
System.Net.NameResolution (9)
System.Net.NetworkInformation (15)
System.Net.Ping (1)
System.Net.Primitives (27)
System.Net.Quic (4)
System.Net.Requests (40)
System.Net.Security (14)
System.Net.Sockets (7)
System.Net.WebClient (6)
System.Net.WebHeaderCollection (5)
System.Net.WebProxy (2)
System.Net.WebSockets (13)
System.Net.WebSockets.Client (1)
System.Private.CoreLib (974)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeMetadataGenerator.cs (10)
85uint v1MetadataLength = 24 + ((uint)eventName.Length + 1) * 2;
153WriteToBuffer(pMetadata, totalMetadataLength, ref offset, (byte*)pEventName, ((uint)eventName.Length + 1) * 2);
304EventPipeMetadataGenerator.WriteToBuffer(pMetadataBlob, blobSize, ref offset, (byte*)pParameterName, ((uint)ParameterName.Length + 1) * 2);
349EventPipeMetadataGenerator.WriteToBuffer(pMetadataBlob, blobSize, ref offset, (byte*)pPropertyName, ((uint)property.name.Length + 1) * 2);
371EventPipeMetadataGenerator.WriteToBuffer(pMetadataBlob, blobSize, ref offset, (byte*)pPropertyName, ((uint)property.name.Length + 1) * 2);
398EventPipeMetadataGenerator.WriteToBuffer(pMetadataBlob, blobSize, ref offset, (byte*)pPropertyName, ((uint)name.Length + 1) * 2);
605size += (uint)(sizeof(uint) + ((ParameterName.Length + 1) * 2));
639ret += (uint)((property.name.Length + 1) * 2);
643ret += (uint)(sizeof(uint) + ((property.name.Length + 1) * 2));
753((name.Length + 1) * 2));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.cs (14)
308return Compare(string1, offset1, string1 == null ? 0 : string1.Length - offset1,
309string2, offset2, string2 == null ? 0 : string2.Length - offset2, options);
391if (offset1 > (string1 == null ? 0 : string1.Length) - length1)
396Debug.Assert(offset2 > (string2 == null ? 0 : string2.Length) - length2);
842return IndexOf(source, value, startIndex, source.Length - startIndex, options);
853return IndexOf(source, value, startIndex, source.Length - startIndex, options);
878if ((uint)startIndex > (uint)source.Length)
912if ((uint)startIndex > (uint)source.Length)
1204if ((uint)startIndex >= (uint)source.Length)
1206if (startIndex == -1 && source.Length == 0)
1210else if (startIndex == source.Length)
1264if ((uint)startIndex >= (uint)source.Length)
1266if (startIndex == -1 && source.Length == 0)
1270else if (startIndex == source.Length)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (5)
65return _sortName.Length == 0 ||
66(_sortName.Length >= 2 && _sortName[0] == 'e' && _sortName[1] == 'n' && (_sortName.Length == 2 || _sortName[2] == '-'));
731sortKeyLength = Interop.Globalization.GetSortKey(_sortHandle, pSource, source.Length, null, 0, options);
748if (Interop.Globalization.GetSortKey(_sortHandle, pSource, source.Length, pSortKey, sortKeyLength, options) != sortKeyLength)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (16)
533if (designator.Length >= 1)
933TryFormatS(dateTime, new Span<char>(ref str.GetRawStringData(), str.Length), out int charsWritten);
940TryFormatInvariantG(dateTime, offset, new Span<char>(ref str.GetRawStringData(), str.Length), out int charsWritten);
959TryFormatInvariantG(dateTime, offset, new Span<char>(ref str.GetRawStringData(), str.Length), out int charsWritten);
969else if (format.Length == 1)
985TryFormatR(dateTime, offset, new Span<char>(ref str.GetRawStringData(), str.Length), out charsWritten);
986Debug.Assert(charsWritten == str.Length);
992TryFormatS(dateTime, new Span<char>(ref str.GetRawStringData(), str.Length), out charsWritten);
993Debug.Assert(charsWritten == str.Length);
999TryFormatu(dateTime, offset, new Span<char>(ref str.GetRawStringData(), str.Length), out charsWritten);
1000Debug.Assert(charsWritten == str.Length);
1019TryFormatInvariantG(dateTime, offset, new Span<char>(ref str.GetRawStringData(), str.Length), out charsWritten);
1439Debug.Assert(dayAbbrev.Length == 3);
1442Debug.Assert(monthAbbrev.Length == 3);
1646Debug.Assert(dayAbbrev.Length == 3);
1649Debug.Assert(monthAbbrev.Length == 3);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\RegionInfo.cs (1)
31if (name.Length == 0)
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (18)
102return new ReadOnlySpan<char>(ref text.GetRawStringData(), text.Length);
123if ((uint)start > (uint)text.Length)
126return new ReadOnlySpan<char>(ref Unsafe.Add(ref text.GetRawStringData(), (nint)(uint)start /* force zero-extension */), text.Length - start);
146int actualIndex = startIndex.GetOffset(text.Length);
147if ((uint)actualIndex > (uint)text.Length)
152return new ReadOnlySpan<char>(ref Unsafe.Add(ref text.GetRawStringData(), (nint)(uint)actualIndex /* force zero-extension */), text.Length - actualIndex);
177(int start, int length) = range.GetOffsetAndLength(text.Length);
203if ((ulong)(uint)start + (ulong)(uint)length > (ulong)(uint)text.Length)
221return new ReadOnlyMemory<char>(text, 0, text.Length);
240if ((uint)start > (uint)text.Length)
243return new ReadOnlyMemory<char>(text, start, text.Length - start);
259int actualIndex = startIndex.GetOffset(text.Length);
260if ((uint)actualIndex > (uint)text.Length)
263return new ReadOnlyMemory<char>(text, actualIndex, text.Length - actualIndex);
285if ((ulong)(uint)start + (ulong)(uint)length > (ulong)(uint)text.Length)
311(int start, int length) = range.GetOffsetAndLength(text.Length);
6119_pos += value.Length;
6367_pos += value.Length;
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Comparison.cs (69)
28Debug.Assert(strA.Length == strB.Length);
33((uint)strA.Length) * sizeof(char));
43Debug.Assert(indexA + countA <= strA.Length && indexB + countB <= strB.Length);
52Debug.Assert(strA.Length == strB.Length);
54return Ordinal.EqualsIgnoreCase(ref strA.GetRawStringData(), ref strB.GetRawStringData(), strB.Length);
79if (Math.Min(strA.Length, strB.Length) <= 2) goto NotLongerThan2;
87ref Unsafe.Add(ref strA._firstChar, 2), strA.Length - 2,
88ref Unsafe.Add(ref strB._firstChar, 2), strB.Length - 2);
93return strA.Length - strB.Length;
158return Ordinal.CompareStringIgnoreCase(ref strA.GetRawStringData(), strA.Length, ref strB.GetRawStringData(), strB.Length);
223lengthA = Math.Min(lengthA, strA.Length - indexA);
228lengthB = Math.Min(lengthB, strB.Length - indexB);
258lengthA = Math.Min(lengthA, strA.Length - indexA);
263lengthB = Math.Min(lengthB, strB.Length - indexB);
292if (strA.Length - indexA < 0 || strB.Length - indexB < 0)
294string paramName = strA.Length - indexA < 0 ? nameof(indexA) : nameof(indexB);
303int lengthA = Math.Min(length, strA.Length - indexA);
304int lengthB = Math.Min(length, strB.Length - indexB);
377int lengthA = Math.Min(length, strA.Length - indexA);
378int lengthB = Math.Min(length, strB.Length - indexB);
441if (value.Length == 0)
458int offset = this.Length - value.Length;
459return (uint)offset <= (uint)this.Length && this.AsSpan(offset).SequenceEqual(value);
462return Length >= value.Length &&
463Ordinal.EqualsIgnoreCase(ref Unsafe.Add(ref GetRawStringData(), Length - value.Length),
465value.Length);
497nuint localLength = (uint)Length;
501int lastPos = Length - 1;
502return ((uint)lastPos < (uint)Length) && this[lastPos] == value;
533return Length > 1 && this[^2] == highSurrogate && this[^1] == lowSurrogate;
559if (this.Length != str.Length)
579if (this.Length != value.Length)
611if (this.Length != value.Length)
616if (this.Length != value.Length)
635if (a is null || b is null || a.Length != b.Length)
669if (a.Length != b.Length)
674if (a.Length != b.Length)
772Debug.Assert(src[Length] == '\0', "src[Length] == '\\0'");
779int length = Length;
866int length = Length;
869Debug.Assert(src[Length] == '\0', "src[this.Length] == '\\0'");
904return GetNonRandomizedHashCodeOrdinalIgnoreCaseSlow(hash1, hash2, this.AsSpan(Length - length));
1055if (value.Length == 0)
1072if (this.Length < value.Length || _firstChar != value._firstChar)
1076return (value.Length == 1) ?
1081((nuint)value.Length) * 2);
1084if (this.Length < value.Length)
1088return Ordinal.EqualsIgnoreCase(ref this.GetRawStringData(), ref value.GetRawStringData(), value.Length);
1120return Length != 0 && _firstChar == value;
1151return Length > 1 && _firstChar == highSurrogate && this[1] == lowSurrogate;
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.cs (20)
85elementCount: (uint)result.Length, // derefing Length now allows JIT to prove 'result' not null below
112elementCount: (uint)result.Length, // derefing Length now allows JIT to prove 'result' not null below
138elementCount: (uint)result.Length, // derefing Length now allows JIT to prove 'result' not null below
172elementCount: (uint)result.Length, // derefing Length now allows JIT to prove 'result' not null below
370value != null ? new ReadOnlySpan<char>(ref value.GetRawStringData(), value.Length) : default;
377if ((ulong)(uint)startIndex + (ulong)(uint)count > (ulong)(uint)Length)
405string result = FastAllocateString(str.Length);
408elementCount: (uint)result.Length, // derefing Length now allows JIT to prove 'result' not null below
426ArgumentOutOfRangeException.ThrowIfGreaterThan(count, Length - sourceIndex, nameof(sourceIndex));
442if ((uint)Length <= (uint)destination.Length)
444Buffer.Memmove(ref destination._reference, ref _firstChar, (uint)Length);
459if ((uint)Length <= (uint)destination.Length)
461Buffer.Memmove(ref destination._reference, ref _firstChar, (uint)Length);
470if (Length == 0)
473char[] chars = new char[Length];
478elementCount: (uint)Length);
488ArgumentOutOfRangeException.ThrowIfGreaterThan((uint)startIndex, (uint)Length, nameof(startIndex));
489ArgumentOutOfRangeException.ThrowIfGreaterThan(startIndex, Length - length);
509return value == null || value.Length == 0;
516for (int i = 0; i < value.Length; i++)
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (97)
71Debug.Assert(src.Length <= dest.Length - destPos);
76elementCount: (uint)src.Length);
128totalLength += toString.Length;
150Debug.Assert(position <= totalLength - s.Length, "We didn't allocate enough space for the result string!");
153position += s.Length;
218int str0Length = str0.Length;
220int totalLength = str0Length + str1.Length;
254long totalLength = (long)str0.Length + (long)str1.Length + (long)str2.Length;
263CopyStringContent(result, str0.Length, str1);
264CopyStringContent(result, str0.Length + str1.Length, str2);
292long totalLength = (long)str0.Length + (long)str1.Length + (long)str2.Length + (long)str3.Length;
301CopyStringContent(result, str0.Length, str1);
302CopyStringContent(result, str0.Length + str1.Length, str2);
303CopyStringContent(result, str0.Length + str1.Length + str2.Length, str3);
317Span<char> resultSpan = new Span<char>(ref result._firstChar, result.Length);
334Span<char> resultSpan = new Span<char>(ref result._firstChar, result.Length);
356Span<char> resultSpan = new Span<char>(ref result._firstChar, result.Length);
381Span<char> resultSpan = new Span<char>(ref result._firstChar, result.Length);
434totalLengthLong += value.Length;
457int valueLen = value.Length;
559sb.EnsureCapacity(format.Length + args.Length * 8);
6580 => format._literalLength == format.Format.Length ? format.Format : Format(provider, format, (object?)null, 0, 0, args),
670if (format._formattedCount == 0 && format._literalLength == format.Format.Length)
717ArgumentOutOfRangeException.ThrowIfGreaterThan((uint)startIndex, (uint)Length, nameof(startIndex));
719int oldLength = Length;
720int insertLength = value.Length;
1075totalLength += value.Length;
1102int valueLen = value.Length;
1149int oldLength = Length;
1167int oldLength = Length;
1184int oldLength = this.Length;
1204if ((uint)startIndex > Length)
1300nuint remainingLength = (uint)(Length - firstIndex);
1301string result = FastAllocateString(Length);
1318nuint length = (uint)Length;
1356if (oldValue.Length == 1)
1362if (newValue.Length == 1)
1376int pos = PackedSpanHelpers.IndexOf(ref Unsafe.Add(ref _firstChar, i), c, Length - i);
1389int pos = SpanHelpers.NonPackedIndexOfChar(ref Unsafe.Add(ref _firstChar, i), c, Length - i);
1405int pos = SpanHelpers.IndexOf(ref Unsafe.Add(ref _firstChar, i), Length - i, ref oldValue._firstChar, oldValue.Length);
1411i += pos + oldValue.Length;
1423string dst = ReplaceHelper(oldValue.Length, newValue, replacementIndices.AsSpan());
1434long dstLength = this.Length + ((long)(newValue.Length - oldValueLength)) * indices.Length;
1439Span<char> dstSpan = new Span<char>(ref dst._firstChar, dst.Length);
1459dstIdx += newValue.Length;
1463Debug.Assert(this.Length - thisIdx == dstSpan.Length - dstIdx);
1635else if (replacementText.Length != 1 || replacementText[0] != text[idx])
1650if ((uint)idxOfFirstNewlineChar >= (uint)Length)
1656(uint)(idxOfFirstNewlineChar + 1) < (uint)Length &&
1718if (count <= 1 || Length == 0)
1784if (count <= 1 || Length == 0)
1791if (separators.IsEmpty && count > Length)
1854if (count <= 1 || Length == 0)
1863if (separator!.Length == 0)
1910if ((options & StringSplitOptions.RemoveEmptyEntries) == 0 || candidate.Length != 0)
1958for (int i = 0; i < numActualReplaces && currIndex < Length; i++)
1965if (currIndex < Length && numActualReplaces >= 0)
2463int currentSepLength = separator.Length;
2498int length = Length - startIndex;
2504if ((uint)startIndex > (uint)Length)
2506ThrowSubstringArgumentOutOfRange(startIndex, length, Length);
2516if ((ulong)(uint)startIndex + (ulong)(uint)length > (ulong)(uint)Length)
2521ThrowSubstringArgumentOutOfRange(startIndex, length, Length);
2529if (length == Length)
2555Debug.Assert(startIndex >= 0 && startIndex <= this.Length, "StartIndex is out of range!");
2556Debug.Assert(length >= 0 && startIndex <= this.Length - length, "length is out of range!");
2611if (Length == 0)
2628if (Length == 0)
2638Debug.Assert(Length > 0);
2655string result = FastAllocateString(Length);
2656Span<char> resultSpan = new Span<char>(ref result.GetRawStringData(), Length);
2679if (Length == 0 || (!char.IsWhiteSpace(_firstChar) && !char.IsWhiteSpace(this[^1])))
2689if (Length == 0 || (_firstChar != trimChar && this[^1] != trimChar))
2715while ((uint)(index + 1) < (uint)Length && this[index] == highSurrogate && this[index + 1] == lowSurrogate)
2721int endIndex = Length - 2;
2789while ((uint)(index + 1) < (uint)Length && this[index] == highSurrogate && this[index + 1] == lowSurrogate)
2855int endIndex = Length - 2;
2856while ((uint)endIndex < (uint)Length && this[endIndex] == highSurrogate && this[endIndex + 1] == lowSurrogate)
2903int end = Length - 1;
2909for (start = 0; start < Length; start++)
2920for (end = Length - 1; end >= start; end--)
2939int end = Length - 1;
2945for (start = 0; start < Length; start++)
2966for (end = Length - 1; end >= start; end--)
2992len == Length ? this :
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Searching.cs (36)
18if (RuntimeHelpers.IsKnownConstant(value) && value.Length == 1)
26Length,
28value.Length) >= 0;
39=> SpanHelpers.ContainsValueType(ref Unsafe.As<char, short>(ref _firstChar), (short)value, Length);
76public int IndexOf(char value) => SpanHelpers.IndexOfChar(ref _firstChar, value, Length);
80return IndexOf(value, startIndex, Length - startIndex);
102return IndexOf(value, startIndex, Length - startIndex, comparisonType);
133ArgumentOutOfRangeException.ThrowIfGreaterThan(startIndex, Length);
135ArgumentOutOfRangeException.ThrowIfGreaterThan(count, Length - startIndex);
166if ((uint)startIndex > (uint)Length)
171if ((uint)count > (uint)(Length - startIndex))
191return new ReadOnlySpan<char>(ref _firstChar, Length).IndexOfAny(anyOf);
196return IndexOfAny(anyOf, startIndex, Length - startIndex);
206if ((uint)startIndex > (uint)Length)
211if ((uint)count > (uint)(Length - startIndex))
323return IndexOf(value, 0, Length, comparisonType);
328return IndexOf(value, startIndex, Length - startIndex, comparisonType);
417return IndexOf(value, startIndex, Length - startIndex, comparisonType);
436ArgumentOutOfRangeException.ThrowIfGreaterThan(startIndex, Length);
438ArgumentOutOfRangeException.ThrowIfGreaterThan(count, Length - startIndex);
452=> SpanHelpers.LastIndexOfValueType(ref Unsafe.As<char, short>(ref _firstChar), (short)value, Length);
461if (Length == 0)
466if ((uint)startIndex >= (uint)Length)
494return LastIndexOf(value, Length - 1, comparisonType);
529if (Length == 0)
549ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(startIndex, Length);
595return new ReadOnlySpan<char>(ref _firstChar, Length).LastIndexOfAny(anyOf);
610if (Length == 0)
615if ((uint)startIndex >= (uint)Length)
638return LastIndexOf(value, Length - 1, Length, StringComparison.CurrentCulture);
653return LastIndexOf(value, Length - 1, Length, comparisonType);
730return LastIndexOf(value, Length - 1, comparisonType);
765if (Length == 0)
773ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(startIndex, Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\StringComparer.cs (10)
341return Globalization.Ordinal.CompareStringIgnoreCase(ref x.GetRawStringData(), x.Length, ref y.GetRawStringData(), y.Length);
356if (x.Length != y.Length)
360return Globalization.Ordinal.EqualsIgnoreCase(ref x.GetRawStringData(), ref y.GetRawStringData(), x.Length);
504return Globalization.Ordinal.CompareStringIgnoreCase(ref x.GetRawStringData(), x.Length, ref y.GetRawStringData(), y.Length);
519if (x.Length != y.Length)
524return Globalization.Ordinal.EqualsIgnoreCase(ref x.GetRawStringData(), ref y.GetRawStringData(), x.Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (23)
108: this(value, 0, value?.Length ?? 0, capacity)
127if (startIndex > value.Length - length)
201if (persistedMaxCapacity < 1 || persistedString.Length > persistedMaxCapacity)
209persistedCapacity = Math.Min(Math.Max(DefaultCapacity, persistedString.Length), persistedMaxCapacity);
212if (persistedCapacity < 0 || persistedCapacity < persistedString.Length || persistedCapacity > persistedMaxCapacity)
220persistedString.CopyTo(0, m_ChunkChars, 0, persistedString.Length);
221m_ChunkLength = persistedString.Length;
336if ((uint)(chunkLength + chunkOffset) > (uint)result.Length || (uint)chunkLength > (uint)sourceArray.Length)
374CopyTo(startIndex, new Span<char>(ref result.GetRawStringData(), result.Length), result.Length);
779Append(ref value.GetRawStringData(), value.Length);
807if (startIndex > value.Length - count)
1173return AppendJoinCore(ref separator.GetRawStringData(), separator.Length, values);
1186return AppendJoinCore(ref separator.GetRawStringData(), separator.Length, values);
1197return AppendJoinCore(ref separator.GetRawStringData(), separator.Length, values);
1208return AppendJoinCore(ref separator.GetRawStringData(), separator.Length, values);
1221return AppendJoinCore(ref separator.GetRawStringData(), separator.Length, values);
1340Insert(index, ref value.GetRawStringData(), value.Length);
1591if ((uint)pos >= (uint)format.Length)
1811if (width <= s.Length)
1818Append(' ', width - s.Length);
1822Append(' ', width - s.Length);
1833if ((uint)pos >= (uint)format.Length)
System\Reflection\Runtime\Assemblies\NativeFormat\NativeFormatRuntimeAssembly.GetTypeCore.CaseInsensitive.cs (1)
82if (ns.Length != 0)
System.Private.DataContractSerialization (147)
System.Private.Reflection.Execution (4)
System.Private.TypeLoader (8)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\Utilities\ExceptionTypeNameFormatter.cs (1)
101if (ns.Length > 0)
System.Private.Uri (107)
System\Uri.cs (72)
177Debug.Assert(offset.End >= offset.Fragment && offset.End <= _string.Length);
511if (uriString!.Length != 0)
648if ((uint)i < (uint)relativeStr.Length && relativeStr[i] == ':' && i > 1)
658if (i + 1 < relativeStr.Length)
677if (relativeStr.Length == 0)
927if (path.Length == 0)
936while (current < path.Length)
941next = path.Length - 1;
1218string.Concat(host.AsSpan(1, host.Length - 2), scopeId) :
1219host.Substring(1, host.Length - 2);
1297if (IPv6AddressHelper.IsValid(name, out end) && end == name.Length)
1303if (IPv4AddressHelper.IsValid(name.AsSpan(), out end, false, false, false) && end == name.Length)
1308if (DomainNameHelper.IsValid(name, iri: false, notImplicitFile: false, out end) && end == name.Length)
1313if (DomainNameHelper.IsValid(name, iri: true, notImplicitFile: false, out end) && end == name.Length)
1320if (IPv6AddressHelper.IsValid($"[{name}]", out end) && end - 2 == name.Length)
1431ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, pattern.Length);
1434&& (pattern.Length - index >= 3))
1471(pattern.Length - index) >= 3 &&
1904return (uint)index < (uint)uriString.Length && uriString[index] == ':';
1919int length = uriString.Length;
2214info.Offset.End = str.Length;
2250idx += _syntax.SchemeName.Length + 1;
2310Debug.Assert((uint)idx <= (uint)OriginalString.Length);
2322(uint)idx < (uint)str.Length && str[idx] == ':')
2334if ((uint)idx < (uint)str.Length)
2345for (idx++; (uint)idx < (uint)str.Length; idx++)
2419if (host.Length != 0)
2466for (int i = 0; i < host.Length; ++i)
2522if (host.Length == 0)
2562if (CheckAuthorityHelper(host, 0, out ParsingError err, ref flags, _syntax.Flags, ref newHost) != host.Length ||
2570host = CreateHostStringHelper(host, 0, host.Length, ref flags, _info);
2572for (int i = 0; i < host.Length; ++i)
2597for (int idx = 0; idx < portStr.Length; ++idx)
2706var dest = str.Length <= StackallocThreshold
2708: new ValueStringBuilder(str.Length);
2723var dest = str.Length <= StackallocThreshold
2725: new ValueStringBuilder(str.Length);
2809if (host.Length != 0)
2988if (_info.Offset.Scheme == 0 && _info.Offset.End == _string.Length)
3001if (_info.Offset.Scheme == 0 && _info.Offset.Fragment == _string.Length)
3012if (_info.Offset.Scheme == 0 && _info.Offset.Fragment == _string.Length)
3097if (_info.Offset.Scheme == 0 && _info.Offset.End == _string.Length)
3156int length = inputStr.Length;
3158while ((uint)(length - 1) < (uint)inputStr.Length && UriHelper.IsLWS(inputStr[length - 1]))
3172Debug.Assert(str[_syntax.SchemeName.Length] == ':');
3174int schemeLength = _syntax.SchemeName.Length;
3234queryStart = inputStr.Length;
3241queryStart = inputStr.Length;
3246_info.Offset.Fragment = inputStr.Length; // There is no fragment in DisablePathAndQueryCanonicalization mode
3247_info.Offset.End = inputStr.Length;
3355if ((uint)idx < (uint)inputStr.Length && inputStr[idx] == '?')
3382if ((uint)idx < (uint)inputStr.Length && inputStr[idx] == '#')
3524while ((uint)i < (uint)uriString.Length && UriHelper.IsLWS(uriString[i]))
3532(uint)i < (uint)uriString.Length && uriString[i] == '/' &&
3533((uint)(i + 1) >= (uint)uriString.Length || uriString[i + 1] is not ('/' or '\\')))
3545if ((uint)(i + 2) >= (uint)uriString.Length || colonOffset == 0)
3582while ((uint)i < (uint)uriString.Length && uriString[i] is '/' or '\\')
4428(relativePart.Length == 1 || (relativePart[1] != '/' && relativePart[1] != '\\')))
4447if (relativePart.Length >= 2 && (relativePart[1] == '\\' || relativePart[1] == '/'))
4488if (relativePart.Length >= 2 && relativePart[1] == '/')
4515int length = left.Length;
4516char[] path = new char[length + relativePart.Length];
4532relativePart.CopyTo(0, path, length, relativePart.Length);
4546for (; i < relativePart.Length; ++i)
4557else if (i < relativePart.Length)
4565length += relativePart.Length;
4638for (i = 0; (i < path1.Length) && (i < path2.Length); ++i)
4657if ((i == path1.Length) && (i == path2.Length))
4664for (; i < path1.Length; ++i)
4672if (relPath.Length == 0 && path2.Length - 1 == si)
System.Private.Windows.Core (14)
System\Private\Windows\Ole\Composition.ManagedToNativeAdapter.cs (7)
337sizeInBytes += (uint)(file.Length + 1) * sizeof(char);
367fileBuffer[file.Length] = '\0';
368fileBuffer = fileBuffer[(file.Length + 1)..];
378int byteCount = PInvokeCore.WideCharToMultiByte(PInvokeCore.CP_ACP, 0, value, value.Length, null, 0, null);
386PInvokeCore.WideCharToMultiByte(PInvokeCore.CP_ACP, 0, value, value.Length, (PSTR)buffer.Pointer, byteCount, null);
396uint byteCount = (uint)value.Length * sizeof(char) + sizeof(char);
408span[value.Length] = '\0';
System.Private.Xml (1051)
System\Xml\Core\XmlEncodedRawTextWriterAsync.cs (27)
135Debug.Assert(name != null && name.Length > 0);
177Debug.Assert(localName != null && localName.Length > 0);
205Debug.Assert(localName != null && localName.Length > 0);
240Debug.Assert(localName != null && localName.Length > 0);
262Debug.Assert(localName != null && localName.Length > 0);
272if (prefix != null && prefix.Length > 0)
326if (prefix.Length == 0)
420Debug.Assert(name != null && name.Length > 0);
429if (text.Length > 0)
443Debug.Assert(name != null && name.Length > 0);
893int leftCount = text.Length;
1112int leftCount = text.Length;
1248int writeLen = RawTextNoFlush(text, 0, text.Length);
1250_RawTextAsync(text, writeLen, text.Length - writeLen) :
1263writeLen = RawTextNoFlush(text1, 0, text1.Length);
1268return _RawTextAsync(text1, writeLen, text1.Length - writeLen, text2, text3, text4);
1274writeLen = RawTextNoFlush(text2, 0, text2.Length);
1279return _RawTextAsync(text2, writeLen, text2.Length - writeLen, text3, text4);
1287writeLen = RawTextNoFlush(text3, 0, text3.Length);
1292return _RawTextAsync(text3, writeLen, text3.Length - writeLen, text4);
1299writeLen = RawTextNoFlush(text4, 0, text4.Length);
1302return _RawTextAsync(text4, writeLen, text4.Length - writeLen);
1510int leftCount = text.Length;
1686if (text.Length == 0)
1697int leftCount = text.Length;
1870if (text.Length == 0)
1881int leftCount = text.Length;
System\Xml\Core\XmlUtf8RawTextWriterAsync.cs (27)
113Debug.Assert(name != null && name.Length > 0);
153Debug.Assert(localName != null && localName.Length > 0);
179Debug.Assert(localName != null && localName.Length > 0);
212Debug.Assert(localName != null && localName.Length > 0);
232Debug.Assert(localName != null && localName.Length > 0);
240if (prefix != null && prefix.Length > 0)
290if (prefix.Length == 0)
376Debug.Assert(name != null && name.Length > 0);
383if (text.Length > 0)
397Debug.Assert(name != null && name.Length > 0);
766int leftCount = text.Length;
984int leftCount = text.Length;
1119int writeLen = RawTextNoFlush(text, 0, text.Length);
1121_RawTextAsync(text, writeLen, text.Length - writeLen) :
1134writeLen = RawTextNoFlush(text1, 0, text1.Length);
1139return _RawTextAsync(text1, writeLen, text1.Length - writeLen, text2, text3, text4);
1145writeLen = RawTextNoFlush(text2, 0, text2.Length);
1150return _RawTextAsync(text2, writeLen, text2.Length - writeLen, text3, text4);
1158writeLen = RawTextNoFlush(text3, 0, text3.Length);
1163return _RawTextAsync(text3, writeLen, text3.Length - writeLen, text4);
1170writeLen = RawTextNoFlush(text4, 0, text4.Length);
1173return _RawTextAsync(text4, writeLen, text4.Length - writeLen);
1380int leftCount = text.Length;
1555if (text.Length == 0)
1566int leftCount = text.Length;
1738if (text.Length == 0)
1749int leftCount = text.Length;
System\Xml\Schema\DtdParser.cs (22)
289if (systemId != null && systemId.Length > 0)
299if (publicId != null && publicId.Length > 0)
309if (internalSubset != null && internalSubset.Length > 0)
469if (_systemId != null && _systemId.Length > 0)
484if (_systemId != null && _systemId.Length > 0)
682if (attrDef != null && attrDef.Prefix.Length > 0 && attrDef.Prefix.Equals("xml") && attrDef.Name.Name == "space")
706if (attrDef.Prefix.Length > 0 && attrDef.Prefix.Equals("xml"))
944SendValidationEvent(_curPos - name.Name.Length, XmlSeverityType.Error, SR.Sch_DupElementDecl, GetNameString());
1228entity.DeclaredURI = (_externalDtdBaseUri.Length == 0) ? _documentBaseUri : _externalDtdBaseUri;
1323SendValidationEvent(_curPos - notationName.Name.Length, XmlSeverityType.Error, SR.Sch_DupNotation, notationName.Name);
1353UndeclaredNotation un = new UndeclaredNotation(notationName, LineNo, LinePos - notationName.Length);
1483Throw(_curPos - systemId.Length - 1, SR.Xml_FragmentId, new string[] { systemId.Substring(systemId.IndexOf('#')), systemId });
1501ThrowInvalidChar(_curPos - 1 - publicId.Length + i, publicId, i);
3257Throw(_curPos - entityName.Name.Length - 1, SR.Xml_InvalidParEntityRef);
3267Throw(_curPos - entityName.Name.Length - 1, paramEntity ? SR.Xml_RecursiveParEntity : SR.Xml_RecursiveGenEntity, entityName.Name);
3281if (entity.Text!.Length == 0)
3360SendValidationEvent(_curPos - entityName.Name.Length - 1, XmlSeverityType.Error, SR.Xml_UndeclaredParEntity, entityName.Name);
3369SendValidationEvent(_curPos - entityName.Name.Length - 1, XmlSeverityType.Error, SR.Xml_UndeclaredEntity, entityName.Name);
3374Throw(_curPos - entityName.Name.Length - 1, SR.Xml_UndeclaredEntity, entityName.Name);
3382Throw(_curPos - entityName.Name.Length - 1, SR.Xml_UnparsedEntityRef, entityName.Name);
3387Throw(_curPos - entityName.Name.Length - 1, SR.Xml_ExternalEntityInAttValue, entityName.Name);
3539int len = value.Length;
System\Xml\Schema\DtdParserAsync.cs (12)
113if (_systemId != null && _systemId.Length > 0)
128if (_systemId != null && _systemId.Length > 0)
326if (attrDef != null && attrDef.Prefix.Length > 0 && attrDef.Prefix.Equals("xml") && attrDef.Name.Name == "space")
350if (attrDef.Prefix.Length > 0 && attrDef.Prefix.Equals("xml"))
588SendValidationEvent(_curPos - name.Name.Length, XmlSeverityType.Error, SR.Sch_DupElementDecl, GetNameString());
859entity.DeclaredURI = (_externalDtdBaseUri.Length == 0) ? _documentBaseUri : _externalDtdBaseUri;
957SendValidationEvent(_curPos - notationName.Name.Length, XmlSeverityType.Error, SR.Sch_DupNotation, notationName.Name);
1108Throw(_curPos - systemId.Length - 1, SR.Xml_FragmentId, new string[] { systemId.Substring(systemId.IndexOf('#')), systemId });
1126ThrowInvalidChar(_curPos - 1 - publicId.Length + i, publicId, i);
2587Throw(_curPos - entityName.Name.Length - 1, SR.Xml_InvalidParEntityRef);
2597Throw(_curPos - entityName.Name.Length - 1, paramEntity ? SR.Xml_RecursiveParEntity : SR.Xml_RecursiveGenEntity, entityName.Name);
2614if (entity.Text!.Length == 0)
System\Xml\Schema\Inference\Infer.cs (62)
247if (ns.Length != 0)
324if (childURI.Length == 0)
340if (childURI.Length != 0)
344if (prefix.Length != 0 && !string.Equals(prefix, "xml", StringComparison.OrdinalIgnoreCase))
356if (childURI!.Length != 0) //BUGBUG It need not be an attribute reference if there is a namespace, it can be attribute with attributeFormDefault = qualified
468if (childURI.Length != 0)
483Debug.Assert(targetNS == null || targetNS.Length > 0, "targetns for schema is empty");
539if (prefix.Length != 0)
1041if (childURI.Length == 0)
1423if (attr.RefName.Name.Length == 0)
1751if (s.Length == 0) return TF_string;
1778if (i == s.Length)
1797i++; if (i == s.Length) return TF_decimal | TF_float | TF_double | TF_string; //"9999.9" was matched
1810i++; if (i == s.Length) return TF_string;
1823i++; if (i == s.Length) return TF_string; //".9999e+" was matched
1829i++; if (i == s.Length) return TF_float | TF_double | TF_string; //".9999e+99" was matched
1836i++; if (i == s.Length) return TF_string;
1852i++; if (i == s.Length) return TF_string;
1866i++; if (i == s.Length) return TF_string;
1877i++; if (i == s.Length) return TF_string; //"P999" was matched
1894if (i == s.Length)
1910i++; if (i == s.Length) return TF_string; //"P999Y9" was matched
1925if (i == s.Length)
1941i++; if (i == s.Length) return TF_string; //"P999Y999M9" was matched
1954if (i == s.Length)
1967i++; if (i == s.Length) return TF_string; //"P999Y999M9999DT" was matched
1973i++; if (i == s.Length) return TF_string; //"___T9" was matched
1992if (i == s.Length)
2002i++; if (i == s.Length) return TF_string; //"___T999H9" was matched
2019if (i == s.Length)
2029i++; if (i == s.Length) return TF_string; //"___T999H999M9" was matched
2044if (i == s.Length)
2054i++; if (i == s.Length) return TF_string; //"___T999H999M999.9" was matched
2067if (i == s.Length)
2085if (i == s.Length)
2116if (i == s.Length)
2145if (i == s.Length)
2170if (i == s.Length)
2198i++; if (i == s.Length) return TF_string; //"9999-"
2201i++; if (i == s.Length) return TF_string; //"9999-9"
2205if (i == s.Length)
2225i++; if (i == s.Length) return TF_string; //"9999-99-"
2228i++; if (i == s.Length) return TF_string; //"9999-99-9"
2231i++; if (i == s.Length) return DateTime(s, bDate, bTime); //"9999-99-99"
2251if (i == s.Length)
2266i++; if (i == s.Length) return TF_string;
2269i++; if (i == s.Length) return TF_string;
2272i++; if (i == s.Length) return TF_string;
2276i++; if (i == s.Length) return TF_string;
2279i++; if (i == s.Length) return TF_string;
2283if (i == s.Length)
2297i++; if (i == s.Length) return TF_string;
2300i++; if (i == s.Length) return TF_string;
2303i++; if (i == s.Length) return TF_string;
2307i++; if (i == s.Length) return TF_string;
2310i++; if (i == s.Length) return TF_string;
2313i++; if (i == s.Length) return TF_string;
2316i++; if (i == s.Length) return TF_string;
2319i++; if (i == s.Length) return TF_string;
2322i++; if (i == s.Length) return DateTime(s, bDate, bTime);
2337i++; if (i == s.Length) return TF_string;
2341i++; if (i == s.Length) return DateTime(s, bDate, bTime);
System\Xml\Xsl\Runtime\XmlQueryOutput.cs (16)
222if (prefix.Length == 5 && prefix == "xmlns")
236if (ns.Length != 0 && _depth != 0)
541Debug.Assert(prefix.Length == 0 || ns.Length != 0);
553if (ns.Length == 0 && prefix.Length == 0)
725throw new XslTransformException(SR.XmlIl_NmspConflict, new string[] { prefix.Length == 0 ? "" : ":", prefix, ns, nsExisting });
1221if (navigator.NamespaceURI.Length == 0)
1223Debug.Assert(navigator.LocalName.Length != 0, "xmlns:foo='' isn't allowed");
1350Debug.Assert(prefix.Length != 0 && ns.Length != 0);
1413if (isElemPrefix || genPrefix.Length != 0)
1422if (isElemPrefix || genPrefix.Length != 0)
1504Debug.Assert(ValidateNames.ParseNCName(name.Name, 0) == name.Name.Length);
1507prefix = (name.Namespace.Length != 0) ? RemapPrefix(string.Empty, name.Namespace, nodeType == XPathNodeType.Element) : string.Empty;
1526prefix = (ns.Length != 0) ? RemapPrefix(string.Empty, ns, nodeType == XPathNodeType.Element) : string.Empty;
System\Xml\Xsl\XsltOld\RecordBuilder.cs (9)
622for (; index < comment.Length; index++)
631newComment = new StringBuilder(comment, begin, index, 2 * comment.Length);
651if (begin < comment.Length)
652newComment.Append(comment, begin, comment.Length - begin);
675for (; index < pi.Length; index++)
687newPI = new StringBuilder(pi, begin, index, 2 * pi.Length);
706if (begin < pi.Length)
708newPI.Append(pi, begin, pi.Length - begin);
781Debug.Assert(prefix != null && prefix.Length > 0);
System.Private.Xml.Linq (54)
System\Xml\Linq\XLinq.cs (13)
39if (_text.Length > 0)
61else if (_text.Length > 0)
130if (_text.Length > 0)
298if (namespaceName.Length == 0) return string.Empty;
320_resolver.AddFirst(a.Name.NamespaceName.Length == 0 ? string.Empty : a.Name.LocalName, XNamespace.Get(a.Value));
338_resolver.Add(a.Name.NamespaceName.Length == 0 ? string.Empty : a.Name.LocalName, XNamespace.Get(a.Value));
384_writer.WriteAttributeString(GetPrefixOfNamespace(ns, false), localName, namespaceName.Length == 0 && localName == "xmlns" ? XNamespace.xmlnsPrefixNamespace : namespaceName, a.Value);
404await _writer.WriteAttributeStringAsync(GetPrefixOfNamespace(ns, false), localName, namespaceName.Length == 0 && localName == "xmlns" ? XNamespace.xmlnsPrefixNamespace : namespaceName, a.Value).ConfigureAwait(false);
493if (_rover != null && _rover.ns == ns && (allowDefaultNamespace || _rover.prefix.Length > 0)) return _rover.prefix;
514else if (d.prefix.Length > 0)
553_writer.WriteAttributeString(GetPrefixOfNamespace(ns, false), localName, namespaceName.Length == 0 && localName == "xmlns" ? XNamespace.xmlnsPrefixNamespace : namespaceName, a.Value);
563if (namespaceName.Length == 0) return string.Empty;
578_resolver.Add(a.Name.NamespaceName.Length == 0 ? string.Empty : a.Name.LocalName, XNamespace.Get(a.Value));
System.Reflection.Context (2)
System.Reflection.Emit (2)
System.Reflection.Metadata (56)
System.Reflection.MetadataLoadContext (9)
System.Resources.Extensions (8)
System.Resources.Writer (1)
System.Runtime.Caching (4)
System.Runtime.InteropServices.JavaScript (11)
System.Runtime.Numerics (3)
System.Runtime.Serialization.Formatters (2)
System.Runtime.Serialization.Schema (13)
System.Security.Cryptography (44)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9AttributeObject.cs (1)
44if (szOid.Length == 0)
System.Security.Cryptography.Pkcs (7)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9AttributeObject.cs (1)
44if (szOid.Length == 0)
System.Security.Cryptography.Xml (26)
System.Security.Permissions (2)
System.Security.Principal.Windows (7)
System.ServiceModel.Federation (1)
System.ServiceModel.Http (1)
System.ServiceModel.NetFramingBase (1)
System.ServiceModel.NetNamedPipe (5)
System.ServiceModel.NetNamedPipe.Tests (2)
System.ServiceModel.Primitives (158)
Internals\System\Xml\XmlMtomReader.cs (25)
120if (contentType != null && contentType.Length == 0)
231|| charset == null || charset.Length == 0)
285|| rootType == null || rootType.Length == 0)
405if (uri == null || uri.Length == 0)
410contentID = string.Format(CultureInfo.InvariantCulture, "<{0}>", Uri.UnescapeDataString(uri.Substring(MimeGlobals.ContentIDScheme.Length)));
1376count = Math.Min(_stringValue.Length - _stringOffset, count);
1449if (val.Length > stringContentQuota)
1451stringContentQuota -= val.Length;
2303remaining += value.Length * sizeof(char);
2306remaining += name.Length * sizeof(char);
2325remaining += header.Value.Length * sizeof(char);
2419if (offset >= Value.Length || Value[offset++] != '/')
2425if (offset >= Value.Length || Value[offset++] != ';')
2432if (paramAttribute == null || offset >= Value.Length || Value[offset++] != '=')
2462if (paramAttribute == null || startInfoOffset >= startInfo.Length || startInfo[startInfoOffset++] != '=')
2531contentTransferEncodingValue = (Value.Length == 0) ? Value : ((Value[0] == '"') ? MailBnfHelper.ReadQuotedString(Value, ref offset, null) : MailBnfHelper.ReadToken(Value, ref offset, null));
2597if ((!MailBnfHelper.SkipCFWS(Value, ref offset) || offset >= Value.Length || Value[offset++] != '.') || !MailBnfHelper.SkipCFWS(Value, ref offset))
2815XmlMtomReader.DecrementBufferQuota(maxBuffer, ref remaining, value.Length * sizeof(char));
2824XmlMtomReader.DecrementBufferQuota(maxBuffer, ref remaining, value.Length * sizeof(char));
3089for (; offset < data.Length; offset++)
3110for (; offset < data.Length; offset++)
3145if (offset < data.Length && data[offset] == '"')
3154for (; offset < data.Length; offset++)
3172for (; offset < data.Length && data[offset] < s_digits.Length && s_digits[data[offset]]; offset++)
3180int length = (data == null) ? 0 : data.Length;
Internals\System\Xml\XmlMtomWriter.cs (7)
172if (startUri != null && startUri.Length > 0)
175if (startInfo != null && startInfo.Length > 0)
1176size += XmlMtomWriter.ValidateSizeOfMessage(maxSizeInBytes, size, name.Length);
1177size += XmlMtomWriter.ValidateSizeOfMessage(maxSizeInBytes, size, value.Length);
1183byte[] boundaryBytes = new byte[boundary.Length + MimeGlobals.BoundaryPrefix.Length];
1186Encoding.ASCII.GetBytes(boundary, 0, boundary.Length, boundaryBytes, MimeGlobals.BoundaryPrefix.Length);
1456Write(value, 0, value.Length);
System.ServiceModel.Syndication (3)
System.ServiceProcess.ServiceController (8)
System.Speech (76)
System.Text.Encoding.CodePages (6)
System.Text.Encodings.Web (11)
System.Text.Json (15)
System.Text.Json.SourceGeneration (4)
System.Text.RegularExpressions (176)
System\Text\RegularExpressions\Regex.Match.cs (7)
214return RunSingleMatch(RegexRunnerMode.ExistenceRequired, -1, input, 0, input.Length, RightToLeft ? input.Length : 0) is null;
250return RunSingleMatch(RegexRunnerMode.ExistenceRequired, -1, input, 0, input.Length, startat) is null;
430return RunSingleMatch(RegexRunnerMode.FullMatchRequired, -1, input, 0, input.Length, RightToLeft ? input.Length : 0)!;
513return RunSingleMatch(RegexRunnerMode.FullMatchRequired, -1, input, 0, input.Length, startat)!;
742return new MatchCollection(this, input, RightToLeft ? input.Length : 0);
System\Text\RegularExpressions\Regex.Replace.cs (7)
222return Replace(input, replacement, -1, RightToLeft ? input.Length : 0);
263return Replace(input, replacement, count, RightToLeft ? input.Length : 0);
509return Replace(evaluator, this, input, -1, RightToLeft ? input.Length : 0);
557return Replace(evaluator, this, input, count, RightToLeft ? input.Length : 0);
620if ((uint)startat > (uint)input.Length)
647state.segments.Add(input.AsMemory(state.prevat, input.Length - state.prevat));
651state.prevat = input.Length;
System.Text.RegularExpressions.Generator (147)
System.Threading.AccessControl (6)
System.Transactions.Local (3)
System.Web.HttpUtility (11)
System.Windows.Controls.Ribbon (17)
System.Windows.Forms (245)
System.Windows.Forms.Analyzers.CSharp (5)
System.Windows.Forms.Design (64)
System.Windows.Forms.Primitives (11)
System.Windows.Input.Manipulations (1)
System.Xaml (61)
Terminals.Repl (3)
TestingAppHost1.AppHost (2)
TypeScriptApiCompat (11)
UIAutomationClient (6)
UIAutomationClientSideProviders (27)
UIAutomationTypes (1)
vbc (3)
VBCSCompiler (12)
vstest.console (10)
vstest.console.arm64 (10)