Esempio n. 1
0
        public Task <List <User> > CheckUsersInGroupPresence(GroupChannel channel)
        {
            var tcs = new TaskCompletionSource <List <User> >();

            if (channel == null)
            {
                tcs.TrySetCanceled();
                return(tcs.Task);
            }

            channel.Refresh((e) =>
            {
                if (e != null)
                {
                    tcs.TrySetCanceled();
                }
                else
                {
                    tcs.TrySetResult(channel.Members);
                }
            });

            Debug.WriteLine("UpdateUsers Presence");

            return(tcs.Task);
        }