Browse Source

fix: format

Bruce Wayne 2 weeks ago
parent
commit
ba48d1c7d0

+ 2 - 4
src/NatTypeTester.ViewModels/RFC5780ViewModel.cs

@@ -45,12 +45,10 @@ public class RFC5780ViewModel : ViewModelBase, IRoutableViewModel
 	private StunResult5389 _tcpResult;
 	private StunResult5389 _tlsResult;
 
-	private TransportType _transportType;
-
 	public TransportType TransportType
 	{
-		get => _transportType;
-		set => this.RaiseAndSetIfChanged(ref _transportType, value);
+		get;
+		set => this.RaiseAndSetIfChanged(ref field, value);
 	}
 
 	public ReactiveCommand<Unit, Unit> DiscoveryNatType { get; }

+ 2 - 5
src/STUN/Proxy/Socks5UdpProxy.cs

@@ -49,11 +49,8 @@ public class Socks5UdpProxy : IUdpProxy
 
 	public ValueTask CloseAsync(CancellationToken cancellationToken = default)
 	{
-		if (_socks5Client is not null)
-		{
-			_socks5Client.Dispose();
-			_socks5Client = null;
-		}
+		_socks5Client?.Dispose();
+		_socks5Client = null;
 		return default;
 	}