-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathILinkConventions.cs
More file actions
30 lines (28 loc) · 1.61 KB
/
ILinkConventions.cs
File metadata and controls
30 lines (28 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using JSONAPI.Core;
namespace JSONAPI.Documents
{
/// <summary>
/// Service to provide formatting of links
/// </summary>
public interface ILinkConventions
{
/// <summary>
/// Builds a relationship link for the given model property
/// </summary>
/// <param name="relationshipOwner">The resource that this relationship belongs to.</param>
/// <param name="resourceTypeRegistry">The model manage to use to lookup information about the relationship owner's type</param>
/// <param name="property">The property to get the link for</param>
/// <param name="baseUrl">The portion of the URL that the link will be appended to</param>
/// <returns></returns>
ILink GetRelationshipLink<TResource>(TResource relationshipOwner, IResourceTypeRegistry resourceTypeRegistry, ResourceTypeRelationship property, string baseUrl);
/// <summary>
/// Builds a related resource link for the given model property
/// </summary>
/// <param name="relationshipOwner">The resource that this relationship belongs to.</param>
/// <param name="resourceTypeRegistry">The model manage to use to lookup information about the relationship owner's type</param>
/// <param name="property">The property to get the link for</param>
/// <param name="baseUrl">The portion of the URL that the link will be appended to</param>
/// <returns></returns>
ILink GetRelatedResourceLink<TResource>(TResource relationshipOwner, IResourceTypeRegistry resourceTypeRegistry, ResourceTypeRelationship property, string baseUrl);
}
}