Esempio n. 1
0
        public static Task <SteamUGCDetails[]> QueryAllUGCAsync(UGCQuery eQueryType, MatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId creatorAppId, AppId consumerAppId, uint unPage)
        {
            var tcs         = new TaskCompletionSource <SteamUGCDetails[]>();
            var queryHandle = SteamUGC.CreateQueryAllUGCRequest(eQueryType, eMatchingeMatchingUGCTypeFileType, creatorAppId, consumerAppId, unPage);

            var call = SteamUGC.SendQueryUGCRequest(queryHandle);

            var callback = new CallResult <SteamUGCQueryCompleted>();

            callback.Set(call, (a, b) =>
            {
                var results = new SteamUGCDetails[a.ResultsCount];
                for (uint i = 0; i < a.ResultsCount; i++)
                {
                    SteamUGCDetails details;
                    GetQueryUGCResult(queryHandle, i, out details);
                    results[i] = details;
                }
                tcs.SetResult(results);
            });

            return(tcs.Task);
        }
 /// <summary>
 /// <para> Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1.</para>
 /// </summary>
 public static UGCQueryHandle CreateQueryAllUGCRequest(UGCQuery eQueryType, MatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage)
 {
     InteropHelp.TestIfAvailableGameServer();
     return((UGCQueryHandle)NativeMethods.ISteamGameServerUGC_CreateQueryAllUGCRequest(eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage));
 }
 /// <summary>
 /// <para> Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1.</para>
 /// </summary>
 public static UGCQueryHandle CreateQueryUserUGCRequest(AccountId accountId, UserUGCList listType, MatchingUGCType eMatchingUGCType, UGCListSortOrder eSortOrder, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage)
 {
     InteropHelp.TestIfAvailableGameServer();
     return((UGCQueryHandle)NativeMethods.ISteamGameServerUGC_CreateQueryUserUGCRequest(accountId, listType, eMatchingUGCType, eSortOrder, nCreatorAppID, nConsumerAppID, unPage));
 }
Esempio n. 4
0
 /// <summary>
 /// <para> Query for all matching UGC. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1.</para>
 /// </summary>
 public static UGCQueryHandle CreateQueryAllUGCRequest(UGCQuery eQueryType, MatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId creatorAppId, AppId consumerAppId, uint unPage)
 {
     InteropHelp.TestIfAvailableClient();
     return((UGCQueryHandle)NativeMethods.ISteamUGC_CreateQueryAllUGCRequest(eQueryType, eMatchingeMatchingUGCTypeFileType, creatorAppId, consumerAppId, unPage));
 }
Esempio n. 5
0
 /// <summary>
 /// <para> Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1.</para>
 /// </summary>
 public static UGCQueryHandle CreateQueryUserUGCRequest(AccountId accountId, UserUGCList listType, MatchingUGCType matchingUGCType, UGCListSortOrder sortOrder, AppId creatorAppId, AppId consumerAppId, uint unPage)
 {
     InteropHelp.TestIfAvailableClient();
     return((UGCQueryHandle)NativeMethods.ISteamUGC_CreateQueryUserUGCRequest(accountId, listType, matchingUGCType, sortOrder, creatorAppId, consumerAppId, unPage));
 }