Skip to content

Commit 9b89fff

Browse files
authored
remove IgnoreOnNet5Attribute and NoWarn exceptions (Azure#17793)
* remove IgnoreOnNet5Attribute and NoWarn exceptions * re-record after adjusting double values for test data
1 parent 4989122 commit 9b89fff

File tree

102 files changed

+9074
-9033
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+9074
-9033
lines changed

sdk/tables/Azure.Data.Tables/src/Azure.Data.Tables.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
<DefineConstants>TableSDK;$(DefineConstants)</DefineConstants>
77
<PackageTags>Microsoft Azure Tables;Microsoft;Azure;Tables;Table;$(PackageCommonTags)</PackageTags>
88
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks>
9-
<!-- These supressions should be removed in a production library -->
10-
<NoWarn>$(NoWarn);CA1812;CS1591</NoWarn>
119
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1210
</PropertyGroup>
1311
<ItemGroup>

sdk/tables/Azure.Data.Tables/src/ITableEntity.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55

66
namespace Azure.Data.Tables
77
{
8+
/// <summary>
9+
/// An interface defining the required properties for a table entity model. Custom entity model types must implement this interface.
10+
/// </summary>
11+
///
12+
/// <remarks>
13+
/// Two options exist for impelemtations of <see cref="ITableEntity"/>: Strongly typed custom entity model classes, and the provided <see cref="TableEntity"/> model.
14+
/// </remarks>
815
public interface ITableEntity
916
{
1017
/// <summary>

sdk/tables/Azure.Data.Tables/src/Sas/TableSasQueryParameters.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ public sealed class TableSasQueryParameters : TableAccountSasQueryParameters
4141
/// </summary>
4242
public string EndRowKey { get; set; }
4343

44+
/// <summary>
45+
/// Gets empty shared access signature query parameters.
46+
/// </summary>
4447
public static TableSasQueryParameters Empty => new TableSasQueryParameters();
4548

4649
internal TableSasQueryParameters()
@@ -96,7 +99,7 @@ internal TableSasQueryParameters(
9699
internal TableSasQueryParameters(
97100
IDictionary<string, string> values)
98101
: base(values)
99-
{}
102+
{ }
100103

101104
/// <summary>
102105
/// Convert the SAS query parameters into a URL encoded query string.

sdk/tables/Azure.Data.Tables/src/TableBatchResponse.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88

99
namespace Azure.Data.Tables.Models
1010
{
11-
public partial class TableBatchResponse
11+
/// <summary>
12+
/// The response from <see cref="TableTransactionalBatch.SubmitBatch(System.Threading.CancellationToken)"/> or <see cref="TableTransactionalBatch.SubmitBatchAsync(System.Threading.CancellationToken)"/>.
13+
/// </summary>
14+
public class TableBatchResponse
1215
{
1316
internal IDictionary<string, (HttpMessage Message, RequestType RequestType)> _requestLookup;
1417

sdk/tables/Azure.Data.Tables/src/TableClientOptions.cs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,26 @@
66

77
namespace Azure.Data.Tables
88
{
9+
/// <summary>
10+
/// Options to configure the requests to the Table service.
11+
/// </summary>
912
public class TableClientOptions : ClientOptions
1013
{
14+
/// <summary>
15+
/// The versions of Azure Tables supported by this client
16+
/// library.
17+
/// </summary>
1118
private const ServiceVersion Latest = ServiceVersion.V2019_02_02;
1219
internal static TableClientOptions Default { get; } = new TableClientOptions();
1320

21+
/// <summary>
22+
/// Initializes a new instance of the <see cref="TableClientOptions"/> class.
23+
/// class.
24+
/// </summary>
25+
/// <param name="serviceVersion">
26+
/// The <see cref="ServiceVersion"/> of the service API used when
27+
/// making requests.
28+
/// </param>
1429
public TableClientOptions(ServiceVersion serviceVersion = Latest)
1530
{
1631
VersionString = serviceVersion switch
@@ -22,11 +37,17 @@ public TableClientOptions(ServiceVersion serviceVersion = Latest)
2237

2338
internal string VersionString { get; }
2439

40+
/// <summary>
41+
/// Gets the <see cref="ServiceVersion"/> of the service API used when making requests.
42+
/// </summary>
2543
public enum ServiceVersion
2644
{
27-
#pragma warning disable CA1707
45+
#pragma warning disable CA1707 // Identifiers should not contain underscores
46+
/// <summary>
47+
/// The Tables API version 20019-02-02
48+
/// </summary>
2849
V2019_02_02 = 1
29-
#pragma warning restore CA1707
50+
#pragma warning restore CA1707 // Identifiers should not contain underscores
3051
}
3152
}
3253
}

sdk/tables/Azure.Data.Tables/src/TableServiceClient.cs

Lines changed: 44 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
namespace Azure.Data.Tables
1414
{
15+
/// <summary>
16+
/// The <see cref="TableServiceClient"/> provides synchronous and asynchronous methods to perform table level operations with Azure Tables hosted in either Azure storage accounts or Azure Cosmos DB table API.
17+
/// </summary>
1518
public class TableServiceClient
1619
{
1720
private readonly ClientDiagnostics _diagnostics;
@@ -199,6 +202,11 @@ public virtual TableAccountSasBuilder GetSasBuilder(string rawPermissions, Table
199202
return new TableAccountSasBuilder(rawPermissions, resourceTypes, expiresOn) { Version = _version };
200203
}
201204

205+
/// <summary>
206+
/// Gets an instance of a <see cref="TableClient"/> configured with the current <see cref="TableServiceClient"/> options, affinitized to the specified <paramref name="tableName"/>.
207+
/// </summary>
208+
/// <param name="tableName"></param>
209+
/// <returns></returns>
202210
public virtual TableClient GetTableClient(string tableName)
203211
{
204212
Argument.AssertNotNull(tableName, nameof(tableName));
@@ -218,44 +226,44 @@ public virtual TableClient GetTableClient(string tableName)
218226
/// <returns>An <see cref="AsyncPageable{T}"/> containing a collection of <see cref="TableItem"/>s.</returns>
219227
public virtual AsyncPageable<TableItem> GetTablesAsync(string filter = null, int? maxPerPage = null, CancellationToken cancellationToken = default)
220228
{
221-
return PageableHelpers.CreateAsyncEnumerable(
222-
async pageSizeHint =>
229+
return PageableHelpers.CreateAsyncEnumerable(
230+
async pageSizeHint =>
231+
{
232+
using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(TableServiceClient)}.{nameof(GetTables)}");
233+
scope.Start();
234+
try
223235
{
224-
using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(TableServiceClient)}.{nameof(GetTables)}");
225-
scope.Start();
226-
try
227-
{
228-
var response = await _tableOperations.QueryAsync(
229-
null,
230-
new QueryOptions() { Filter = filter, Select = null, Top = pageSizeHint, Format = _format },
231-
cancellationToken).ConfigureAwait(false);
232-
return Page.FromValues(response.Value.Value, response.Headers.XMsContinuationNextTableName, response.GetRawResponse());
233-
}
234-
catch (Exception ex)
235-
{
236-
scope.Failed(ex);
237-
throw;
238-
}
239-
},
240-
async (nextLink, pageSizeHint) =>
236+
var response = await _tableOperations.QueryAsync(
237+
null,
238+
new QueryOptions() { Filter = filter, Select = null, Top = pageSizeHint, Format = _format },
239+
cancellationToken).ConfigureAwait(false);
240+
return Page.FromValues(response.Value.Value, response.Headers.XMsContinuationNextTableName, response.GetRawResponse());
241+
}
242+
catch (Exception ex)
241243
{
242-
using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(TableServiceClient)}.{nameof(GetTables)}");
243-
scope.Start();
244-
try
245-
{
246-
var response = await _tableOperations.QueryAsync(
247-
nextTableName: nextLink,
248-
new QueryOptions() { Filter = filter, Select = null, Top = pageSizeHint, Format = _format },
249-
cancellationToken).ConfigureAwait(false);
250-
return Page.FromValues(response.Value.Value, response.Headers.XMsContinuationNextTableName, response.GetRawResponse());
251-
}
252-
catch (Exception ex)
253-
{
254-
scope.Failed(ex);
255-
throw;
256-
}
257-
},
258-
maxPerPage);
244+
scope.Failed(ex);
245+
throw;
246+
}
247+
},
248+
async (nextLink, pageSizeHint) =>
249+
{
250+
using DiagnosticScope scope = _diagnostics.CreateScope($"{nameof(TableServiceClient)}.{nameof(GetTables)}");
251+
scope.Start();
252+
try
253+
{
254+
var response = await _tableOperations.QueryAsync(
255+
nextTableName: nextLink,
256+
new QueryOptions() { Filter = filter, Select = null, Top = pageSizeHint, Format = _format },
257+
cancellationToken).ConfigureAwait(false);
258+
return Page.FromValues(response.Value.Value, response.Headers.XMsContinuationNextTableName, response.GetRawResponse());
259+
}
260+
catch (Exception ex)
261+
{
262+
scope.Failed(ex);
263+
throw;
264+
}
265+
},
266+
maxPerPage);
259267
}
260268

261269
/// <summary>

sdk/tables/Azure.Data.Tables/src/TableTransactionalBatch.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616

1717
namespace Azure.Data.Tables
1818
{
19-
public partial class TableTransactionalBatch
19+
/// <summary>
20+
/// Provides synchronous and asynchronous methods for creating and submitting table transactional batch requests.
21+
/// </summary>
22+
public class TableTransactionalBatch
2023
{
2124
private readonly TableRestClient _tableOperations;
2225
private readonly TableRestClient _batchOperations;

sdk/tables/Azure.Data.Tables/tests/SessionRecords/TableClientLiveTests(CosmosTable)/CreateEntityAllowsSelect.json

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)