Skip to content

Commit 70048cd

Browse files
Fix warnings.
1 parent 43a7643 commit 70048cd

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

Directory.Build.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
<PrivateAssets>all</PrivateAssets>
4242
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4343
</PackageReference>
44+
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers">
45+
<PrivateAssets>all</PrivateAssets>
46+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
47+
</PackageReference>
4448
</ItemGroup>
4549

4650
<!-- Add the default using directive for all the code -->

src/Communication.UI.Blazor/Calling/CallingService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace PosInformatique.Azure.Communication.UI.Blazor
1212
/// Implementation of the <see cref="ICallingService"/> used to create instances
1313
/// of the <see cref="CallComposite"/>.
1414
/// </summary>
15-
public class CallingService : ICallingService, IAsyncDisposable
15+
public sealed class CallingService : ICallingService, IAsyncDisposable
1616
{
1717
private readonly IJSRuntime jsRuntime;
1818

tests/.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@ dotnet_diagnostic.BL0005.severity = none
2525

2626
# CA1861: Avoid constant arrays as arguments
2727
dotnet_diagnostic.CA1861.severity = none
28+
29+
# VSTHRD103: Call async methods when in an async method
30+
dotnet_diagnostic.VSTHRD103.severity = none
31+
32+
# VSTHRD200: Use "Async" suffix for async methods
33+
dotnet_diagnostic.VSTHRD200.severity = none

tests/Communication.UI.Blazor.Demo/Pages/Home.razor.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ namespace PosInformatique.Azure.Communication.UI.Blazor.Demo.Pages
1111

1212
public partial class Home
1313
{
14+
private readonly List<string> log;
15+
1416
private CallAdapter? callAdapter;
1517

1618
private string userId;
@@ -31,8 +33,6 @@ public partial class Home
3133

3234
private bool leaveCallForEveryone;
3335

34-
private List<string> log;
35-
3636
public Home()
3737
{
3838
this.userId = string.Empty;
@@ -49,7 +49,7 @@ public Home()
4949
this.raiseHandButton = true;
5050
this.screenShareButton = true;
5151

52-
this.log = new List<string>();
52+
this.log = [];
5353
}
5454

5555
public bool DisableLoad
@@ -78,6 +78,8 @@ public async ValueTask DisposeAsync()
7878

7979
this.callAdapter = null;
8080
}
81+
82+
GC.SuppressFinalize(this);
8183
}
8284

8385
private async Task CreateUserAsync()

0 commit comments

Comments
 (0)