File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed
TouchSenderInterpreter.ConsoleAppDemo
TouchSenderInterpreter.Test
TouchSenderInterpreter/Models Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 11using System . Net . Sockets ;
2- using System . Text ;
32using System . Text . Json ;
43
54using TouchSenderInterpreter . Models ;
@@ -66,7 +65,6 @@ static async Task ReceiveTouchSenderPayload(CancellationToken cts)
6665 while ( true )
6766 {
6867 var receivedResults = await udpClient . ReceiveAsync ( cts ) ;
69- var receivedText = Encoding . UTF8 . GetString ( receivedResults . Buffer ) ;
7068 touchSenderResult = Interpreter . Read ( receivedResults . Buffer ) ;
7169 }
7270 }
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ namespace TouchSenderInterpreter.Test
1111 internal class TestDataGenerator
1212 {
1313 static readonly int ExampleId = 10 ;
14- static readonly Deviceinfo FullDeviceInfo = new ( Width : 1920 , Height : 1080 ) ;
15- static readonly Singletouch FullSingleTouch = new ( X : 0.5 , Y : 0.5 ) ;
14+ static readonly DeviceInfo FullDeviceInfo = new ( Width : 1920 , Height : 1080 ) ;
15+ static readonly SingleTouch FullSingleTouch = new ( X : 0.5 , Y : 0.5 ) ;
1616 static readonly TouchSenderPayload FullPayload = new ( ExampleId , FullDeviceInfo , FullSingleTouch ) ;
1717 public static IEnumerable < object [ ] > FullPayloads ( )
1818 {
Original file line number Diff line number Diff line change 22{
33 public record TouchSenderPayload (
44 int Id ,
5- Deviceinfo DeviceInfo ,
6- Singletouch SingleTouch
5+ DeviceInfo DeviceInfo ,
6+ SingleTouch SingleTouch
77 )
88 {
9- public Singletouch SingleTouchRatio
9+ public SingleTouch SingleTouchRatio
1010 {
1111 get
1212 {
13- return new Singletouch (
13+ return new SingleTouch (
1414 X : SingleTouch . X / DeviceInfo . Width ,
1515 Y : SingleTouch . Y / DeviceInfo . Height
1616 ) ;
1717 }
1818 }
1919 } ;
2020
21- public record Deviceinfo (
21+ public record DeviceInfo (
2222 int Width ,
2323 int Height
2424 ) ;
2525
26- public record Singletouch (
26+ public record SingleTouch (
2727 double ? X ,
2828 double ? Y
2929 ) ;
You can’t perform that action at this time.
0 commit comments