File tree Expand file tree Collapse file tree 7 files changed +22
-22
lines changed Expand file tree Collapse file tree 7 files changed +22
-22
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,10 @@ jobs:
1919 dotnet-version : 8.0.x
2020 cache : true
2121 cache-dependency-path : ' **/packages.lock.json'
22- - name : Install dotnet format tool
23- run : dotnet tool install -g dotnet-format
2422 - name : dotnet restore
25- run : dotnet restore --locked-mode .\Coder.Desktop.sln
23+ run : dotnet restore --locked-mode
2624 - name : dotnet format
27- run : dotnet format --verify-no-changes --no-restore .\Coder.Desktop.sln
25+ run : dotnet format --verify-no-changes --no-restore
2826
2927 test :
3028 runs-on : windows-latest
@@ -35,10 +33,11 @@ jobs:
3533 with :
3634 dotnet-version : 8.0.x
3735 cache : true
36+ cache-dependency-path : ' **/packages.lock.json'
3837 - name : dotnet restore
39- run : dotnet restore --locked-mode .\Coder.Desktop.sln
38+ run : dotnet restore --locked-mode
4039 - name : dotnet test
41- run : dotnet test --no-restore .\Coder.Desktop.sln
40+ run : dotnet test --no-restore
4241
4342 build :
4443 runs-on : windows-latest
@@ -49,12 +48,13 @@ jobs:
4948 with :
5049 dotnet-version : 8.0.x
5150 cache : true
51+ cache-dependency-path : ' **/packages.lock.json'
5252 - name : dotnet restore
53- run : dotnet restore --locked-mode .\Coder.Desktop.sln
53+ run : dotnet restore --locked-mode
5454 - name : dotnet build
55- run : dotnet build .\Coder.Desktop.sln
55+ run : dotnet build
5656 - name : dotnet publish
57- run : dotnet publish .\Coder.Desktop.sln -c Release -o .\publish
57+ run : dotnet publish --no-restore --configuration Release --output .\publish
5858 - name : Upload artifact
5959 uses : actions/upload-artifact@v4
6060 with :
Original file line number Diff line number Diff line change 1- using System . Text ;
1+ using System . Text ;
22using System . Text . Json ;
33using System . Text . Json . Serialization ;
44
Original file line number Diff line number Diff line change 1- using System . Reflection ;
1+ using System . Reflection ;
22using Google . Protobuf ;
33
44namespace Coder . Desktop . Vpn . Proto ;
Original file line number Diff line number Diff line change 1- namespace Coder . Desktop . Vpn . Proto ;
1+ namespace Coder . Desktop . Vpn . Proto ;
22
33/// <summary>
44/// A version of the RPC API. Can be compared other versions to determine compatibility between two peers.
@@ -152,12 +152,12 @@ public void Validate()
152152 {
153153 RpcVersion ? bestVersion = null ;
154154 foreach ( var v1 in this )
155- foreach ( var v2 in other )
156- if ( v1 . Major == v2 . Major && ( bestVersion is null || v1 . Major > bestVersion . Major ) )
157- {
158- var v = v1 . IsCompatibleWith ( v2 ) ;
159- if ( v is not null ) bestVersion = v ;
160- }
155+ foreach ( var v2 in other )
156+ if ( v1 . Major == v2 . Major && ( bestVersion is null || v1 . Major > bestVersion . Major ) )
157+ {
158+ var v = v1 . IsCompatibleWith ( v2 ) ;
159+ if ( v is not null ) bestVersion = v ;
160+ }
161161
162162 return bestVersion ;
163163 }
Original file line number Diff line number Diff line change 1- using Microsoft . Extensions . Hosting ;
1+ using Microsoft . Extensions . Hosting ;
22using Microsoft . Extensions . Logging ;
33
44namespace Coder . Desktop . Vpn . Service ;
Original file line number Diff line number Diff line change 1- using System . Buffers . Binary ;
1+ using System . Buffers . Binary ;
22using Coder . Desktop . Vpn . Proto ;
33using Coder . Desktop . Vpn . Utilities ;
44using Google . Protobuf ;
Original file line number Diff line number Diff line change 1- using System . Collections . Concurrent ;
1+ using System . Collections . Concurrent ;
22using System . Text ;
33using Coder . Desktop . Vpn . Proto ;
44using Coder . Desktop . Vpn . Utilities ;
@@ -195,7 +195,7 @@ private async Task ReceiveLoop(CancellationToken ct = default)
195195 while ( ! ct . IsCancellationRequested )
196196 {
197197 var message = await _serdes . ReadMessage ( _conn , ct ) ;
198- if ( message is { RpcField . ResponseTo : not 0 } )
198+ if ( message is { RpcField . ResponseTo : not 0 } )
199199 {
200200 // Look up the TaskCompletionSource for the message ID and
201201 // complete it with the message.
You can’t perform that action at this time.
0 commit comments