@@ -31,10 +31,6 @@ public class ListFolderArg
3131 /// <para>Initializes a new instance of the <see cref="ListFolderArg" /> class.</para>
3232 /// </summary>
3333 /// <param name="path">A unique identifier for the file.</param>
34- /// <param name="sharedLink">A shared link to list the contents of, if the link is
35- /// protected provide the password. if this field is present, <see
36- /// cref="Dropbox.Api.Files.ListFolderArg.Path" /> will be relative to root of the
37- /// shared link. Only non-recursive mode is supported for shared link.</param>
3834 /// <param name="recursive">If true, the list folder operation will be applied
3935 /// recursively to all subfolders and the response will contain contents of all
4036 /// subfolders.</param>
@@ -51,14 +47,18 @@ public class ListFolderArg
5147 /// <param name="limit">The maximum number of results to return per request. Note: This
5248 /// is an approximate number and there can be slightly more entries returned in some
5349 /// cases.</param>
50+ /// <param name="sharedLink">A shared link to list the contents of. If the link is
51+ /// password-protected, the password must be provided. If this field is present, <see
52+ /// cref="Dropbox.Api.Files.ListFolderArg.Path" /> will be relative to root of the
53+ /// shared link. Only non-recursive mode is supported for shared link.</param>
5454 public ListFolderArg ( string path ,
55- SharedLink sharedLink = null ,
5655 bool recursive = false ,
5756 bool includeMediaInfo = false ,
5857 bool includeDeleted = false ,
5958 bool includeHasExplicitSharedMembers = false ,
6059 bool includeMountedFolders = true ,
61- uint ? limit = null )
60+ uint ? limit = null ,
61+ SharedLink sharedLink = null )
6262 {
6363 if ( path == null )
6464 {
@@ -82,13 +82,13 @@ public ListFolderArg(string path,
8282 }
8383
8484 this . Path = path ;
85- this . SharedLink = sharedLink ;
8685 this . Recursive = recursive ;
8786 this . IncludeMediaInfo = includeMediaInfo ;
8887 this . IncludeDeleted = includeDeleted ;
8988 this . IncludeHasExplicitSharedMembers = includeHasExplicitSharedMembers ;
9089 this . IncludeMountedFolders = includeMountedFolders ;
9190 this . Limit = limit ;
91+ this . SharedLink = sharedLink ;
9292 }
9393
9494 /// <summary>
@@ -111,14 +111,6 @@ public ListFolderArg()
111111 /// </summary>
112112 public string Path { get ; protected set ; }
113113
114- /// <summary>
115- /// <para>A shared link to list the contents of, if the link is protected provide the
116- /// password. if this field is present, <see
117- /// cref="Dropbox.Api.Files.ListFolderArg.Path" /> will be relative to root of the
118- /// shared link. Only non-recursive mode is supported for shared link.</para>
119- /// </summary>
120- public SharedLink SharedLink { get ; protected set ; }
121-
122114 /// <summary>
123115 /// <para>If true, the list folder operation will be applied recursively to all
124116 /// subfolders and the response will contain contents of all subfolders.</para>
@@ -156,6 +148,14 @@ public ListFolderArg()
156148 /// </summary>
157149 public uint ? Limit { get ; protected set ; }
158150
151+ /// <summary>
152+ /// <para>A shared link to list the contents of. If the link is password-protected, the
153+ /// password must be provided. If this field is present, <see
154+ /// cref="Dropbox.Api.Files.ListFolderArg.Path" /> will be relative to root of the
155+ /// shared link. Only non-recursive mode is supported for shared link.</para>
156+ /// </summary>
157+ public SharedLink SharedLink { get ; protected set ; }
158+
159159 #region Encoder class
160160
161161 /// <summary>
@@ -171,10 +171,6 @@ private class ListFolderArgEncoder : enc.StructEncoder<ListFolderArg>
171171 public override void EncodeFields ( ListFolderArg value , enc . IJsonWriter writer )
172172 {
173173 WriteProperty ( "path" , value . Path , writer , enc . StringEncoder . Instance ) ;
174- if ( value . SharedLink != null )
175- {
176- WriteProperty ( "shared_link" , value . SharedLink , writer , global ::Dropbox . Api . Files . SharedLink . Encoder ) ;
177- }
178174 WriteProperty ( "recursive" , value . Recursive , writer , enc . BooleanEncoder . Instance ) ;
179175 WriteProperty ( "include_media_info" , value . IncludeMediaInfo , writer , enc . BooleanEncoder . Instance ) ;
180176 WriteProperty ( "include_deleted" , value . IncludeDeleted , writer , enc . BooleanEncoder . Instance ) ;
@@ -184,6 +180,10 @@ public override void EncodeFields(ListFolderArg value, enc.IJsonWriter writer)
184180 {
185181 WriteProperty ( "limit" , value . Limit . Value , writer , enc . UInt32Encoder . Instance ) ;
186182 }
183+ if ( value . SharedLink != null )
184+ {
185+ WriteProperty ( "shared_link" , value . SharedLink , writer , global ::Dropbox . Api . Files . SharedLink . Encoder ) ;
186+ }
187187 }
188188 }
189189
@@ -219,9 +219,6 @@ protected override void SetField(ListFolderArg value, string fieldName, enc.IJso
219219 case "path" :
220220 value . Path = enc . StringDecoder . Instance . Decode ( reader ) ;
221221 break ;
222- case "shared_link" :
223- value . SharedLink = global ::Dropbox . Api . Files . SharedLink . Decoder . Decode ( reader ) ;
224- break ;
225222 case "recursive" :
226223 value . Recursive = enc . BooleanDecoder . Instance . Decode ( reader ) ;
227224 break ;
@@ -240,6 +237,9 @@ protected override void SetField(ListFolderArg value, string fieldName, enc.IJso
240237 case "limit" :
241238 value . Limit = enc . UInt32Decoder . Instance . Decode ( reader ) ;
242239 break ;
240+ case "shared_link" :
241+ value . SharedLink = global ::Dropbox . Api . Files . SharedLink . Decoder . Decode ( reader ) ;
242+ break ;
243243 default :
244244 reader . Skip ( ) ;
245245 break ;
0 commit comments