@@ -42,7 +42,7 @@ public ScanImageRequest()
42
42
43
43
private List < string > scenes = new List < string > ( ) { } ;
44
44
45
- private List < Task > tasks = new List < Task > ( ) { } ;
45
+ private List < string > tasks = new List < string > ( ) { } ;
46
46
47
47
public List < string > Scenes
48
48
{
@@ -54,14 +54,10 @@ public List<string> Scenes
54
54
set
55
55
{
56
56
scenes = value ;
57
- for ( int i = 0 ; i < scenes . Count ; i ++ )
58
- {
59
- DictionaryUtil . Add ( BodyParameters , "Scene." + ( i + 1 ) , scenes [ i ] ) ;
60
- }
61
57
}
62
58
}
63
59
64
- public List < Task > Tasks
60
+ public List < string > Tasks
65
61
{
66
62
get
67
63
{
@@ -71,13 +67,16 @@ public List<Task> Tasks
71
67
set
72
68
{
73
69
tasks = value ;
74
- for ( int i = 0 ; i < tasks . Count ; i ++ )
70
+ if ( tasks != null )
75
71
{
76
- DictionaryUtil . Add ( BodyParameters , "Task." + ( i + 1 ) + ".DataId" , tasks [ i ] . DataId ) ;
77
- DictionaryUtil . Add ( BodyParameters , "Task." + ( i + 1 ) + ".ImageURL" , tasks [ i ] . ImageURL ) ;
78
- DictionaryUtil . Add ( BodyParameters , "Task." + ( i + 1 ) + ".MaxFrames" , tasks [ i ] . MaxFrames ) ;
79
- DictionaryUtil . Add ( BodyParameters , "Task." + ( i + 1 ) + ".Interval" , tasks [ i ] . Interval ) ;
80
- DictionaryUtil . Add ( BodyParameters , "Task." + ( i + 1 ) + ".ImageTimeMillisecond" , tasks [ i ] . ImageTimeMillisecond ) ;
72
+ for ( int depth1 = 0 ; depth1 < tasks . Count ; depth1 ++ )
73
+ {
74
+ DictionaryUtil . Add ( BodyParameters , "Task." + ( depth1 + 1 ) , tasks [ depth1 ] ) ;
75
+ DictionaryUtil . Add ( BodyParameters , "Task." + ( depth1 + 1 ) , tasks [ depth1 ] ) ;
76
+ DictionaryUtil . Add ( BodyParameters , "Task." + ( depth1 + 1 ) , tasks [ depth1 ] ) ;
77
+ DictionaryUtil . Add ( BodyParameters , "Task." + ( depth1 + 1 ) , tasks [ depth1 ] ) ;
78
+ DictionaryUtil . Add ( BodyParameters , "Task." + ( depth1 + 1 ) , tasks [ depth1 ] ) ;
79
+ }
81
80
}
82
81
}
83
82
}
0 commit comments