internal static void SessionSearchOnFind(IntPtr address) { SessionSearchOnFindCallback callback = null; SessionSearchFindCallbackInfo callbackInfo = null; if (Helper.TryGetAndRemoveCallback <SessionSearchOnFindCallback, SessionSearchFindCallbackInfoInternal, SessionSearchFindCallbackInfo>(address, out callback, out callbackInfo)) { callback(callbackInfo); } }
/// <summary> /// Find sessions matching the search criteria setup via this session 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 session by sessionid or targetuserid returns no results /// <see cref="Result.InvalidParameters" /> if any of the options are incorrect /// </returns> public void Find(SessionSearchFindOptions options, object clientData, SessionSearchOnFindCallback completionDelegate) { var optionsInternal = Helper.CopyProperties <SessionSearchFindOptionsInternal>(options); var completionDelegateInternal = new SessionSearchOnFindCallbackInternal(SessionSearchOnFind); var clientDataAddress = IntPtr.Zero; Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); EOS_SessionSearch_Find(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsInternal); }
/// <summary> /// Find sessions matching the search criteria setup via this session 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 session by sessionid or targetuserid returns no results /// <see cref="Result.InvalidParameters" /> if any of the options are incorrect /// </returns> public void Find(SessionSearchFindOptions options, object clientData, SessionSearchOnFindCallback completionDelegate) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <SessionSearchFindOptionsInternal, SessionSearchFindOptions>(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new SessionSearchOnFindCallbackInternal(OnFindCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); EOS_SessionSearch_Find(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); }