private static void InternalOnMultiplayerInvitationEventCallback(Types.MultiplayerEvent eventType, string matchId, IntPtr match, IntPtr userData) { Action <Types.MultiplayerEvent, string, MultiplayerInvitation> action = Callbacks.IntPtrToPermanentCallback <Action <Types.MultiplayerEvent, string, MultiplayerInvitation> >(userData); using (MultiplayerInvitation arg = MultiplayerInvitation.FromPointer(match)) { try { action?.Invoke(eventType, matchId, arg); } catch (Exception arg2) { Logger.e("Error encountered executing InternalOnMultiplayerInvitationEventCallback. Smothering to avoid passing exception into Native: " + arg2); } } }
private static void InternalOnMultiplayerInvitationEventCallback( Types.MultiplayerEvent eventType, string matchId, IntPtr match, IntPtr userData) { var callback = Callbacks.IntPtrToPermanentCallback <Action <Types.MultiplayerEvent, string, MultiplayerInvitation> >(userData); using (var nativeInvitation = MultiplayerInvitation.FromPointer(match)) { try { if (callback != null) { callback(eventType, matchId, nativeInvitation); } } catch (Exception e) { Logger.e("Error encountered executing " + "InternalOnMultiplayerInvitationEventCallback. " + "Smothering to avoid passing exception into Native: " + e); } } }
private static void InternalOnMultiplayerInvitationEventCallback(Types.MultiplayerEvent eventType, string matchId, IntPtr match, IntPtr userData) { Action <Types.MultiplayerEvent, string, MultiplayerInvitation> permanentCallback = Callbacks.IntPtrToPermanentCallback <Action <Types.MultiplayerEvent, string, MultiplayerInvitation> >(userData); using (MultiplayerInvitation multiplayerInvitation = MultiplayerInvitation.FromPointer(match)) { try { if (permanentCallback == null) { return; } permanentCallback(eventType, matchId, multiplayerInvitation); } catch (Exception ex) { Logger.e("Error encountered executing InternalOnMultiplayerInvitationEventCallback. Smothering to avoid passing exception into Native: " + (object)ex); } } }
private static void InternalOnMultiplayerInvitationEventCallback(Types.MultiplayerEvent eventType, string matchId, IntPtr match, IntPtr userData) { Action <Types.MultiplayerEvent, string, MultiplayerInvitation> action = Callbacks.IntPtrToPermanentCallback <Action <Types.MultiplayerEvent, string, MultiplayerInvitation> >(userData); MultiplayerInvitation invitation = MultiplayerInvitation.FromPointer(match); try { if (action != null) { action(eventType, matchId, invitation); } } catch (Exception exception) { Logger.e("Error encountered executing InternalOnMultiplayerInvitationEventCallback. Smothering to avoid passing exception into Native: " + exception); } finally { if (invitation != null) { invitation.Dispose(); } } }