Skip to content

Commit c3a879f

Browse files
authored
More consistency changes in A.M.Q (Azure#24020)
1 parent 1fa3dea commit c3a879f

35 files changed

+920
-223
lines changed

sdk/core/Azure.Core/api/Azure.Core.net461.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ public static partial class Names
308308
public static string IfModifiedSince { get { throw null; } }
309309
public static string IfNoneMatch { get { throw null; } }
310310
public static string IfUnmodifiedSince { get { throw null; } }
311+
public static string Prefer { get { throw null; } }
311312
public static string Range { get { throw null; } }
312313
public static string Referer { get { throw null; } }
313314
public static string UserAgent { get { throw null; } }

sdk/core/Azure.Core/api/Azure.Core.net5.0.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ public static partial class Names
308308
public static string IfModifiedSince { get { throw null; } }
309309
public static string IfNoneMatch { get { throw null; } }
310310
public static string IfUnmodifiedSince { get { throw null; } }
311+
public static string Prefer { get { throw null; } }
311312
public static string Range { get { throw null; } }
312313
public static string Referer { get { throw null; } }
313314
public static string UserAgent { get { throw null; } }

sdk/core/Azure.Core/api/Azure.Core.netcoreapp2.1.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ public static partial class Names
308308
public static string IfModifiedSince { get { throw null; } }
309309
public static string IfNoneMatch { get { throw null; } }
310310
public static string IfUnmodifiedSince { get { throw null; } }
311+
public static string Prefer { get { throw null; } }
311312
public static string Range { get { throw null; } }
312313
public static string Referer { get { throw null; } }
313314
public static string UserAgent { get { throw null; } }

sdk/core/Azure.Core/api/Azure.Core.netstandard2.0.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ public static partial class Names
308308
public static string IfModifiedSince { get { throw null; } }
309309
public static string IfNoneMatch { get { throw null; } }
310310
public static string IfUnmodifiedSince { get { throw null; } }
311+
public static string Prefer { get { throw null; } }
311312
public static string Range { get { throw null; } }
312313
public static string Referer { get { throw null; } }
313314
public static string UserAgent { get { throw null; } }

sdk/core/Azure.Core/src/HttpHeader.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ public static class Names
132132
/// </summary>
133133
public static string IfUnmodifiedSince => "If-Unmodified-Since";
134134
/// <summary>
135+
/// Returns. <code>"Prefer"</code>
136+
/// </summary>
137+
public static string Prefer => "Prefer";
138+
/// <summary>
135139
/// Returns. <code>"Referer"</code>
136140
/// </summary>
137141
public static string Referer => "Referer";

sdk/monitor/Azure.Monitor.Query/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ var client = new LogsQueryClient(new DefaultAzureCredential());
9797
Response<LogsQueryResult> response = await client.QueryAsync(
9898
workspaceId,
9999
"AzureActivity | top 10 by TimeGenerated",
100-
new MonitorQueryTimeRange(TimeSpan.FromDays(1)));
100+
new QueryTimeRange(TimeSpan.FromDays(1)));
101101

102102
LogsTable table = response.Value.Table;
103103

@@ -127,7 +127,7 @@ string workspaceId = "<workspace_id>";
127127
Response<IReadOnlyList<MyLogEntryModel>> response = await client.QueryAsync<MyLogEntryModel>(
128128
workspaceId,
129129
"AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count",
130-
new MonitorQueryTimeRange(TimeSpan.FromDays(1)));
130+
new QueryTimeRange(TimeSpan.FromDays(1)));
131131

132132
foreach (var logEntryModel in response.Value)
133133
{
@@ -148,7 +148,7 @@ var client = new LogsQueryClient(new DefaultAzureCredential());
148148
Response<IReadOnlyList<string>> response = await client.QueryAsync<string>(
149149
workspaceId,
150150
"AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count | project ResourceGroup",
151-
new MonitorQueryTimeRange(TimeSpan.FromDays(1)));
151+
new QueryTimeRange(TimeSpan.FromDays(1)));
152152

153153
foreach (var resourceGroup in response.Value)
154154
{
@@ -167,7 +167,7 @@ var client = new LogsQueryClient(new DefaultAzureCredential());
167167
Response<LogsQueryResult> response = await client.QueryAsync(
168168
workspaceId,
169169
"AzureActivity | top 10 by TimeGenerated",
170-
new MonitorQueryTimeRange(TimeSpan.FromDays(1)));
170+
new QueryTimeRange(TimeSpan.FromDays(1)));
171171

172172
LogsTable table = response.Value.Table;
173173

@@ -206,11 +206,11 @@ var batch = new LogsBatchQuery();
206206
string countQueryId = batch.AddQuery(
207207
workspaceId,
208208
"AzureActivity | count",
209-
new MonitorQueryTimeRange(TimeSpan.FromDays(1)));
209+
new QueryTimeRange(TimeSpan.FromDays(1)));
210210
string topQueryId = batch.AddQuery(
211211
workspaceId,
212212
"AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count",
213-
new MonitorQueryTimeRange(TimeSpan.FromDays(1)));
213+
new QueryTimeRange(TimeSpan.FromDays(1)));
214214

215215
Response<LogsBatchQueryResultCollection> response = await client.QueryBatchAsync(batch);
216216

@@ -239,7 +239,7 @@ var client = new LogsQueryClient(new DefaultAzureCredential());
239239
Response<IReadOnlyList<int>> response = await client.QueryAsync<int>(
240240
workspaceId,
241241
"AzureActivity | summarize count()",
242-
new MonitorQueryTimeRange(TimeSpan.FromDays(1)),
242+
new QueryTimeRange(TimeSpan.FromDays(1)),
243243
options: new LogsQueryOptions
244244
{
245245
ServerTimeout = TimeSpan.FromMinutes(10)
@@ -265,7 +265,7 @@ var client = new LogsQueryClient(new DefaultAzureCredential());
265265
Response<IReadOnlyList<int>> response = await client.QueryAsync<int>(
266266
workspaceId,
267267
"AzureActivity | summarize count()",
268-
new MonitorQueryTimeRange(TimeSpan.FromDays(1)),
268+
new QueryTimeRange(TimeSpan.FromDays(1)),
269269
options: new LogsQueryOptions
270270
{
271271
AdditionalWorkspaces = { additionalWorkspaceId }
@@ -329,7 +329,7 @@ var client = new LogsQueryClient(new DefaultAzureCredential());
329329
try
330330
{
331331
await client.QueryAsync(
332-
workspaceId, "My Not So Valid Query", new MonitorQueryTimeRange(TimeSpan.FromDays(1)));
332+
workspaceId, "My Not So Valid Query", new QueryTimeRange(TimeSpan.FromDays(1)));
333333
}
334334
catch (Exception e)
335335
{

0 commit comments

Comments
 (0)