/
ITermRelationCollection.cs
71 lines (63 loc) · 3.94 KB
/
ITermRelationCollection.cs
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using PnP.Core.Services;
using System.Linq;
using System.Threading.Tasks;
namespace PnP.Core.Model.SharePoint
{
/// <summary>
/// Collection of terms
/// </summary>
[ConcreteType(typeof(TermRelationCollection))]
public interface ITermRelationCollection : IQueryable<ITermRelation>, IDataModelCollection<ITermRelation>, ISupportModules<ITermRelationCollection>
{
/// <summary>
/// Adds a new term relation
/// </summary>
/// <param name="relationship">Type of relation to be created. Possible values are: pin, reuse.</param>
/// <param name="targetSet">The set where the relationship needs to be created.</param>
/// <param name="fromTerm">The term with which the relationship needs to be created.</param>
/// <returns>Newly added term relation ship</returns>
public Task<ITermRelation> AddAsync(TermRelationType relationship, ITermSet targetSet, ITerm fromTerm = null);
/// <summary>
/// Adds a new term relation
/// </summary>
/// <param name="relationship">Type of relation to be created. Possible values are: pin, reuse.</param>
/// <param name="targetSet">The set where the relationship needs to be created.</param>
/// <param name="fromTerm">The term with which the relationship needs to be created.</param>
/// <returns>Newly added term relation ship</returns>
public ITermRelation Add(TermRelationType relationship, ITermSet targetSet, ITerm fromTerm = null);
/// <summary>
/// Adds a new term relation via a batch request
/// </summary>
/// <param name="batch">Batch to use</param>
/// <param name="relationship">Type of relation to be created. Possible values are: pin, reuse.</param>
/// <param name="targetSet">The set where the relationship needs to be created.</param>
/// <param name="fromTerm">The term with which the relationship needs to be created.</param>
/// <returns>Newly added term relation ship</returns>
public Task<ITermRelation> AddBatchAsync(Batch batch, TermRelationType relationship, ITermSet targetSet, ITerm fromTerm = null);
/// <summary>
/// Adds a new term relation via a batch request
/// </summary>
/// <param name="batch">Batch to use</param>
/// <param name="relationship">Type of relation to be created. Possible values are: pin, reuse.</param>
/// <param name="targetSet">The set where the relationship needs to be created.</param>
/// <param name="fromTerm">The term with which the relationship needs to be created.</param>
/// <returns>Newly added term relation ship</returns>
public ITermRelation AddBatch(Batch batch, TermRelationType relationship, ITermSet targetSet, ITerm fromTerm = null);
/// <summary>
/// Adds a new term relation via a batch request
/// </summary>
/// <param name="relationship">Type of relation to be created. Possible values are: pin, reuse.</param>
/// <param name="targetSet">The set where the relationship needs to be created.</param>
/// <param name="fromTerm">The term with which the relationship needs to be created.</param>
/// <returns>Newly added term relation ship</returns>
public Task<ITermRelation> AddBatchAsync(TermRelationType relationship, ITermSet targetSet, ITerm fromTerm = null);
/// <summary>
/// Adds a new term relation via a batch request
/// </summary>
/// <param name="relationship">Type of relation to be created. Possible values are: pin, reuse.</param>
/// <param name="targetSet">The set where the relationship needs to be created.</param>
/// <param name="fromTerm">The term with which the relationship needs to be created.</param>
/// <returns>Newly added term relation ship</returns>
public ITermRelation AddBatch(TermRelationType relationship, ITermSet targetSet, ITerm fromTerm = null);
}
}