Address warnings and (some) nullables (#2013)

This commit is contained in:
Cheena Malhotra
2023-04-18 20:57:13 -07:00
committed by GitHub
parent d56f2309da
commit 648d7dbd3c
83 changed files with 674 additions and 588 deletions

View File

@@ -408,7 +408,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser
/// <summary>
/// Internal implementation class to implement IBatchEventHandlers
/// </summary>
internal class BatchEventNotificationHandler : IBatchEventsHandler
internal sealed class BatchEventNotificationHandler : IBatchEventsHandler
{
public void OnBatchError(object sender, BatchErrorEventArgs args)
{
@@ -477,7 +477,7 @@ namespace Microsoft.SqlTools.ServiceLayer.BatchParser
}
#endregion
private class BatchInfo
private sealed class BatchInfo
{
public BatchInfo(int startLine, int startColumn, string batchText, SqlCmdCommand sqlCmdCommand, int repeatCount = 1)
{

View File

@@ -32,7 +32,7 @@
<Version>$(VersionPrefix)</Version>
<FileVersion>$(VersionPrefix)</FileVersion>
<InformationalVersion>$(VersionPrefix)</InformationalVersion>
<!-- TODO FIX THESE WARNINGS ASAP -->
<!-- Disable CA1852 (Seal internal types) as it depends on SrGen Tool -->
<NoWarn>$(NoWarn);CA1852</NoWarn>
</PropertyGroup>
<ItemGroup>

View File

@@ -374,7 +374,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
/// <summary>
/// This class is used as value in the dictionary to ensure that the type of value is correct.
/// </summary>
private class AmbientValue
private sealed class AmbientValue
{
private readonly Type _type;
private readonly bool _isTypeNullable;

View File

@@ -45,7 +45,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
}
#region CacheKey implementation
internal class CacheKey : IEquatable<CacheKey>
internal sealed class CacheKey : IEquatable<CacheKey>
{
private string dataSource;
private string dbName;

View File

@@ -407,7 +407,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
}
}
internal class ExponentialDelayRetryPolicy : RetryPolicy
internal sealed class ExponentialDelayRetryPolicy : RetryPolicy
{
private readonly int _maxRetryCount;
private readonly double _intervalFactor;