-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIAssetModelBrowse.cs
61 lines (56 loc) · 2.26 KB
/
IAssetModelBrowse.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
using System.Collections.Generic;
using System.Threading;
namespace DataCore.Adapter.AssetModel {
/// <summary>
/// Feature for browsing an adapter's asset model hierarchy.
/// </summary>
[AdapterFeature(
WellKnownFeatures.AssetModel.AssetModelBrowse,
ResourceType = typeof(AbstractionsResources),
Name = nameof(AbstractionsResources.DisplayName_AssetModelBrowse),
Description = nameof(AbstractionsResources.Description_AssetModelBrowse)
)]
public interface IAssetModelBrowse : IAdapterFeature {
/// <summary>
/// Browses nodes in the adapter's asset model.
/// </summary>
/// <param name="context">
/// The <see cref="IAdapterCallContext"/> for the caller.
/// </param>
/// <param name="request">
/// The asset model query. If a <see cref="BrowseAssetModelNodesRequest.ParentId"/>
/// value is specified, this node should not be returned in the result.
/// </param>
/// <param name="cancellationToken">
/// The cancellation token for the operation.
/// </param>
/// <returns>
/// An <see cref="IAsyncEnumerable{T}"/> that will return the matching asset model nodes.
/// </returns>
IAsyncEnumerable<AssetModelNode> BrowseAssetModelNodes(
IAdapterCallContext context,
BrowseAssetModelNodesRequest request,
CancellationToken cancellationToken
);
/// <summary>
/// Gets specific nodes from the adapter's asset model.
/// </summary>
/// <param name="context">
/// The <see cref="IAdapterCallContext"/> for the caller.
/// </param>
/// <param name="request">
/// The asset model query.
/// </param>
/// <param name="cancellationToken">
/// The cancellation token for the operation.
/// </param>
/// <returns>
/// An <see cref="IAsyncEnumerable{T}"/> that will return the matching asset model nodes.
/// </returns>
IAsyncEnumerable<AssetModelNode> GetAssetModelNodes(
IAdapterCallContext context,
GetAssetModelNodesRequest request,
CancellationToken cancellationToken
);
}
}