-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
ClassifyDocumentResultCollection.cs
95 lines (84 loc) · 3.27 KB
/
ClassifyDocumentResultCollection.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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
namespace Azure.AI.TextAnalytics
{
/// <summary>
/// Collection of <see cref="ClassifyDocumentResult"/> objects corresponding
/// to a batch of documents, and information about the batch operation.
/// </summary>
[DebuggerTypeProxy(typeof(ClassifyDocumentResultCollectionDebugView))]
public class ClassifyDocumentResultCollection : ReadOnlyCollection<ClassifyDocumentResult>
{
internal ClassifyDocumentResultCollection(IList<ClassifyDocumentResult> list, TextDocumentBatchStatistics statistics,
string projectName, string deploymentName) : base(list)
{
Statistics = statistics;
ProjectName = projectName;
DeploymentName = deploymentName;
}
/// <summary>
/// Gets statistics about the documents and how it was processed
/// by the service. This property will have a value when IncludeStatistics
/// is set to true in the client call.
/// </summary>
public TextDocumentBatchStatistics Statistics { get; }
/// <summary>
/// Gets the value of the property corresponding to the name of the
/// target project that produced these results. This should be the same
/// as the project name set when creating the <see cref="MultiLabelClassifyAction"/>
/// object used to start the operation.
/// </summary>
public string ProjectName { get; }
/// <summary>
/// Gets the value of the property corresponding to the deployment name
/// of the project that produced these results. This should be the same
/// as the deployment name set when creating the <see cref="MultiLabelClassifyAction"/>
/// object used to start the operation.
/// </summary>
public string DeploymentName { get; }
/// <summary>
/// Debugger Proxy class for <see cref="ClassifyDocumentResultCollection"/>.
/// </summary>
internal class ClassifyDocumentResultCollectionDebugView
{
private ClassifyDocumentResultCollection BaseCollection { get; }
public ClassifyDocumentResultCollectionDebugView(ClassifyDocumentResultCollection collection)
{
BaseCollection = collection;
}
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
public List<ClassifyDocumentResult> Items
{
get
{
return BaseCollection.ToList();
}
}
public TextDocumentBatchStatistics Statistics
{
get
{
return BaseCollection.Statistics;
}
}
public string ProjectName
{
get
{
return BaseCollection.ProjectName;
}
}
public string DeploymentName
{
get
{
return BaseCollection.DeploymentName;
}
}
}
}
}