@@ -26,42 +26,45 @@ private static async Task MainAsync(string[] args)
2626 . UseTcp ( IPAddress . Loopback , 45684 )
2727 . Build ( ) ;
2828
29- // test 1: call IPC service method with primitive types
30- float result1 = await computingClient . InvokeAsync ( x => x . AddFloat ( 1.23f , 4.56f ) ) ;
31- Console . WriteLine ( $ "[TEST 1] sum of 2 floating number is: { result1 } ") ;
29+ //// test 1: call IPC service method with primitive types
30+ // float result1 = await computingClient.InvokeAsync(x => x.AddFloat(1.23f, 4.56f));
31+ // Console.WriteLine($"[TEST 1] sum of 2 floating number is: {result1}");
3232
33- // test 2: call IPC service method with complex types
34- ComplexNumber result2 = await computingClient . InvokeAsync ( x => x . AddComplexNumber (
35- new ComplexNumber ( 0.1f , 0.3f ) ,
36- new ComplexNumber ( 0.2f , 0.6f ) ) ) ;
37- Console . WriteLine ( $ "[TEST 2] sum of 2 complexe number is: { result2 . A } +{ result2 . B } i") ;
33+ //// test 2: call IPC service method with complex types
34+ // ComplexNumber result2 = await computingClient.InvokeAsync(x => x.AddComplexNumber(
35+ // new ComplexNumber(0.1f, 0.3f),
36+ // new ComplexNumber(0.2f, 0.6f)));
37+ // Console.WriteLine($"[TEST 2] sum of 2 complexe number is: {result2.A}+{result2.B}i");
3838
39- // test 3: call IPC service method with an array of complex types
40- ComplexNumber result3 = await computingClient . InvokeAsync ( x => x . AddComplexNumbers ( new [ ]
41- {
42- new ComplexNumber ( 0.5f , 0.4f ) ,
43- new ComplexNumber ( 0.2f , 0.1f ) ,
44- new ComplexNumber ( 0.3f , 0.5f ) ,
45- } ) ) ;
46- Console . WriteLine ( $ "[TEST 3] sum of 3 complexe number is: { result3 . A } +{ result3 . B } i") ;
39+ //// test 3: call IPC service method with an array of complex types
40+ // ComplexNumber result3 = await computingClient.InvokeAsync(x => x.AddComplexNumbers(new[]
41+ // {
42+ // new ComplexNumber(0.5f, 0.4f),
43+ // new ComplexNumber(0.2f, 0.1f),
44+ // new ComplexNumber(0.3f, 0.5f),
45+ // }));
46+ // Console.WriteLine($"[TEST 3] sum of 3 complexe number is: {result3.A}+{result3.B}i");
4747
48- // test 4: call IPC service method without parameter or return
49- await systemClient . InvokeAsync ( x => x . DoNothing ( ) ) ;
50- Console . WriteLine ( $ "[TEST 4] invoked DoNothing()") ;
48+ //// test 4: call IPC service method without parameter or return
49+ // await systemClient.InvokeAsync(x => x.DoNothing());
50+ // Console.WriteLine($"[TEST 4] invoked DoNothing()");
5151
52- // test 5: call IPC service method with enum parameter
53- string text = await systemClient . InvokeAsync ( x => x . ConvertText ( "hEllO woRd!" , TextStyle . Upper ) ) ;
54- Console . WriteLine ( $ "[TEST 5] { text } ") ;
52+ //// test 5: call IPC service method with enum parameter
53+ // string text = await systemClient.InvokeAsync(x => x.ConvertText("hEllO woRd!", TextStyle.Upper));
54+ // Console.WriteLine($"[TEST 5] {text}");
5555
56- // test 6: call IPC service method returning GUID
57- Guid generatedId = await systemClient . InvokeAsync ( x => x . GenerateId ( ) ) ;
58- Console . WriteLine ( $ "[TEST 6] generated ID is: { generatedId } ") ;
56+ //// test 6: call IPC service method returning GUID
57+ // Guid generatedId = await systemClient.InvokeAsync(x => x.GenerateId());
58+ // Console.WriteLine($"[TEST 6] generated ID is: {generatedId}");
5959
60- // test 7: call IPC service method with byte array
61- byte [ ] input = Encoding . UTF8 . GetBytes ( "Test" ) ;
62- byte [ ] reversed = await systemClient . InvokeAsync ( x => x . ReverseBytes ( input ) ) ;
63- Console . WriteLine ( $ "[TEST 7] reversed bytes are: { Convert . ToBase64String ( reversed ) } ") ;
60+ //// test 7: call IPC service method with byte array
61+ // byte[] input = Encoding.UTF8.GetBytes("Test");
62+ // byte[] reversed = await systemClient.InvokeAsync(x => x.ReverseBytes(input));
63+ // Console.WriteLine($"[TEST 7] reversed bytes are: {Convert.ToBase64String(reversed)}");
6464
65+ // test 8: call IPC service method with generic parameter
66+ string print = await systemClient . InvokeAsync ( x => x . Printout ( DateTime . UtcNow ) ) ;
67+ Console . WriteLine ( $ "[TEST 8] print out value: { print } ") ;
6568 }
6669 catch ( Exception ex )
6770 {
0 commit comments