111 references to StartsWith
Aspire.Dashboard (5)
Model\ConnectionStringParser.cs (5)
281if (token.StartsWith('[') && token.Contains(']')) 289if ((afterBracket.StartsWith(':') || afterBracket.StartsWith(',')) && afterBracket.Length > 1) 486if (connectionString.StartsWith('/') || connectionString.StartsWith('\\') ||
Aspire.Hosting (1)
Orchestrator\ApplicationOrchestrator.cs (1)
274if (url.Url.StartsWith('/') && endpoint.AllocatedEndpoint is { } allocatedEndpoint)
Aspire.Hosting.Docker (1)
EnvFile.cs (1)
23if (!trimmed.StartsWith('#') && trimmed.Contains('='))
BasicTestApp (1)
Program.cs (1)
42policy.RequireAssertion(ctx => ctx.User.Identity.Name?.StartsWith('B') ?? false));
CodeGenerator (1)
src\Servers\Kestrel\shared\KnownHeaders.cs (1)
501if (identifier.StartsWith(':'))
illink (7)
InMemory.FunctionalTests (2)
Http2\Http2ConnectionTests.cs (1)
6129foreach (var headerField in requestHeaders.Where(h => h.Key.StartsWith(':')))
Http3\Http3StreamTests.cs (1)
2237foreach (var headerField in requestHeaders.Where(h => h.Key.StartsWith(':')))
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
OpenIdConnectHandler.cs (1)
1501if (!uri.StartsWith('/'))
Microsoft.AspNetCore.Authentication.WsFederation (1)
WsFederationHandler.cs (1)
510if (!uri.StartsWith('/'))
Microsoft.AspNetCore.Components (4)
Routing\Router.cs (1)
432var normalizedRoute = route.StartsWith('/') ? route : $"/{route}";
src\Http\Routing\src\Patterns\RoutePatternParser.cs (3)
217if (decoded.StartsWith('*') && decoded.EndsWith('?')) 463else if (routePattern.StartsWith('/')) 467else if (routePattern.StartsWith('~'))
Microsoft.AspNetCore.Components.Endpoints (1)
FormMapping\HttpContextFormValueMapper.cs (1)
51if (incomingScopeQualifiedFormName.StartsWith('['))
Microsoft.AspNetCore.Components.Web (1)
Forms\Mapping\FormMappingScope.cs (1)
46else if (Name.StartsWith('['))
Microsoft.AspNetCore.Diagnostics (1)
StatusCodePage\StatusCodePagesExtensions.cs (1)
98if (locationFormat.StartsWith('~'))
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Internal\JsonTranscodingRouteAdapter.cs (1)
227else if (segment.StartsWith('*'))
Internal\JsonTranscodingServerCallContext.cs (1)
151if (header.Key.StartsWith(':') || GrpcProtocolConstants.FilteredHeaders.Contains(header.Key))
Microsoft.AspNetCore.Http.Results (1)
VirtualFileHttpResult.cs (1)
155if (normalizedPath.StartsWith('~'))
Microsoft.AspNetCore.Mvc.Core (9)
ApplicationModels\AttributeRouteModel.cs (2)
157template.StartsWith('/')); 222if (result.StartsWith('/'))
Formatters\FormatterMappings.cs (1)
97if (format.StartsWith('.'))
Infrastructure\VirtualFileResultExecutor.cs (1)
114if (normalizedPath.StartsWith('~'))
ModelBinding\ModelNames.cs (1)
55if (propertyName.StartsWith('['))
Routing\UrlHelperBase.cs (3)
425if (!virtualPath.StartsWith('/')) 448if (!virtualPath.StartsWith('/')) 483else if (virtualPath.StartsWith('/'))
Routing\ViewEnginePath.cs (1)
20if (second.StartsWith('/'))
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (4)
FileProviderRazorProjectFileSystem.cs (1)
79var hasLeadingSlash = path2.StartsWith('/');
src\Mvc\Mvc.RazorPages\src\ApplicationModels\PageRouteModelFactory.cs (3)
89Debug.Assert(relativePath.StartsWith('/')); 142Debug.Assert(viewEnginePath.StartsWith('/')); 175Debug.Assert(directory.StartsWith('/'));
Microsoft.AspNetCore.Mvc.RazorPages (5)
ApplicationModels\PageRouteModelFactory.cs (3)
89Debug.Assert(relativePath.StartsWith('/')); 142Debug.Assert(viewEnginePath.StartsWith('/')); 175Debug.Assert(directory.StartsWith('/'));
DependencyInjection\RazorPagesRazorViewEngineOptionsSetup.cs (2)
65if (path1.EndsWith('/') || path2.StartsWith('/')) 69else if (path1.EndsWith('/') && path2.StartsWith('/'))
Microsoft.AspNetCore.Mvc.TagHelpers (2)
ResourceCollectionUtilities.cs (2)
18var value = url.StartsWith('/') ? url[1..] : url; 28resolvedUrl = url.StartsWith('/') ? $"/{src}" : src;
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
NameAndIdProvider.cs (1)
161if (expression.StartsWith('['))
TemplateInfo.cs (1)
100if (partialFieldName.StartsWith('['))
Microsoft.AspNetCore.Rewrite (1)
ApacheModRewrite\FileParser.cs (1)
22if (line.StartsWith('#'))
Microsoft.AspNetCore.Routing (3)
Patterns\RoutePatternParser.cs (3)
217if (decoded.StartsWith('*') && decoded.EndsWith('?')) 463else if (routePattern.StartsWith('/')) 467else if (routePattern.StartsWith('~'))
Microsoft.AspNetCore.Routing.Abstractions (1)
VirtualPathData.cs (1)
86if (!path.StartsWith('/'))
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Servers\Kestrel\shared\KnownHeaders.cs (1)
501if (identifier.StartsWith(':'))
Microsoft.AspNetCore.SpaServices.Extensions (1)
Proxying\ConditionalProxyMiddleware.cs (1)
30if (!pathPrefix.StartsWith('/'))
Microsoft.Extensions.ServiceDiscovery (1)
PassThrough\PassThroughServiceEndpointProviderFactory.cs (1)
40if (uriHost.StartsWith('_') && segmentSeparatorIndex > 1 && uriHost[^1] != '.')
Microsoft.Extensions.ServiceDiscovery.Abstractions (1)
ServiceEndpointQuery.cs (1)
60if (uriHost.StartsWith('_') && segmentSeparatorIndex > 1 && uriHost[^1] != '.')
PresentationFramework (3)
Microsoft\Win32\FileDialog.cs (3)
272if (value.StartsWith('.')) // Allow calling code to provide extensions like ".ext" - 570Invariant.Assert(!extension.StartsWith('.'), "FileDialog.GetFilterExtensions should not return things starting with '.'"); 576Invariant.Assert(currentExtension.Length == 0 || currentExtension.StartsWith('.'),
System.Data.Common (2)
System\Data\DataTable.cs (1)
3731if (current.StartsWith('['))
System\Data\XMLSchema.cs (1)
1177if (field.StartsWith('@'))
System.Net.Http (5)
System\Net\Http\Headers\CacheControlHeaderValue.cs (1)
501if ((valueString.Length < 3) || !valueString.StartsWith('\"') || !valueString.EndsWith('\"'))
System\Net\Http\Headers\NameValueHeaderValue.cs (2)
361if (value.StartsWith(' ') || value.StartsWith('\t') || value.EndsWith(' ') || value.EndsWith('\t'))
System\Net\Http\HttpContent.cs (1)
132charset.StartsWith('\"') &&
System\Net\Http\MultipartContent.cs (1)
52if (!quotedBoundary.StartsWith('\"'))
System.Net.HttpListener (2)
src\libraries\Common\src\System\Net\CookieParser.cs (1)
855return (value.Length >= 2 && value.StartsWith('\"') && value.EndsWith('\"'))
System\Net\HttpListenerRequest.cs (1)
535int i = s.StartsWith('?') ? 1 : 0;
System.Net.Mail (5)
System\Net\Mail\Attachment.cs (1)
207if (cid.StartsWith('<') && cid.EndsWith('>'))
System\Net\Mail\MailAddress.cs (1)
144if (displayName.Length >= 2 && displayName.StartsWith('\"') && displayName.EndsWith('\"'))
System\Net\Mime\SmtpDateTime.cs (3)
177Debug.Assert(offset.StartsWith('-') || offset.StartsWith('+'), "offset initial character was not a + or -"); 184positive = offset.StartsWith('+');
System.Net.Primitives (10)
src\libraries\Common\src\System\Net\CookieParser.cs (1)
855return (value.Length >= 2 && value.StartsWith('\"') && value.EndsWith('\"'))
System\Net\Cookie.cs (9)
241|| value.StartsWith('$') 242|| value.StartsWith(' ') 378m_name.StartsWith('$') || 379m_name.StartsWith(' ') || 388(!(m_value.Length > 2 && m_value.StartsWith('\"') && m_value.EndsWith('\"')) && m_value.AsSpan().ContainsAny(';', ','))) 394if (Comment != null && !(Comment.Length > 2 && Comment.StartsWith('\"') && Comment.EndsWith('\"')) 401if (Path != null && !(Path.Length > 2 && Path.StartsWith('\"') && Path.EndsWith('\"')) 440if (!path.StartsWith('/') || (lastSlash = path.LastIndexOf('/')) == 0) 514if (!value.StartsWith('\"') || !value.EndsWith('\"'))
System.Net.Requests (1)
System\Net\FtpControlStream.cs (1)
631if (request.RenameTo is not null && request.RenameTo.StartsWith('/'))
System.Private.CoreLib (9)
src\libraries\System.Private.CoreLib\src\System\AppContextConfigHelper.cs (4)
62if (str.StartsWith('0')) 102if (str.StartsWith('0')) 179else if (str.StartsWith('0')) 212if (str.StartsWith('0'))
src\libraries\System.Private.CoreLib\src\System\Environment.GetFolderPathCore.Unix.cs (3)
128if (data is null || !data.StartsWith('/')) 158if (config is null || !config.StartsWith('/')) 172if (envPath is not null && envPath.StartsWith('/'))
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.Nls.cs (1)
293if (win32Str.StartsWith('0'))
src\libraries\System.Private.CoreLib\src\System\IO\Path.cs (1)
73return extension.StartsWith('.') ?
System.Private.Uri (2)
System\Uri.cs (1)
1326if (name.StartsWith('[') && name.EndsWith(']'))
System\UriBuilder.cs (1)
371if (!path.StartsWith('/') && host.Length != 0)
System.Private.Xml (6)
System\Xml\Core\XmlWellFormedWriter.cs (1)
1729if (prefix.StartsWith('x'))
System\Xml\Dom\XmlEntityReference.cs (1)
39if (name.StartsWith('#'))
System\Xml\Serialization\XmlSerializationReader.cs (1)
1427if (!href.StartsWith('#')) throw new InvalidOperationException(SR.Format(SR.XmlMissingHref, href));
System\Xml\ValidateNames.cs (1)
309if (s.StartsWith('*'))
System\Xml\XmlConvert.cs (2)
409if (token.StartsWith(' ') || 426if (token.StartsWith(' ') ||
System.Web.HttpUtility (1)
System\Web\HttpUtility.cs (1)
90int namePos = query.StartsWith('?') ? 1 : 0;
System.Windows.Forms (4)
System\Resources\ResxFileRef.Converter.cs (1)
51if (stringValue.StartsWith('"'))
System\Windows\Forms\DataBinding\BindingSource.cs (1)
995if (current.StartsWith('['))
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (2)
126if (defaultExt.StartsWith('.')) 632Debug.Assert(!extensions[j].StartsWith('.'),