-
Notifications
You must be signed in to change notification settings - Fork 264
/
Query.xml
244 lines (241 loc) · 15.7 KB
/
Query.xml
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<Type Name="Query" FullName="Microsoft.Azure.Devices.Provisioning.Service.Query">
<TypeSignature Language="C#" Value="public class Query : IDisposable" FrameworkAlternate="azure-dotnet" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Query extends System.Object implements class System.IDisposable" FrameworkAlternate="azure-dotnet" />
<TypeSignature Language="DocId" Value="T:Microsoft.Azure.Devices.Provisioning.Service.Query" />
<TypeSignature Language="VB.NET" Value="Public Class Query
Implements IDisposable" FrameworkAlternate="azure-dotnet" />
<TypeSignature Language="F#" Value="type Query = class
 interface IDisposable" FrameworkAlternate="azure-dotnet" />
<TypeSignature Language="C#" Value="public class Query" FrameworkAlternate="azure-dotnet-preview" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Query extends System.Object" FrameworkAlternate="azure-dotnet-preview" />
<TypeSignature Language="VB.NET" Value="Public Class Query" FrameworkAlternate="azure-dotnet-preview" />
<TypeSignature Language="F#" Value="type Query = class" FrameworkAlternate="azure-dotnet-preview" />
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Devices.Provisioning.Service</AssemblyName>
<AssemblyVersion>1.16.3.0</AssemblyVersion>
<AssemblyVersion>1.17.0.0</AssemblyVersion>
<AssemblyVersion>1.17.1.0</AssemblyVersion>
<AssemblyVersion>1.17.2.0</AssemblyVersion>
<AssemblyVersion>1.18.0.0</AssemblyVersion>
<AssemblyVersion>1.18.1.0</AssemblyVersion>
<AssemblyVersion>1.18.2.0</AssemblyVersion>
<AssemblyVersion>1.19.0.0</AssemblyVersion>
<AssemblyVersion>1.19.1.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface FrameworkAlternate="azure-dotnet">
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>
The query iterator.
</summary>
<remarks>
The <see cref="T:Microsoft.Azure.Devices.Provisioning.Service.Query" /> iterator is the result of the query factory for
<list type="bullet"><item><description><see cref="M:Microsoft.Azure.Devices.Provisioning.Service.IndividualEnrollmentsClient.CreateQuery(System.String,System.Int32,System.Threading.CancellationToken)">IndividualEnrollment</see></description></item><item><description><see cref="M:Microsoft.Azure.Devices.Provisioning.Service.EnrollmentGroupsClient.CreateQuery(System.String,System.Int32,System.Threading.CancellationToken)">EnrollmentGroup</see></description></item><item><description><see cref="M:Microsoft.Azure.Devices.Provisioning.Service.DeviceRegistrationStatesClient.CreateEnrollmentGroupQuery(System.String,System.String,System.Int32,System.Threading.CancellationToken)">RegistrationStatus</see></description></item></list>
On all cases, the <see cref="T:Microsoft.Azure.Devices.Provisioning.Service.QuerySpecification" /> contains a SQL query that must follow the
Query Language for the Device Provisioning Service.
Optionally, an Integer with the page size, can determine the maximum number of the items in the
<see cref="T:Microsoft.Azure.Devices.Provisioning.Service.QueryResult" /> returned by the <see cref="M:Microsoft.Azure.Devices.Provisioning.Service.Query.NextAsync" />. It must be any positive integer, and if it
contains 0, the Device Provisioning Service will ignore it and use a standard page size.
You can use this Object as a standard iterator, just using the <c>HasNext</c> and <c>NextAsync</c> in a
<c>while</c> loop, up to the point where the <c>HasNext</c> contains false. But, keep
in mind that the <see cref="T:Microsoft.Azure.Devices.Provisioning.Service.QueryResult" /> can contain a empty list, even if the <c>HasNext</c> contained
<c>true</c>. For example, image that you have 10 IndividualEnrollment in the Device Provisioning Service
and you created new query with the <c>PageSize</c> equals 5. In the first iteration, <c>HasNext</c>
will contains <c>true</c>, and the first <c>NextAsync</c> will return a <c>QueryResult</c> with
5 items. After, your code will check the <c>HasNext</c>, which will contains true again. Now,
before you get the next page, somebody deletes all the IndividualEnrollment. What happened, when you call the
<c>NextAsync</c>, it will return a valid <c>QueryResult</c>, but the <see cref="P:Microsoft.Azure.Devices.Provisioning.Service.QueryResult.Items" />
will contain an empty list.
Besides the <c>Items</c>, the <c>QueryResult</c> contains the <see cref="P:Microsoft.Azure.Devices.Provisioning.Service.QueryResult.ContinuationToken" />.
You can also store a query context (QuerySpecification + ContinuationToken) and restart it in the future, from
the point where you stopped. Just recreating the query with the same <see cref="T:Microsoft.Azure.Devices.Provisioning.Service.QuerySpecification" /> and calling
the <see cref="M:Microsoft.Azure.Devices.Provisioning.Service.Query.NextAsync(System.String)" /> passing the stored <c>ContinuationToken</c>.
</remarks>
</Docs>
<Members>
<Member MemberName="ContinuationToken">
<MemberSignature Language="C#" Value="public string ContinuationToken { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string ContinuationToken" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Devices.Provisioning.Service.Query.ContinuationToken" />
<MemberSignature Language="VB.NET" Value="Public Property ContinuationToken As String" />
<MemberSignature Language="F#" Value="member this.ContinuationToken : string with get, set" Usage="Microsoft.Azure.Devices.Provisioning.Service.Query.ContinuationToken" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Devices.Provisioning.Service</AssemblyName>
<AssemblyVersion>1.18.1.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>
The token to retrieve the next page.
</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="public void Dispose ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Devices.Provisioning.Service.Query.Dispose" />
<MemberSignature Language="VB.NET" Value="Public Sub Dispose ()" />
<MemberSignature Language="F#" Value="abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit" Usage="query.Dispose " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.IDisposable.Dispose</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Devices.Provisioning.Service</AssemblyName>
<AssemblyVersion>1.18.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
Dispose the HTTP resources.
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="protected virtual void Dispose (bool disposing);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void Dispose(bool disposing) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Devices.Provisioning.Service.Query.Dispose(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub Dispose (disposing As Boolean)" />
<MemberSignature Language="F#" Value="abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit" Usage="query.Dispose disposing" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Devices.Provisioning.Service</AssemblyName>
<AssemblyVersion>1.18.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="disposing" Type="System.Boolean" Index="0" FrameworkAlternate="azure-dotnet" />
</Parameters>
<Docs>
<param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
<summary>
Releases the unmanaged resources used by the Component and optionally releases the managed resources.
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="HasNext">
<MemberSignature Language="C#" Value="public bool HasNext ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool HasNext() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Devices.Provisioning.Service.Query.HasNext" />
<MemberSignature Language="VB.NET" Value="Public Function HasNext () As Boolean" />
<MemberSignature Language="F#" Value="member this.HasNext : unit -> bool" Usage="query.HasNext " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Devices.Provisioning.Service</AssemblyName>
<AssemblyVersion>1.18.1.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
Getter for has next.
</summary>
<returns>To be added.</returns>
<remarks>
Contains true if the query is not finished in the Device Provisioning Service, and another
iteration with <see cref="M:Microsoft.Azure.Devices.Provisioning.Service.Query.NextAsync" /> may return more items. Call <see cref="M:Microsoft.Azure.Devices.Provisioning.Service.Query.NextAsync" /> after
a true <c>HasNext</c> will result in a <see cref="T:Microsoft.Azure.Devices.Provisioning.Service.QueryResult" /> that can or
cannot contains elements. But call <see cref="M:Microsoft.Azure.Devices.Provisioning.Service.Query.NextAsync" /> after a false <c>HasNext</c>
will result in a exception.
</remarks>
</Docs>
</Member>
<Member MemberName="NextAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.QueryResult> NextAsync ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Threading.Tasks.Task`1<class Microsoft.Azure.Devices.Provisioning.Service.QueryResult> NextAsync() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Devices.Provisioning.Service.Query.NextAsync" />
<MemberSignature Language="VB.NET" Value="Public Function NextAsync () As Task(Of QueryResult)" />
<MemberSignature Language="F#" Value="member this.NextAsync : unit -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.QueryResult>" Usage="query.NextAsync " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Devices.Provisioning.Service</AssemblyName>
<AssemblyVersion>1.18.1.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.QueryResult></ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
Return the next page of result for the query.
</summary>
<returns>The <see cref="T:Microsoft.Azure.Devices.Provisioning.Service.QueryResult" /> with the next page of items for the query.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.IndexOutOfRangeException">If the query does no have more pages to return.</exception>
</Docs>
</Member>
<Member MemberName="NextAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.QueryResult> NextAsync (string continuationToken);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Threading.Tasks.Task`1<class Microsoft.Azure.Devices.Provisioning.Service.QueryResult> NextAsync(string continuationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Devices.Provisioning.Service.Query.NextAsync(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function NextAsync (continuationToken As String) As Task(Of QueryResult)" />
<MemberSignature Language="F#" Value="member this.NextAsync : string -> System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.QueryResult>" Usage="query.NextAsync continuationToken" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Devices.Provisioning.Service</AssemblyName>
<AssemblyVersion>1.18.1.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Microsoft.Azure.Devices.Provisioning.Service.QueryResult></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="continuationToken" Type="System.String" />
</Parameters>
<Docs>
<param name="continuationToken">the string with the previous continuationToken. It cannot be null or empty.</param>
<summary>
Return the next page of result for the query using a new continuationToken.
</summary>
<returns>The <see cref="T:Microsoft.Azure.Devices.Provisioning.Service.QueryResult" /> with the next page of items for the query.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.IndexOutOfRangeException">If the query does no have more pages to return.</exception>
</Docs>
</Member>
<Member MemberName="PageSize">
<MemberSignature Language="C#" Value="public int PageSize { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 PageSize" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Devices.Provisioning.Service.Query.PageSize" />
<MemberSignature Language="VB.NET" Value="Public Property PageSize As Integer" />
<MemberSignature Language="F#" Value="member this.PageSize : int with get, set" Usage="Microsoft.Azure.Devices.Provisioning.Service.Query.PageSize" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Devices.Provisioning.Service</AssemblyName>
<AssemblyVersion>1.18.1.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>
The number of items in the current page.
</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>