@@ -102,8 +102,8 @@ private bool ShouldIncludeTopLevelLink(LinkTypes linkType, ResourceContext resou
102
102
private string GetLinkForTopLevelSelf ( )
103
103
{
104
104
return _options . UseRelativeLinks
105
- ? _httpContextAccessor . HttpContext . Request . GetEncodedPathAndQuery ( )
106
- : _httpContextAccessor . HttpContext . Request . GetEncodedUrl ( ) ;
105
+ ? _httpContextAccessor . HttpContext ! . Request . GetEncodedPathAndQuery ( )
106
+ : _httpContextAccessor . HttpContext ! . Request . GetEncodedUrl ( ) ;
107
107
}
108
108
109
109
private void SetPaginationInTopLevelLinks ( ResourceContext requestContext , TopLevelLinks links )
@@ -133,7 +133,7 @@ private void SetPaginationInTopLevelLinks(ResourceContext requestContext, TopLev
133
133
134
134
private string CalculatePageSizeValue ( PageSize topPageSize , ResourceContext requestContext )
135
135
{
136
- string pageSizeParameterValue = _httpContextAccessor . HttpContext . Request . Query [ PageSizeParameterName ] ;
136
+ string pageSizeParameterValue = _httpContextAccessor . HttpContext ! . Request . Query [ PageSizeParameterName ] ;
137
137
138
138
PageSize newTopPageSize = Equals ( topPageSize , _options . DefaultPageSize ) ? null : topPageSize ;
139
139
return ChangeTopPageSize ( pageSizeParameterValue , newTopPageSize , requestContext ) ;
@@ -188,7 +188,7 @@ private string GetLinkForPagination(int pageOffset, string pageSizeValue)
188
188
{
189
189
string queryStringValue = GetQueryStringInPaginationLink ( pageOffset , pageSizeValue ) ;
190
190
191
- var builder = new UriBuilder ( _httpContextAccessor . HttpContext . Request . GetEncodedUrl ( ) )
191
+ var builder = new UriBuilder ( _httpContextAccessor . HttpContext ! . Request . GetEncodedUrl ( ) )
192
192
{
193
193
Query = queryStringValue
194
194
} ;
@@ -200,7 +200,7 @@ private string GetLinkForPagination(int pageOffset, string pageSizeValue)
200
200
private string GetQueryStringInPaginationLink ( int pageOffset , string pageSizeValue )
201
201
{
202
202
IDictionary < string , string > parameters =
203
- _httpContextAccessor . HttpContext . Request . Query . ToDictionary ( pair => pair . Key , pair => pair . Value . ToString ( ) ) ;
203
+ _httpContextAccessor . HttpContext ! . Request . Query . ToDictionary ( pair => pair . Key , pair => pair . Value . ToString ( ) ) ;
204
204
205
205
if ( pageSizeValue == null )
206
206
{
@@ -311,7 +311,7 @@ private IDictionary<string, object> GetRouteValues(string primaryId, string rela
311
311
// By default, we copy all route parameters from the *current* endpoint, which helps in case all endpoints have the same
312
312
// set of non-standard parameters. There is no way we can know which non-standard parameters a *different* endpoint needs,
313
313
// so users must override RenderLinkForAction to supply them, if applicable.
314
- RouteValueDictionary routeValues = _httpContextAccessor . HttpContext . Request . RouteValues ;
314
+ RouteValueDictionary routeValues = _httpContextAccessor . HttpContext ! . Request . RouteValues ;
315
315
316
316
routeValues [ "id" ] = primaryId ;
317
317
routeValues [ "relationshipName" ] = relationshipName ;
0 commit comments