public override void AddGetUserDataResponseListener(GetUserDataResponseDelegate responseDelegate) { Start(); string eventId = "getUserDataResponse"; lock (eventLock) { if (eventListeners.ContainsKey(eventId)) { eventListeners[eventId].Add(new GetUserDataResponseDelegator(responseDelegate)); } else { var list = new List <IDelegator>(); list.Add(new GetUserDataResponseDelegator(responseDelegate)); eventListeners.Add(eventId, list); } } }
public override void RemoveGetUserDataResponseListener(GetUserDataResponseDelegate responseDelegate) { Start(); string eventId = "getUserDataResponse"; lock (eventLock) { if (eventListeners.ContainsKey(eventId)) { foreach (GetUserDataResponseDelegator delegator in eventListeners[eventId]) { if (delegator.responseDelegate == responseDelegate) { eventListeners[eventId].Remove(delegator); return; } } } } }
public GetUserDataResponseDelegator(GetUserDataResponseDelegate responseDelegate) { this.responseDelegate = responseDelegate; }
public abstract void RemoveGetUserDataResponseListener(GetUserDataResponseDelegate responseDelegate);
public abstract void RemoveGetUserDataResponseListener (GetUserDataResponseDelegate responseDelegate);