コード例 #1
0
        public Result Unjoin(string username)
        {
            Result unjoinResult;

            //Remove the user from the list of joined users, held by DarPoolingService.
            IAsyncResult asyncResult = removeJoinedUser.BeginInvoke(username, null, null);

            // Wait until the thread complete its execution.
            while (!asyncResult.IsCompleted)
            {
            }

            unjoinResult         = new UnjoinConfirmedResult();
            unjoinResult.Comment = "You are logged OFF from Darpooling";
            return(unjoinResult);
        }
コード例 #2
0
        private bool IsFinalInteraction(Result result)
        {
            LoginErrorResult error = result as LoginErrorResult;

            if (error != null)
            {
                return(true);
            }

            UnjoinConfirmedResult unjoin = result as UnjoinConfirmedResult;

            if (unjoin != null)
            {
                return(true);
            }

            return(false);
        }
コード例 #3
0
        public Result Unjoin(string username)
        {
            Result unjoinResult;

            //Remove the user from the list of joined users, held by DarPoolingService.
            IAsyncResult asyncResult = removeJoinedUser.BeginInvoke(username, null, null);
            // Wait until the thread complete its execution.
            while (!asyncResult.IsCompleted) { }

            unjoinResult = new UnjoinConfirmedResult();
            unjoinResult.Comment = "You are logged OFF from Darpooling";
            return unjoinResult;
        }