135 references to StringSegment
Microsoft.AspNetCore.HostFiltering (1)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Mvc.Abstractions (2)
Microsoft.AspNetCore.Mvc.Core (16)
Microsoft.AspNetCore.Mvc.Core.Test (75)
Formatters\AcceptHeaderParserTest.cs (11)
17new MediaTypeSegmentWithQuality(new StringSegment("application/json"),1.0)
34new MediaTypeSegmentWithQuality(new StringSegment("application/json"),1.0),
35new MediaTypeSegmentWithQuality(new StringSegment("application/xml;q=0.8"),0.8)
56new MediaTypeSegmentWithQuality(new StringSegment("application/json"),1.0),
57new MediaTypeSegmentWithQuality(new StringSegment("application/xml"),1.0),
95var expectedMediaTypes = expected.Select(e => new MediaTypeSegmentWithQuality(new StringSegment(e), 1.0)).ToList();
110new MediaTypeSegmentWithQuality(new StringSegment("application/json"), 1.0),
111new MediaTypeSegmentWithQuality(new StringSegment("application/xml;q=0.8"), 0.8)
160new MediaTypeSegmentWithQuality(new StringSegment("*/*Content-Type"), 1.0),
161new MediaTypeSegmentWithQuality(new StringSegment("application/json"), 1.0),
179new MediaTypeSegmentWithQuality(new StringSegment("application/json"), 1.0),
Formatters\MediaTypeTest.cs (14)
21Assert.Equal(new StringSegment("application"), result.Type);
22Assert.Equal(new StringSegment("json"), result.SubType);
52Assert.Equal(new StringSegment(expectedSubTypeWithoutSuffix), result.SubTypeWithoutSuffix);
53Assert.Equal(new StringSegment(expectedSubtypeSuffix), result.SubTypeSuffix);
85Assert.Equal(new StringSegment("application"), result.Type);
86Assert.Equal(new StringSegment("json+bson"), result.SubType);
87Assert.Equal(new StringSegment("json"), result.SubTypeWithoutSuffix);
88Assert.Equal(new StringSegment("bson"), result.SubTypeSuffix);
89Assert.Equal(new StringSegment("pretty"), result.GetParameter("format"));
90Assert.Equal(new StringSegment("0.8"), result.GetParameter("q"));
91Assert.Equal(new StringSegment("utf-8"), result.GetParameter("charset"));
101Assert.Equal(new StringSegment("ediaType"), result.Type);
157var expectedParameter = new StringSegment("utf-8");
186var expectedParameter = new StringSegment("utf-8");
Microsoft.AspNetCore.Mvc.Core.TestCommon (4)
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (8)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (8)
Microsoft.AspNetCore.Owin (1)
Microsoft.AspNetCore.Routing (4)
Microsoft.AspNetCore.Server.HttpSys (2)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.Shared.Tests (2)
Microsoft.AspNetCore.WebUtilities (1)
Microsoft.Extensions.Primitives (1)
Microsoft.Net.Http.Headers (1)
Microsoft.Net.Http.Headers.Tests (6)