Skip to content

Commit 68dfca7

Browse files
author
Chris Santero
committed
remove unused delegates
1 parent 0d2091b commit 68dfca7

1 file changed

Lines changed: 0 additions & 40 deletions

File tree

JSONAPI/Http/MappedDocumentMaterializer.cs

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,6 @@ namespace JSONAPI.Http
2020
/// <typeparam name="TDto"></typeparam>
2121
public abstract class MappedDocumentMaterializer<TEntity, TDto> : IDocumentMaterializer where TDto : class
2222
{
23-
/// <summary>
24-
/// Materializes a document for the resources found on the other side of the to-many relationship belonging to the resource.
25-
/// </summary>
26-
protected delegate Task<IResourceCollectionDocument> MaterializeDocumentForToManyRelationship(
27-
TDto resource, HttpRequestMessage request, CancellationToken cancellationToken);
28-
29-
/// <summary>
30-
/// Materializes a document for the resources found on the other side of the to-one relationship belonging to the resource.
31-
/// </summary>
32-
protected delegate Task<ISingleResourceDocument> MaterializeDocumentForToOneRelationship(
33-
TDto resource, HttpRequestMessage request, CancellationToken cancellationToken);
34-
3523
private readonly IQueryableResourceCollectionDocumentBuilder _queryableResourceCollectionDocumentBuilder;
3624
private readonly IBaseUrlService _baseUrlService;
3725
private readonly ISingleResourceDocumentBuilder _singleResourceDocumentBuilder;
@@ -99,34 +87,6 @@ public async Task<ISingleResourceDocument> GetRecordById(string id, HttpRequestM
9987
return _singleResourceDocumentBuilder.BuildDocument(primaryResource, baseUrl, jsonApiPaths, null);
10088
}
10189

102-
public async Task<IJsonApiDocument> GetRelated(string id, string relationshipKey, HttpRequestMessage request, CancellationToken cancellationToken)
103-
{
104-
//var registration = _resourceTypeRegistry.GetRegistrationForType(typeof(TDto));
105-
106-
//var entityQuery = GetByIdQuery(id);
107-
//var includePaths = GetIncludePathsForSingleResource() ?? new Expression<Func<TDto, object>>[] { };
108-
//var mappedQuery = GetMappedQuery(entityQuery, includePaths);
109-
//var primaryResource = await _queryableEnumerationTransformer.FirstOrDefault(mappedQuery, cancellationToken);
110-
//if (primaryResource == null)
111-
// throw JsonApiException.CreateForNotFound(
112-
// string.Format("No record exists with type `{0}` and ID `{1}`.", ResourceTypeName, id));
113-
114-
//var relationship = (ResourceTypeRelationship)registration.GetFieldByName(relationshipKey);
115-
//if (relationship == null)
116-
// throw JsonApiException.CreateForNotFound(string.Format("No relationship `{0}` exists for the resource with type `{1}` and id `{2}`.",
117-
// relationshipKey, registration.ResourceTypeName, id));
118-
119-
//var toManyRelationship = relationship as ToManyResourceTypeRelationship;
120-
//if (toManyRelationship != null)
121-
// return await toManyRelationship.GetRelatedResourceCollection(id, request, cancellationToken);
122-
123-
//var toOneRelationship = relationship as ToOneResourceTypeRelationship;
124-
//if (toOneRelationship != null)
125-
// return await toOneRelationship.GetRelatedResource(id, request, cancellationToken);
126-
127-
throw new NotSupportedException();
128-
}
129-
13090
public Task<ISingleResourceDocument> CreateRecord(ISingleResourceDocument requestDocument, HttpRequestMessage request,
13191
CancellationToken cancellationToken)
13292
{

0 commit comments

Comments
 (0)