public void Set(AddNotifyFriendsUpdateOptions other) { if (other != null) { m_ApiVersion = FriendsInterface.AddnotifyfriendsupdateApiLatest; } }
/// <summary> /// Listen for changes to friends for a particular account. /// </summary> /// <param name="options">Information about who would like notifications.</param> /// <param name="clientData">This value is returned to the caller when FriendsUpdateHandler is invoked.</param> /// <param name="friendsUpdateHandler">The callback to be invoked when a change to any friend status changes.</param> /// <returns> /// A valid notification ID if successfully bound, or <see cref="Common.InvalidNotificationid" /> otherwise /// </returns> public ulong AddNotifyFriendsUpdate(AddNotifyFriendsUpdateOptions options, object clientData, OnFriendsUpdateCallback friendsUpdateHandler) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <AddNotifyFriendsUpdateOptionsInternal, AddNotifyFriendsUpdateOptions>(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var friendsUpdateHandlerInternal = new OnFriendsUpdateCallbackInternal(OnFriendsUpdateCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, friendsUpdateHandler, friendsUpdateHandlerInternal); var funcResult = EOS_Friends_AddNotifyFriendsUpdate(InnerHandle, optionsAddress, clientDataAddress, friendsUpdateHandlerInternal); Helper.TryMarshalDispose(ref optionsAddress); Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult); return(funcResult); }