File tree 1 file changed +74
-0
lines changed
src/NetCore2Blockly/TestBlocklyHtml/Controllers
1 file changed +74
-0
lines changed Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . Collections . Generic ;
3
+ using System . Linq ;
4
+ using System . Threading . Tasks ;
5
+ using Microsoft . AspNetCore . Http ;
6
+ using Microsoft . AspNetCore . Mvc ;
7
+
8
+ namespace TestBlocklyHtml . Controllers
9
+ {
10
+ public partial class dboAssVA
11
+ {
12
+
13
+ public dboAssVA ( int id )
14
+ {
15
+ this . idassva = id ;
16
+ }
17
+
18
+
19
+
20
+ #region Properties
21
+
22
+ public Int64 idassva { get ; set ; }
23
+
24
+
25
+
26
+ public String nameassva
27
+ {
28
+ get
29
+ {
30
+ return "test " + idassva ;
31
+ }
32
+ }
33
+
34
+
35
+
36
+ #endregion
37
+
38
+ }
39
+ public class People
40
+ {
41
+ public dboAssVA Manager { get ; set ; }
42
+ public People [ ] Team { get ; set ; }
43
+
44
+ public int NumberPeopleInTeam
45
+ {
46
+ get
47
+ {
48
+ return Team ? . Length ?? 0 ;
49
+ }
50
+ }
51
+ }
52
+ [ Route ( "api/[controller]/[action]" ) ]
53
+ [ ApiController ]
54
+ public class TestGUIController : ControllerBase
55
+ {
56
+
57
+ //TODO: solve how the GUI is displayed for team
58
+ public async Task < People [ ] > Managers ( )
59
+ {
60
+
61
+
62
+ var p = new People ( ) ;
63
+ p . Manager = new dboAssVA ( 6 ) ;
64
+ p . Team = new People [ 3 ] ;
65
+ for ( int i = 0 ; i < p . Team . Length ; i ++ )
66
+ {
67
+ var t = new People ( ) ;
68
+ t . Manager = new dboAssVA ( i ) ;
69
+ p . Team [ i ] = t ;
70
+ }
71
+ return new [ ] { p } ;
72
+ }
73
+ }
74
+ }
You can’t perform that action at this time.
0 commit comments