Exemplo n.º 1
0
 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);
         }
     }
 }
Exemplo n.º 2
0
        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);
        }