private void ClientOnSetProjectManagerGroupAssociationsCompleted(object sender, SetProjectManagerGroupAssociationsCompletedEventArgs e) { if (e.UserState is Guid) { var guid = (Guid)e.UserState; if (ObjectDictionary.ContainsKey(guid) && SetProjectManagerGroupAssociationsCompletedEventHandlers.ContainsKey(guid)) { SetProjectManagerGroupAssociationsCompletedEventHandlers[guid](ObjectDictionary[guid], e); SetProjectManagerGroupAssociationsCompletedEventHandlers.Remove(guid); ObjectDictionary.Remove(guid); } } }
public void SetProjectManagerGroupAssociationsAsync(object context, EventHandler <SetProjectManagerGroupAssociationsCompletedEventArgs> action, GlymaSecurableObject securableObject) { var guid = Guid.NewGuid(); ObjectDictionary.Add(guid, context); SetProjectManagerGroupAssociationsCompletedEventHandlers.Add(guid, action); Client.SetProjectManagerGroupAssociationsAsync(App.Params.SiteUrl, securableObject, guid); }