Example #1
0
        internal static void LobbySearchOnFind(IntPtr address)
        {
            LobbySearchOnFindCallback   callback     = null;
            LobbySearchFindCallbackInfo callbackInfo = null;

            if (Helper.TryGetAndRemoveCallback <LobbySearchOnFindCallback, LobbySearchFindCallbackInfoInternal, LobbySearchFindCallbackInfo>(address, out callback, out callbackInfo))
            {
                callback(callbackInfo);
            }
        }
Example #2
0
        /// <summary>
        /// Find lobbies matching the search criteria setup via this lobby search handle.
        /// When the operation completes, this handle will have the search results that can be parsed
        /// </summary>
        /// <param name="options">Structure containing information about the search criteria to use</param>
        /// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
        /// <param name="completionDelegate">A callback that is fired when the search operation completes, either successfully or in error</param>
        /// <returns>
        /// <see cref="Result.Success" /> if the find operation completes successfully
        /// <see cref="Result.NotFound" /> if searching for an individual lobby by lobby id or target user id returns no results
        /// <see cref="Result.InvalidParameters" /> if any of the options are incorrect
        /// </returns>
        public void Find(LobbySearchFindOptions options, object clientData, LobbySearchOnFindCallback completionDelegate)
        {
            var optionsInternal = Helper.CopyProperties <LobbySearchFindOptionsInternal>(options);

            var completionDelegateInternal = new LobbySearchOnFindCallbackInternal(LobbySearchOnFind);
            var clientDataAddress          = IntPtr.Zero;

            Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);

            EOS_LobbySearch_Find(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
            Helper.TryMarshalDispose(ref optionsInternal);
        }
        /// <summary>
        /// Find lobbies matching the search criteria setup via this lobby search handle.
        /// When the operation completes, this handle will have the search results that can be parsed
        /// </summary>
        /// <param name="options">Structure containing information about the search criteria to use</param>
        /// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate</param>
        /// <param name="completionDelegate">A callback that is fired when the search operation completes, either successfully or in error</param>
        /// <returns>
        /// <see cref="Result.Success" /> if the find operation completes successfully
        /// <see cref="Result.NotFound" /> if searching for an individual lobby by lobby ID or target user ID returns no results
        /// <see cref="Result.InvalidParameters" /> if any of the options are incorrect
        /// </returns>
        public void Find(LobbySearchFindOptions options, object clientData, LobbySearchOnFindCallback completionDelegate)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <LobbySearchFindOptionsInternal, LobbySearchFindOptions>(ref optionsAddress, options);

            var clientDataAddress = System.IntPtr.Zero;

            var completionDelegateInternal = new LobbySearchOnFindCallbackInternal(OnFindCallbackInternalImplementation);

            Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);

            EOS_LobbySearch_Find(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);

            Helper.TryMarshalDispose(ref optionsAddress);
        }