You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/SteamWebAPI2/Interfaces/SteamRemoteStorage.cs
+94-1Lines changed: 94 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
1
usingSteam.Models;
2
2
usingSteamWebAPI2.Models;
3
3
usingSteamWebAPI2.Utilities;
4
+
usingSystem;
4
5
usingSystem.Collections.Generic;
5
6
usingSystem.Diagnostics;
7
+
usingSystem.Linq;
6
8
usingSystem.Net.Http;
7
9
usingSystem.Threading.Tasks;
8
10
@@ -23,6 +25,74 @@ public SteamRemoteStorage(string steamWebApiKey, ISteamWebInterface steamWebInte
23
25
:steamWebInterface;
24
26
}
25
27
28
+
/// <summary>
29
+
/// Retrieves information about published files such as workshop items and screenshots.
30
+
/// </summary>
31
+
/// <param name="itemCount">The quantity of items for which to retrieve details.
32
+
/// This can be smaller than the amount of items in <paramref name="publishedFileIds"/>, but not larger.</param>
33
+
/// <param name="publishedFileIds">The list of IDs of files for which to retrieve details.</param>
34
+
/// <returns>A collection of the details of each file or <c>null</c> if the request failed.</returns>
35
+
/// <exception cref="ArgumentNullException">Thrown when <paramref name="publishedFileIds"/> is null.</exception>
36
+
/// <exception cref="ArgumentOutOfRangeException">Thrown when <paramref name="publishedFileIds"/> is empty or <paramref name="itemCount"/>is greater than the number of elements in <paramref name="publishedFileIds"/>.</exception>
thrownewArgumentOutOfRangeException(nameof(publishedFileIds),$"{nameof(publishedFileIds)} is empty.");
46
+
}
47
+
48
+
if(itemCount>publishedFileIds.Count)
49
+
{
50
+
thrownewArgumentOutOfRangeException(nameof(itemCount),itemCount,$"{nameof(itemCount)} cannot be greater than the number of elements in {nameof(publishedFileIds)}.");
0 commit comments