/// <summary> /// Starts an asynchronous task that accepts a friend invitation from another user. The completion delegate is executed after the backend response has been received. /// </summary> /// <param name="options">structure containing the logged in account and the inviting account</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 async operation completes, either successfully or in error</param> public void AcceptInvite(AcceptInviteOptions options, object clientData, OnAcceptInviteCallback completionDelegate) { var optionsInternal = Helper.CopyProperties <AcceptInviteOptionsInternal>(options); var completionDelegateInternal = new OnAcceptInviteCallbackInternal(OnAcceptInvite); var clientDataAddress = IntPtr.Zero; Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); EOS_Friends_AcceptInvite(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsInternal); }
/// <summary> /// Starts an asynchronous task that accepts a friend invitation from another user. The completion delegate is executed after the backend response has been received. /// </summary> /// <param name="options">structure containing the logged in account and the inviting account</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 async operation completes, either successfully or in error</param> public void AcceptInvite(AcceptInviteOptions options, object clientData, OnAcceptInviteCallback completionDelegate) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <AcceptInviteOptionsInternal, AcceptInviteOptions>(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnAcceptInviteCallbackInternal(OnAcceptInviteCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); EOS_Friends_AcceptInvite(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); }
internal static extern void EOS_Friends_AcceptInvite(System.IntPtr handle, System.IntPtr options, System.IntPtr clientData, OnAcceptInviteCallbackInternal completionDelegate);
private static extern void EOS_Friends_AcceptInvite(IntPtr handle, ref AcceptInviteOptionsInternal options, IntPtr clientData, OnAcceptInviteCallbackInternal completionDelegate);