/
ITermGroupCollection.cs
117 lines (100 loc) · 5.22 KB
/
ITermGroupCollection.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
using PnP.Core.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
namespace PnP.Core.Model.SharePoint
{
/// <summary>
/// Collection of term groups
/// </summary>
[ConcreteType(typeof(TermGroupCollection))]
public interface ITermGroupCollection : IQueryable<ITermGroup>, IAsyncEnumerable<ITermGroup>, IDataModelCollection<ITermGroup>, IDataModelCollectionDeleteByStringId, ISupportModules<ITermGroupCollection>
{
#region Add methods
/// <summary>
/// Adds a new term group
/// </summary>
/// <param name="name">Display name of the group</param>
/// <param name="description">Optional description of the group</param>
/// <param name="scope">Optional scope of the group</param>
/// <returns>Newly added group</returns>
public Task<ITermGroup> AddAsync(string name, string description = null, TermGroupScope scope = TermGroupScope.Global);
/// <summary>
/// Adds a new term group
/// </summary>
/// <param name="name">Display name of the group</param>
/// <param name="description">Optional description of the group</param>
/// <param name="scope">Optional scope of the group</param>
/// <returns>Newly added group</returns>
public ITermGroup Add(string name, string description = null, TermGroupScope scope = TermGroupScope.Global);
/// <summary>
/// Adds a new term group
/// </summary>
/// <param name="batch">Batch to use</param>
/// <param name="name">Display name of the group</param>
/// <param name="description">Optional description of the group</param>
/// <param name="scope">Optional scope of the group</param>
/// <returns>Newly added group</returns>
public Task<ITermGroup> AddBatchAsync(Batch batch, string name, string description = null, TermGroupScope scope = TermGroupScope.Global);
/// <summary>
/// Adds a new term group
/// </summary>
/// <param name="batch">Batch to use</param>
/// <param name="name">Display name of the group</param>
/// <param name="description">Optional description of the group</param>
/// <param name="scope">Optional scope of the group</param>
/// <returns>Newly added group</returns>
public ITermGroup AddBatch(Batch batch, string name, string description = null, TermGroupScope scope = TermGroupScope.Global);
/// <summary>
/// Adds a new term group
/// </summary>
/// <param name="name">Display name of the group</param>
/// <param name="description">Optional description of the group</param>
/// <param name="scope">Optional scope of the group</param>
/// <returns>Newly added group</returns>
public Task<ITermGroup> AddBatchAsync(string name, string description = null, TermGroupScope scope = TermGroupScope.Global);
/// <summary>
/// Adds a new term group
/// </summary>
/// <param name="name">Display name of the group</param>
/// <param name="description">Optional description of the group</param>
/// <param name="scope">Optional scope of the group</param>
/// <returns>Newly added group</returns>
public ITermGroup AddBatch(string name, string description = null, TermGroupScope scope = TermGroupScope.Global);
#endregion
#region GetById methods
/// <summary>
/// Method to select a term group by id
/// </summary>
/// <param name="id">The id to search for</param>
/// <param name="selectors">The expressions declaring the fields to select</param>
/// <returns>The resulting term group instance, if any</returns>
public ITermGroup GetById(string id, params Expression<Func<ITermGroup, object>>[] selectors);
/// <summary>
/// Method to select a term group by id
/// </summary>
/// <param name="id">The id to search for</param>
/// <param name="selectors">The expressions declaring the fields to select</param>
/// <returns>The resulting term group instance, if any</returns>
public Task<ITermGroup> GetByIdAsync(string id, params Expression<Func<ITermGroup, object>>[] selectors);
#endregion
#region GetByName methods
/// <summary>
/// Method to select a term group by name
/// </summary>
/// <param name="name">The name to search for</param>
/// <param name="selectors">The expressions declaring the fields to select</param>
/// <returns>The resulting term group instance, if any</returns>
public ITermGroup GetByName(string name, params Expression<Func<ITermGroup, object>>[] selectors);
/// <summary>
/// Method to select a term group by name
/// </summary>
/// <param name="name">The name to search for</param>
/// <param name="selectors">The expressions declaring the fields to select</param>
/// <returns>The resulting term group instance, if any</returns>
public Task<ITermGroup> GetByNameAsync(string name, params Expression<Func<ITermGroup, object>>[] selectors);
#endregion
}
}