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:
19
19
dotnet-version : 8.0.x
20
20
cache : true
21
21
cache-dependency-path : ' **/packages.lock.json'
22
- - name : Install dotnet format tool
23
- run : dotnet tool install -g dotnet-format
24
22
- name : dotnet restore
25
- run : dotnet restore --locked-mode .\Coder.Desktop.sln
23
+ run : dotnet restore --locked-mode
26
24
- name : dotnet format
27
- run : dotnet format --verify-no-changes --no-restore .\Coder.Desktop.sln
25
+ run : dotnet format --verify-no-changes --no-restore
28
26
29
27
test :
30
28
runs-on : windows-latest
@@ -35,10 +33,11 @@ jobs:
35
33
with :
36
34
dotnet-version : 8.0.x
37
35
cache : true
36
+ cache-dependency-path : ' **/packages.lock.json'
38
37
- name : dotnet restore
39
- run : dotnet restore --locked-mode .\Coder.Desktop.sln
38
+ run : dotnet restore --locked-mode
40
39
- name : dotnet test
41
- run : dotnet test --no-restore .\Coder.Desktop.sln
40
+ run : dotnet test --no-restore
42
41
43
42
build :
44
43
runs-on : windows-latest
@@ -49,12 +48,13 @@ jobs:
49
48
with :
50
49
dotnet-version : 8.0.x
51
50
cache : true
51
+ cache-dependency-path : ' **/packages.lock.json'
52
52
- name : dotnet restore
53
- run : dotnet restore --locked-mode .\Coder.Desktop.sln
53
+ run : dotnet restore --locked-mode
54
54
- name : dotnet build
55
- run : dotnet build .\Coder.Desktop.sln
55
+ run : dotnet build
56
56
- name : dotnet publish
57
- run : dotnet publish .\Coder.Desktop.sln -c Release -o .\publish
57
+ run : dotnet publish --no-restore --configuration Release --output .\publish
58
58
- name : Upload artifact
59
59
uses : actions/upload-artifact@v4
60
60
with :
Original file line number Diff line number Diff line change 1
- using System . Text ;
1
+ using System . Text ;
2
2
using System . Text . Json ;
3
3
using System . Text . Json . Serialization ;
4
4
Original file line number Diff line number Diff line change 1
- using System . Reflection ;
1
+ using System . Reflection ;
2
2
using Google . Protobuf ;
3
3
4
4
namespace 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 ;
2
2
3
3
/// <summary>
4
4
/// A version of the RPC API. Can be compared other versions to determine compatibility between two peers.
@@ -152,12 +152,12 @@ public void Validate()
152
152
{
153
153
RpcVersion ? bestVersion = null ;
154
154
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
+ }
161
161
162
162
return bestVersion ;
163
163
}
Original file line number Diff line number Diff line change 1
- using Microsoft . Extensions . Hosting ;
1
+ using Microsoft . Extensions . Hosting ;
2
2
using Microsoft . Extensions . Logging ;
3
3
4
4
namespace Coder . Desktop . Vpn . Service ;
Original file line number Diff line number Diff line change 1
- using System . Buffers . Binary ;
1
+ using System . Buffers . Binary ;
2
2
using Coder . Desktop . Vpn . Proto ;
3
3
using Coder . Desktop . Vpn . Utilities ;
4
4
using Google . Protobuf ;
Original file line number Diff line number Diff line change 1
- using System . Collections . Concurrent ;
1
+ using System . Collections . Concurrent ;
2
2
using System . Text ;
3
3
using Coder . Desktop . Vpn . Proto ;
4
4
using Coder . Desktop . Vpn . Utilities ;
@@ -195,7 +195,7 @@ private async Task ReceiveLoop(CancellationToken ct = default)
195
195
while ( ! ct . IsCancellationRequested )
196
196
{
197
197
var message = await _serdes . ReadMessage ( _conn , ct ) ;
198
- if ( message is { RpcField . ResponseTo : not 0 } )
198
+ if ( message is { RpcField . ResponseTo : not 0 } )
199
199
{
200
200
// Look up the TaskCompletionSource for the message ID and
201
201
// complete it with the message.
You can’t perform that action at this time.
0 commit comments