Skip to content

Commit 25345f8

Browse files
author
Chris Santero
committed
make new related methods protected
1 parent dafa96d commit 25345f8

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

JSONAPI.EntityFramework/Http/EntityFrameworkPayloadMaterializer.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ protected virtual async Task<object> MaterializeAsync(IResourceObject resourceOb
133133
return await materializer.MaterializeResourceObject(resourceObject, cancellationToken);
134134
}
135135

136-
// ReSharper disable once UnusedMember.Local
137-
private async Task<IResourceCollectionPayload> GetRelatedToMany<TRelated>(string id,
136+
/// <summary>
137+
/// Generic method for getting the related resources for a to-many relationship
138+
/// </summary>
139+
protected async Task<IResourceCollectionPayload> GetRelatedToMany<TRelated>(string id,
138140
ResourceTypeRelationship relationship, HttpRequestMessage request, CancellationToken cancellationToken)
139141
{
140142
var param = Expression.Parameter(typeof(T));
@@ -147,8 +149,10 @@ private async Task<IResourceCollectionPayload> GetRelatedToMany<TRelated>(string
147149
return await _queryableResourceCollectionPayloadBuilder.BuildPayload(relatedResourceQuery, request, cancellationToken);
148150
}
149151

150-
// ReSharper disable once UnusedMember.Local
151-
private async Task<ISingleResourcePayload> GetRelatedToOne<TRelated>(string id,
152+
/// <summary>
153+
/// Generic method for getting the related resources for a to-one relationship
154+
/// </summary>
155+
protected async Task<ISingleResourcePayload> GetRelatedToOne<TRelated>(string id,
152156
ResourceTypeRelationship relationship, HttpRequestMessage request, CancellationToken cancellationToken)
153157
{
154158
var param = Expression.Parameter(typeof(T));

0 commit comments

Comments
 (0)