27 references to StringSegment
Microsoft.AspNetCore.HostFiltering (1)
HostFilteringMiddleware.cs (1)
103if (allowedHosts is not null && HostString.MatchesAny(new StringSegment(host), allowedHosts))
Microsoft.AspNetCore.Http (1)
HeaderDictionary.cs (1)
127HeaderUtilities.TryParseNonNegativeInt64(new StringSegment(rawValue[0]).Trim(), out value))
Microsoft.AspNetCore.Mvc.Abstractions (2)
ModelBinding\ModelStateDictionary.cs (2)
63var emptySegment = new StringSegment(buffer: string.Empty); 926=> GetNode(new StringSegment(propertyName));
Microsoft.AspNetCore.Mvc.Core (16)
Formatters\MediaType.cs (5)
18private static readonly StringSegment QualityParameter = new StringSegment("q"); 194return ReplaceEncoding(new StringSegment(mediaType), encoding); 239return GetEncoding(new StringSegment(mediaType)); 359var asterisk = new StringSegment("*"); 454return HasName(new StringSegment(name));
Formatters\OutputFormatter.cs (2)
115context.ContentType = new StringSegment(SupportedMediaTypes[0]); 146context.ContentType = new StringSegment(SupportedMediaTypes[i]);
Formatters\TextOutputFormatter.cs (2)
113selectedMediaType = new StringSegment(SupportedMediaTypes[0]); 126selectedMediaType = new StringSegment(mediaTypeWithCharset);
Infrastructure\DefaultOutputFormatterSelector.cs (2)
222formatterContext.ContentType = new StringSegment(contentType); 252formatterContext.ContentType = new StringSegment(possibleOutputContentTypes[j]);
Routing\ViewEnginePath.cs (1)
49var pathSegment = new StringSegment(path);
src\aspnetcore\src\Shared\MediaType\ReadOnlyMediaTypeHeaderValue.cs (4)
276return GetParameter(new StringSegment(parameterName)); 333return GetEncoding(new StringSegment(mediaType)); 511var asterisk = new StringSegment("*"); 606return HasName(new StringSegment(name));
Microsoft.AspNetCore.Routing (4)
src\aspnetcore\src\Shared\MediaType\ReadOnlyMediaTypeHeaderValue.cs (4)
276return GetParameter(new StringSegment(parameterName)); 333return GetEncoding(new StringSegment(mediaType)); 511var asterisk = new StringSegment("*"); 606return HasName(new StringSegment(name));
Microsoft.AspNetCore.WebUtilities (1)
MultipartReader.cs (1)
58boundary = HeaderUtilities.RemoveQuotes(new StringSegment(boundary)).ToString();
Microsoft.Extensions.Primitives (1)
StringSegment.cs (1)
307public static implicit operator StringSegment(string? value) => new StringSegment(value);
Microsoft.Net.Http.Headers (1)
StringWithQualityHeaderValueComparer.cs (1)
17private static readonly StringSegment Any = new("*");