47 references to StringSegment
Microsoft.AspNetCore.Components (3)
src\Http\Routing\src\PathTokenizer.cs (3)
86return new StringSegment(_path, currentSegmentStart, delimiterIndex - currentSegmentStart); 100return new StringSegment(_path, currentSegmentStart, _path.Length - currentSegmentStart); 138return new StringSegment(_path, _index, _length);
Microsoft.AspNetCore.Http.Abstractions (2)
Internal\HeaderSegmentCollection.cs (2)
117new StringSegment(_header, _leadingStart, _leadingEnd - _leadingStart), 118new StringSegment(_header, _valueStart, _valueEnd - _valueStart));
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\ModelStateDictionary.cs (1)
617return new StringSegment(key, keyStart, index - keyStart);
Microsoft.AspNetCore.Mvc.Core (9)
Formatters\MediaType.cs (4)
294new StringSegment(mediaType, start, parser.CurrentOffset - start), 392name = new StringSegment(input, current, nameLength); 421value = new StringSegment(input, current + 1, valueLength - 2); 425value = new StringSegment(input, current, valueLength);
src\Shared\MediaType\ReadOnlyMediaTypeHeaderValue.cs (5)
107type = new StringSegment(input, current, typeLength); 136subType = new StringSegment(input, current, subtypeLength); 544name = new StringSegment(input, current, nameLength); 573value = new StringSegment(input, current + 1, valueLength - 2); 577value = new StringSegment(input, current, valueLength);
Microsoft.AspNetCore.Mvc.TagHelpers (3)
GlobbingUrlBuilder.cs (3)
293value = new StringSegment(value.Buffer, value.Offset + 2, value.Length - 2); 299value = new StringSegment(value.Buffer, value.Offset + 1, value.Length - 1); 335return new StringSegment(value.Buffer, offset, trimmedEnd - offset + 1);
Microsoft.AspNetCore.Routing (8)
PathTokenizer.cs (3)
86return new StringSegment(_path, currentSegmentStart, delimiterIndex - currentSegmentStart); 100return new StringSegment(_path, currentSegmentStart, _path.Length - currentSegmentStart); 138return new StringSegment(_path, _index, _length);
src\Shared\MediaType\ReadOnlyMediaTypeHeaderValue.cs (5)
107type = new StringSegment(input, current, typeLength); 136subType = new StringSegment(input, current, subtypeLength); 544name = new StringSegment(input, current, nameLength); 573value = new StringSegment(input, current + 1, valueLength - 2); 577value = new StringSegment(input, current, valueLength);
Microsoft.AspNetCore.Routing.Tests (18)
PathTokenizerTest.cs (18)
19{ "//", new StringSegment[] { new StringSegment("//", 1, 0) } }, 24new StringSegment("///", 1, 0), 25new StringSegment("///", 2, 0), 32new StringSegment("////", 1, 0), 33new StringSegment("////", 2, 0), 34new StringSegment("////", 3, 0), 37{ "/zero", new StringSegment[] { new StringSegment("/zero", 1, 4) } }, 38{ "/zero/", new StringSegment[] { new StringSegment("/zero/", 1, 4) } }, 43new StringSegment("/zero/one", 1, 4), 44new StringSegment("/zero/one", 6, 3), 51new StringSegment("/zero/one/", 1, 4), 52new StringSegment("/zero/one/", 6, 3), 59new StringSegment("/zero/one/two", 1, 4), 60new StringSegment("/zero/one/two", 6, 3), 61new StringSegment("/zero/one/two", 10, 3), 68new StringSegment("/zero/one/two/", 1, 4), 69new StringSegment("/zero/one/two/", 6, 3), 70new StringSegment("/zero/one/two/", 10, 3),
Microsoft.Extensions.FileProviders.Embedded (1)
Manifest\EmbeddedFilesManifest.cs (1)
73var trimmed = new StringSegment(path, start, end - start);
Microsoft.Extensions.Primitives (1)
StringSegment.cs (1)
438return new StringSegment(Buffer, Offset + offset, length);
Microsoft.Net.Http.Headers (1)
HeaderUtilities.cs (1)
346if (TryParseNonNegativeInt64(new StringSegment(headerValue, startIndex, HttpRuleParser.GetNumberLength(headerValue, startIndex, false)), out result))